GRUB vs. GAG

Glenn Holmer gholmer at ameritech.net
Sun Dec 24 12:22:47 UTC 2006


On Friday 22 December 2006 15:10, Duncan Lithgow wrote:
> GRUB should not be used as a boot manager. It is more a kernel
> manager and should be allowed to manage the startup of only one
> installation. I always install GRUB to the same partitions as root
> (/).

Rubbish.  My test machine has a dozen operating systems including Linux 
distros, Plan9, Minix, and Zeta (BeOS), and GRUB handles all of them 
just fine.

> An even more compelling example is the case I hit too many times.
> 1. Install Windows (writes to MBR)
> 2. Install Ubuntu (overwrites MBR)
> 3. Install another Linux (overwrites MBR again)

Most Linux distros will provide an entry to boot W****** when they 
install GRUB to the MBR.  Since W****** is almost invariably installed 
to the first partition of the first drive, the syntax to boot it is

root (hd0,0)
chainloader +1

Not exactly rocket science.  In step 3 above, you should tell the 
installer to put his copy of GRUB in the boot sector of the boot 
partition (of that install), not the MBR.  Then you can do the same 
thing; e.g. if you installed another Linux distribution to /dev/hda4, 
the entry in the main GRUB's configuration file would be:

root (hd0,3)
chainloader +1

This also gives you the bonus of retaining each distro's boot splash 
screen.  Each additional distro's GRUB menu can chain back to the main 
GRUB menu adding an entry that points back to the MBR's copy:

root (hd0)
chainloader +1

Beginning to see a pattern here?  :)  The chainloader syntax is also 
used for more exotic operating systems like Plan9.

Another great thing about GRUB is that you can drop back to its command 
line to try out these commands by hand.  Hit escape, then 'c' at the 
GRUB prompt sometime to try it; there's a "help" command and a "reboot" 
command if you get stuck.  (From the command prompt, hit escape again 
to return to the menu.)

http://www.gnu.org/software/grub/manual/

-- 
Glenn Holmer (Q-Link: ShadowM)
http://www.lyonlabs.org/commodore/c64.html




More information about the ubuntu-users mailing list