From Linux Raid Wiki
Revision as of 18:29, 20 September 2016 by Anthony Youngman (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Using legacy boot loaders

There are several ways to set up a system that mounts its root filesystem on a RAID device. All? modern distributions allow for RAID setup in the installation process, and this is by far the easiest way to get a nicely set up RAID system.

Newer LILO distributions can handle RAID-1 devices, and thus the kernel can be loaded at boot-time from a RAID device. If configured appropriately LILO will correctly write boot-records on all disks in the array, to allow booting even if the primary disk fails (default LILO configurations are generally not setup like this).

If you are using grub instead of LILO, then just start grub and configure it to use the second (or third, or fourth...) disk in the RAID-1 array you want to boot off as its root device and run setup. And that's all.

For example, on an array consisting of /dev/hda1 and /dev/hdc1 where both partitions should be bootable you should just do this:

 grub>device (hd0) /dev/hdc
 grub>root (hd0,0)
 grub>setup (hd0)

Some users have experienced problems with this, reporting that although booting with one drive connected worked, booting with both two drives failed. Nevertheless, running the described procedure with both disks fixed the problem, allowing the system to boot from either single drive or from the RAID-1

Another way of ensuring that your system can always boot is, to create a boot floppy (if you are still one of those lucky souls whose system does have a floppy drive) when all the setup is done. If the disk on which the /boot filesystem resides dies, you can always boot from the floppy. On RedHat and RedHat derived systems, this can be accomplished with the mkbootdisk command.

Personal tools