Software Raid on Ubuntu and Debian
Although this procedure is not taken from the Managing RIAD on Linux, you should still get it because it is a great book!
After many, many attempts to get software RAID working on both Debian and Ubuntu the system would always lockup during boot and would not do any thing after that.
The system wont boot after a fresh install.
After banging my head a few hundred times I finally found a procedure that works!!!!!!
Install Ubuntu or Debian as you normally would, and configure RAID right from the installer. Once the installation is done the server will not boot, how stupid is that. what you need to do now is to insert the Ubuntu CD again and boot in Rescue mode.
Once the rescue mode reaches the disk partitioning screen press ESC and Select “Execurte a Shell” from the list.
Now mount your boot device, which you can do with
mount /dev/md0 /mntchroot /mnt
Now you should use grub to write the MBR to both disks. Type
if you get an error like
'Error opening terminal: bterm' just set your terminal to something else like so:
You may not see a clear display, meaning the lines will overlap but it works. Now run grub again.
For disk 1:
grub device (hd0) /dev/hda root (hd0,0) setup (hd0) quit
For Disk 2:
grub device (hd1) /dev/hdb root (hd1,0) setup (hd1) quit
If you’re not sure which devices you have just do:
Should look like this:
(hd0) /dev/hda (hd1) /dev/hdb
Use those! After doing this reboot your server, and you should now be able to boot your machine using RAID!
You should repeat this procedure every time you rebuild your RAID set or upgrade your Kernel.