On 2018-10-07 23:54 +0000, David Sprayberry wrote: > LFS did not boot for me, possibly from an incorrectly configured > kernel or grub.cfg. > I used the grub.cfg (and all other instructions) from the EFI hint at > http://lists.linuxfromscratch.org/pipermail/hints/2018- > April/003325.html > > > ... > set root=(hd0,gpt2) > > ... > menuentry "GNU/Linux, Linux 4.18.5-lfs-8.3" { > linux /vmlinuz-4.18.5-lfs-8.3; root=/dev/sda7 ro > } > > My SSD's GPT layout: > 1. EFI > 2. boot > 3. Host -- debian / > 4. opt > 5. home > 6. src > 7. LFS > 8. swap > > I prepared a USB with debian live on it, and used that to change > grub.cfg. I noticed that other examples of grub.cfg on the internet > did not have the semicolon in the linux line of grub.cfg, so I tried > booting LFS with it removed, and it booted to a login prompt, but > some drivers were missing because my keyboard was not recognized. > Another kernel I don't remember being there, vmlinuz-4.9.0-7-amd64, > showed up in /boot, which I guess must be the host's kernel and must > have been there before.
The semicolon is a typo made by me :(. It has beem removed in the latest version: http://svn.linuxfromscratch.org/hints/trunk/lfs-uefi-20180409.txt > I sadly did not back up my old grub.cfg before overwriting it when > installing grub, so I'm not sure if there were special options to > pass to this host kernel to make it boot. When I first installed the > host system, debian, I set it to automatically mount /boot. I added > another menuentry to grub.cfg to try to boot this other kernel, but > it couldn't find root fs, even though I passed it root=/dev/sda3 in > grub.cfg. I looked at fstab on the host partition, but all the > entries start with UUID=... with some codes. It seems many "distribution" kernels need initramfs. Accroding to Debian kernel config ( https://salsa.debian.org/kernel-team/linux/blob/master/debian/config/config ) they have CONFIG_SATA_AHCI=m. So it won't find any AHCI SATA disk without initramfs (which contains AHCI kernel module). By the way, UUID=... also needs initramfs (that's why LFS doesn't use it). > Now all I have to use is my USB's debian live. Should I mount the > LFS partition and chroot from the live system to recompile the kernel > so it can recognize my keyboard, or is it better to get the host > system booting and do it from there? Why did the semicolon make a > difference in grub.cfg? Both should be right once you can chroot into the LFS hierarchy. -- Xi Ruoyao <xry...@mengyan1223.wang> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style