Making the LFS System Bootable

Trent Shea trent.shea at
Sun Oct 12 19:27:32 PDT 2008

On Sunday 12 October 2008 14:55:16 Randy McMurchy wrote:
> And if the book says to create this file *after* running the
> following commands, don't you find *that* weird?

Haha, a little, but I could see merit ;)

Hmm... I get the same output with or without the menu.list in place. It 
looks like the location /boot/grub/menu.lst is just a default. For 

cp /boot/grub/*stage* ~/

grub> root (hd0,12)
 Filesystem type is ext2fs, partition type 0x83

grub> setup --prefix=/root (hd0)
 Checking if "/root/stage1" exists... yes
 Checking if "/root/stage2" exists... yes
 Checking if "/root/e2fs_stage1_5" exists... yes
 Running "embed /root/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
 Running "install /root/stage1 (hd0) (hd0)1+15 p 
(hd0,12)/root/stage2 /root/men
u.lst"... succeeded

< Quote from info (Sorry, I'm not that familiar with info. I got to this 
page from the Index and install.>
If the options `p' or CONFIG_FILE are present, then it
     reads the first block of stage2, modifies it with the values of
     the partition STAGE2_FILE was found on (for `p') or places the
     string CONFIG_FILE into the area telling the stage2 where to look
     for a configuration file at boot time.
< End Quote >

It goes on, but according to the steps taken in the book I'm not sure 
that anything is modified by the menu.list being in place. I have also 
run setup with and without the menu.lst in place and run the following 
to try and confirm this:

bash-3.2# dd if=/dev/sda of=/root/mbr1 bs=512 count=1
bash-3.2# dd if=/dev/sda of=/root/mbr2 bs=512 count=1
bash-3.2# diff -s mbr mbr2
Files mbr and mbr2 are identical

Anyhow, I'm pretty convinced and I like how the page looks.

One more point:
If you have managed to install grub and then crash, you're not 
technically unable to boot, as you will end up in the grub shell and 
should be able to muddle your way through it ;).


More information about the lfs-dev mailing list