Originally Posted by engineer in post #28
Where does grub look for the information to choose which kernels (or OS) to display for selection on booting? Is this the information in the grub.cfg file? If so, it is correctly reading that file, since the kernel listed in Grub's boot menu is the 3.2.6 lfs kernel. Once I choose a kernel to boot, where does Grub look for the image (or what tells grub where to look for the image)?
GRUB 2 is more complicated, does more things, and has components with new names, but it still works basically a lot like legacy GRUB did. In a traditional BIOS-MBR setup like yours (I think), a small program (boot.img) is embedded in the master boot record of the first hard drive and is executed at boot time. That little program loads and executes a bigger one (a copy of core.img) that usually and traditionally is embedded in the normally unused sectors between the master boot record and the first partition (nowadays, this copy of core.img goes in other places for GPT drives and EFI computers). The core.img program includes modules to access the file system where it finds the grub.cfg file and other needed modules. It creates the menu screen using the information in grub.cfg. You select something from the menu and core.img uses the information in the grub.cfg file to find the boot files to load and execute, to load other modules that may be needed, and to pass parameters to the kernel.
If you are using the boot loader of another system (such as Fedora's) to boot LFS, then its boot.img and core.img were embedded and its grub.cfg is being used, so that menuentry stuff you have been agonizing over needs to be in Fedora's grub.cfg. In that case, a grub.cfg in the LFS /boot partition would not be needed nor used. But if you installed LFS's GRUB in the master boot record (with the grub-install /dev/sda
command), then LFS's core.img was embedded and its grub.cfg is being used and where your menuentry stuff has to go and be accurate.