[lug] Grub Install

Lee Woodworth blug-mail at duboulder.com
Tue Jan 30 10:12:31 MST 2007


David Morris wrote:
> I have a new mission in life:  Find the person who dreamed
> up randomly assigning device letters at boot (e.g. /dev/sda)
> and kill him.
> 
> As I mentioned in the previous thread, my hard disks are
> playing musical chairs with eachother.  Theoretically, the
> fix is to use UUID's provided by udev.
> 
> Except LILO can't use them.  Only option in LILO is to edit
> lilo.conf every single time lilo is rerun.  I am *not* going
> to go through that nightmare!
> 
> Ok, install Grub.
Grub is also sensitive to device enumeration order. As long
as the bootable devices are constantly plugged in things can
work. External SCSI devices that may or may not be powered
up would complicate things.

> 
> Nice theory, but grub-install will not run.  It just hangs
> and after about 20 minutes the system begins to get less and
> less usable until eventually it crashes.  At least it leaves
> lilo in the MBR so I can (with difficulty) boot up.
> 
> Any ideas on how to find out why grub-install refuses to
> work?  Or how to convince LILO to use udev disk paths?
You don't need to use grub-install. These commands have worked
for me with 0.9x versions of grub:
     # grub
     root (hd0,1)
     setup (hd0)
     quit
What this does:
     root (hd0,1) - tell grub that the first partition on the
                    first hard disk (IDE or SCSI) has the boot
                    files (grub directory with xxx_stagexxx)
     setup (hd0)  - set the MBR on the first hard disk to use
                    grub as the bootstrap. This also embeds
                    the xxx_stage1_5 for (hd0,0) on the disk.
     quit         - important step that has grub make sure
                    the disk modifications are flushed.

If you had the first partition (50MB) of each of your bootable
disks reserved as /boot and they all used the same file system
type (e.g. ext2/3), you could install grub on each of the disks
and the BIOS boot would always start GRUB even if you have
different external disks powered up. Note that you would need to
make sure the /boot/grub/grub.conf and your kernel/initrd files
are all the same on each disk.

See the 'Installing GRUB natively' topic in the grub help
(info grub).

> 
> Typing in a 60-character device string every time I
> want to boot my computer in less than half a dozen retries
> is getting old *really* fast.
> 
> Especially when I loose the piece of paper with that
> 60-character string written on it.
The grub.conf file still uses numbers to identify the hard disks.
You can put in multiple config sections with different disk
numbers. As long as you can get grub started, you can use the
command line mode to find the device numbers. See the
grub find command.

> 
> --David
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug




More information about the LUG mailing list