"I forgot to run LILO"
"I forgot to run LILO"
Posted Dec 17, 2010 16:56 UTC (Fri) by Duncan (guest, #6647)In reply to: "I forgot to run LILO" by nix
Parent article: Getting grubby with ZFS
Understood. I continued for quite some time with LILO for that reason, tho I eventually switched to GRUB... at the same time I switched to md/RAID, FWIW.
> Also, last I encountered it, all the GRUBs required deep magic to dump its bootloader on both disks of an md-raid-1 set and to boot from kernels on such an array. This may well have changed, as that was years ago.
As hinted above, that has indeed changed. FWIW this is still grub-1 (0.97 with various distribution patches) I'm discussing here as I've not upgraded to grub2 yet.
Basically, it's a simple matter of first copying the stage-X and filesystem module files to /boot/grub if necessary (that's done using normal copy procedures, so if it's an md/RAID-1, just make sure it's mounted and cp to it as normal), then for each physical device, start the interactive grub session (the grub-install script isn't smart enough to figure it out), tell grub where to point the mbr install at when you install it using the root directive, do that actual install using the setup directive, and exit the interactive shell. So something like this:
grub
root (hd0,2)
setup (hd0)
exit
grub
root (hd1,2)
setup (hd1)
exit
...
(grub1 is zero-based and uses hd notation for drives other than floppies regardless of sata/scsi/ide/usb-thumb/whatever so for that example, /boot is on an md/RAID-1 composed of, assuming we're not dealing with legacy non-libata ide) /dev/sda3 and /dev/sdb3.)
Then you ensure your emergency boot disk is available just in case, and reboot, disabling all drives but the one you want to test. By disabling all drives instead of simply changing the BIOS boot selector, you catch any mistakes such as root (hd0,2) setup (hd1), pointing the mbr of the second BIOS drive at the third partition of the first BIOS drive, instead of its own third partition.
While that might be "deep magic" for the point-n-click types not comfortable at the command line, it should be fine for an admin comfortable with typical admin tasks such as installing their own kernels and editing their own bootloader configs.
Posted Dec 21, 2010 18:30 UTC (Tue)
by nix (subscriber, #2304)
[Link]
boot = /dev/md0
in lilo.conf, that is pretty bloody hideous. It is plain that GRUB has no actual support for this use-case at all, so you're having to in effect reimplement it by installing multiple GRUBs by hand, one in each boot sector. And if you typo you have a silent failure you won't notice until it's too late, while with LILO the stanza above always works (assuming your boot RAID-1 array is /dev/md0 that is).
I'll give it a miss.
Posted Dec 27, 2010 11:25 UTC (Mon)
by mfedyk (guest, #55303)
[Link]
"I forgot to run LILO"
raid-extra-boot
"I forgot to run LILO"