Making the LFS System Bootable

Randy McMurchy lfs.user at
Sun Oct 12 14:05:32 PDT 2008

[cc'ing to LFS-Dev]

Wolfgang Messingschlager wrote:

> I suggest before issuing within grub
>     setup (hd0)
> the file /boot/grub/menu.lst should be created. This is much safer, 
> because it can happen that the system crashes between overwriting the 
> MBT and creating /boot/grub/menu.lst.
> What is your opinion?

I agree completely and my scripts have been doing it that way
since forever. I really never bother to look at the book for
this part of the build as my scripts have everything in it I
need. In fact I create a README file, just to have info handy:

cat > /boot/grub/README << "EOF"

Edit the menu.lst file to set up the various boots you may have
on the machine.

Then run the "grub" program.

At the grub prompt, use the following commands:

root (hd0,3) # This tells grub where to find the staging files
setup (hd0)  # This is where grub will write the MBR

Grub's nomenclature is different than Linux or Lilo. Grub starts
numbering the hard drives at 0 and partitions at 0.

Grub also skips cdroms and only lables hard disks. So, if Hard
Disk A was the first device on IDE1 and a cdrom was the second
device on IDE1, the first hard disk at IDE2 would be hd1.


Hopefully, someone else will comment and we'll open a ticket
about this.


More information about the lfs-dev mailing list