[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where's the grub boot menu?



On Saturday 19 August 2006 19:23, Jacob S wrote:

> Running "grub-install --root-directory=/ /dev/sda" fixed it. The
> strange part is that the documentation specifically says "grub-install
> --root-directory=/boot /dev/sda" is an example of how to do the
> installation when your boot partition is separate from the root
> partition. Oh well, it works now. And I learned how to use the grub
> shell in the process. :-)

I think this part of the documentation is ambiguous.  I think there are two 
separate things being mixed up.

1) On a normal running system, there will be a root directory, and off that 
a /boot directory in which it is convenient to place the vmlinuz and initrd 
images.  This will have a subdirectory called grub, with all the grub stuff 
in it.

The reason for this is so you can have a small partition at the start of a 
large disk that the BIOS can definately boot from.

2) when you are preparing a root image for another disk you will need to mount 
its root file system in a convenient place.  Confusingly they use /boot as 
the mount point.  

If we think this through instead using /mnt as the mount point.  Then, say, we 
have a disk /dev/sda on which we want to install grub, so that it can boot 
images from it.  This disk will be partitioned, and /dev/sda1 will have the 
root system file image on it

so we mount the root filesystem

mount /dev/sda1 /mnt 

grub install --root-directory=/mnt /dev/sda

will install the stage 1 grub into the boot sector of /dev/sda, with links in 
this boot sector to a stage 2 (or stage 1.5) image stored in /mnt/boot/grub

 

-- 
Alan Chandler
http://www.chandlerfamily.org.uk



Reply to: