Archive for May, 2016

Boot Ubuntu from RAID

May 13th, 2016 No comments

I had lately setup RAID 5 (three 2TB disks) with i7 6700 + ASUS H170 MoBo + 32GB DDR4 RAM followed by installing Ubuntu 16.04 x64 on it.  The installation went very well with Kernel 4.4.0-21.  But, upon restart the installation was unable to move ahead as the Kernel was not able to read from the RAID device.

Basically, the issue is that the install kernel didn’t have the RAID drivers embedded within.  Upon digging for few hours, found one solution at , which didn’t work as is.  The following modification worked:

  1. Boot from Live DVD image, which would load the RAID drivers automatically allowing you to see the device correctly.
  2. Now mount the root partition. (say /mnt/root-partition)
  3. Edit /mnt/root-partition/etc/initramfs-tools/modules for adding drivers that should get embedded into Initialization RAM drive file System (initrd).
  4. Add the following list at the end of the modules file.  The list is generated using “lsmod|grep raid” during the live DVD session.
    1. dm_raid
  5. Run “mkinitramfs -r /mnt/root-partition -o /mnt/root-partition/boot/initrd.img-4.4.0-21-generic”
  6. Reboot the machine to see that RAID is being detected.
  7. Install dmraid (apt-get install dmraid), which would again fix the initrd image with necessary stuff.
  8. Now, my machine works smooth.

If nothing worked, get a small HDD to install the OS in it.  While booting the OS, you may load the drivers via /etc/rc.local and dmraid commands to activate the RAID device and mount it for use.