Le 25/02/2020 à 22:58, Alan Feuerbacher a écrit :
> Now that I've gotten jhalfs to (seemingly) build OK, I'm trying to
> get LFS systemd to boot up. So far, no cigar.
>
> Last month I built systemd through Linux-5.4.13 and got it to boot,
> but now, using similar boot techniques, I can't get Linux-5.5.3 to
> boot. I'm beginning to suspect that there is a difference between
> the 5.4.13 and 5.5.3 kernels.
>
> For different "linux ..." lines in grub.cfg, I get the same response
> when I try to boot: I get a "grub > " screen and can not do anything
> further. I think the grub command line interface is well nigh
> useless, by the way.
>
> So here is my grub.cfg:
>
> ##############
> # Begin /boot/grub/grub.cfg
> set default=0
> set timeout=5
>
> insmod gzio
> insmod part_gpt
> insmod ext2
>
> # From blkid:
> # /dev/sdd1: LABEL_FATBOOT="efi-boot" LABEL="efi-boot" UUID="AA0D-A728"
> BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="3935ae40-
> 4d25-4598-997d-c503b15520e8"
>
> search --no-floppy --fs-uuid --set root PARTUUID="3935ae40-4d25-4598-
> 997d-c503b15520e8"
root should be /boot, not /boot/efi, since it is where you have vmlinuz-xxx
>
> insmod efi_gop
> insmod efi_uga
> insmod font
> if loadfont /grub/fonts/unicode.pf2; then
> loadfont /grub/fonts/unicode.pf2
> set gfxmode=auto
> insmod gfxterm
> set gfxpayload=keep
> terminal_output gfxterm
> fi
>
> menuentry "GNU/Linux, LinuxJhalfs vmlinuz-5.5.3-lfs-20200216-systemd {
>
> # We have two possibilities for "linux ... set root ...", based on the
> output of bklid:
>
> # /dev/sdd4: UUID="Cksh39-z07e-PgLJ-Q9lo-P2dF-F6Fp-eBwU2i"
> TYPE="LVM2_member" PARTLABEL="Linux LVM" PARTUUID="c8a5af8d-5aa1-4106-
> b4c8-46ef22abcfc0"
> # /dev/mapper/lfslvm3-root: UUID="9c82c592-859c-4333-b09e-b0485ad72b3c"
> BLOCK_SIZE="4096" TYPE="ext4"
>
> linux /vmlinuz-5.5.3-lfs-20200216-systemd root=UUID="Cksh39-z07e-PgLJ-
> Q9lo-P2dF-F6Fp-eBwU2i" initrd=/initrd.img-5.5.3 ro
initrd /initrd.img-5.5.3 should be on a line by itself, not on the "linux" line
the root= parameter should point to the filesystem you want linux to use as /,
that is /dev/mapper/lfslvm3-root
so if you want to use an UUID, it is 9c82c592-859c-4333-b09e-b0485ad72b3c
>
> # linux /vmlinuz-5.5.3-lfs-20200216-systemd root=PARTUUID="c8a5af8d-
> 5aa1-4106-b4c8-46ef22abcfc0" initrd=/initrd.img-5.5.3 ro
>
> # linux /vmlinuz-5.5.3-lfs-20200216-systemd root=/dev/mapper/lfslvm3-
> root initrd=/initrd.img-5.5.3 ro
the line above should be OK, except you need to remove the initrd=...
>
> # linux /vmlinuz-5.5.3-lfs-20200216-systemd root=/dev/sdd4
> initrd=/initrd.img-5.5.3 ro
>
> initrd /initrd.img-5.5.3
> }
> ##############
>
>
> Here's the /boot directory structure:
>
> #############
> (lfs chroot) root:/$ cd /boot
> (lfs chroot) root:/boot$ ll
> total 32592
> -rw-r--r-- 1 root root 4851885 Feb 25 07:24 System.map-5.5.3
> -rw-r--r-- 1 root root 137281 Feb 25 07:24 config-5.5.3
> drwxr-xr-x 3 root root 4096 Jan 1 1970 efi
> drwxr-xr-x 4 root root 4096 Feb 25 21:11 grub
> -rw-r--r-- 1 root root 19416811 Feb 25 16:28 initrd.img-5.5.3
> drwx------ 2 root root 16384 Feb 25 01:39 lost+found
> -rw-r--r-- 1 root root 512 Feb 25 17:50 refind_linux.conf
> -rw-r--r-- 1 root root 8930176 Feb 25 07:24 vmlinuz-5.5.3-lfs-
> 20200216-systemd
>
> (lfs chroot) root:/boot$ ll grub
> total 24
> drwxr-xr-x 2 root root 4096 Feb 25 16:51 fonts
> -rw-r--r-- 1 root root 2280 Feb 25 21:11 grub.cfg
> -rw-r--r-- 1 root root 1024 Feb 25 16:51 grubenv
> drwxr-xr-x 2 root root 12288 Feb 25 16:51 x86_64-efi
> #############
>
>
> I built initrd.img-5.5.3 using the BLFS instructions.
>
> I followed the instructions in the LFS hint
> http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt
> to install much of the software, with some modifications.
>
>
> Output of lskblk for /dev/sdd. /boot and /boot/efi are on
> separate partitions:
>
> ###########
> sdd 8:48 0 2.7T 0 disk
> |-sdd1 8:49 0 1G 0 part /boot/efi
> |-sdd2 8:50 0 32G 0 part
> |-sdd3 8:51 0 1G 0 part /boot
> |-sdd4 8:52 0 500G 0 part
> | `-lfslvm3-root 253:5 0 500G 0 lvm /
> |-sdd5 8:53 0 500G 0 part
> | `-lfslvm3-opt 253:6 0 500G 0 lvm /opt
> `-sdd6 8:54 0 1.7T 0 part
> `-lfslvm3-home 253:7 0 1.7T 0 lvm /home
> ###########
>
> Output of gdisk and fdisk for /dev/sdd. This is a 3TB drive:
>
> ###########
> [root@localhost ~]# gdisk -l /dev/sdd
> GPT fdisk (gdisk) version 1.0.4
>
> Partition table scan:
> MBR: protective
> BSD: not present
> APM: not present
> GPT: present
>
> Found valid GPT with protective MBR; using GPT.
> Disk /dev/sdd: 5860533168 sectors, 2.7 TiB
> Model: ST3000DM001-9YN1
> Sector size (logical/physical): 512/4096 bytes
> Disk identifier (GUID): 26F4B063-75DD-4A69-8EDA-D49C765CF78D
> Partition table holds up to 128 entries
> Main partition table begins at sector 2 and ends at sector 33
> First usable sector is 34, last usable sector is 5860533134
> Partitions will be aligned on 2048-sector boundaries
> Total free space is 2014 sectors (1007.0 KiB)
>
> Number Start (sector) End (sector) Size Code Name
> 1 2048 2099199 1024.0 MiB EF00 EFI System
> 2 2099200 69208063 32.0 GiB 8200 Linux swap
> 3 69208064 71305215 1024.0 MiB 8300 Linux
> filesystem
> 4 71305216 1119881215 500.0 GiB 8E00 Linux LVM
> 5 1119881216 2168457215 500.0 GiB 8E00 Linux LVM
> 6 2168457216 5860533134 1.7 TiB 8E00 Linux LVM
>
>
> [root@localhost ~]# fdisk -l /dev/sdd
> Disk /dev/sdd: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
> Disk model: ST3000DM001-9YN1
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: gpt
> Disk identifier: 26F4B063-75DD-4A69-8EDA-D49C765CF78D
>
> Device Start End Sectors Size Type
> /dev/sdd1 2048 2099199 2097152 1G EFI System
> /dev/sdd2 2099200 69208063 67108864 32G Linux swap
> /dev/sdd3 69208064 71305215 2097152 1G Linux filesystem
> /dev/sdd4 71305216 1119881215 1048576000 500G Linux LVM
> /dev/sdd5 1119881216 2168457215 1048576000 500G Linux LVM
> /dev/sdd6 2168457216 5860533134 3692075919 1.7T Linux LVM
> ###########
>
> Here is /etc/fstab:
>
> #############
> # Begin /etc/fstab
>
> # file system mount-
> point type options dump fsck
> # order
>
> # Per hint
> http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt
> /dev/sdd1 /boot/efi vfat defaults 0
> 1
> /dev/mapper/lfslvm3-
> root / ext4 defaults 1 1
> /dev/sdd3 /boot ext4 defaults 1
> 2
> efivarfs /sys/firmware/efi/efivars efivarfs defaults 0
> 1
> /dev/mapper/lfslvm3-
> home /home ext4 defaults 1 2
> /dev/mapper/lfslvm3-
> opt /opt ext4 defaults 1 2
> /dev/sdd2 none swap pri=1 0
> 0
>
> # End /etc/fstab
> #############
>
> I'm trying to get systemd working with LVM and UEFI, so I've had to
> figure out how to get this far with not much help from the LFS
> documentation. Any comments on this will be appreciated.
Maybe, at the point you are, you could try to read more general
documentations, about lvm2, grub, uefi, etc. That's how we make documentation
for lfs...
>
> Note that my goal here is not to *some* LFS system running, since
> good instructions from LFS already exist for that, but to learn as
> much as possible by solving problems such as the above.>
> As usual, thanks for your help!
>
> Alan
>
>
--
http://lists.linuxfromscratch.org/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page