Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Ubuntu using RAID 1. In this case I have 2 harddisks with equal size to be used for RAID. I've been able to configure RAID 1 when installing

localhost:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[2](F)
  24418688 blocks [2/1] [U_]

 md1 : active raid1 sda2[0] sdb2[1]
  24418688 blocks [2/2] [UU]

/dev/md0 is mounted in / and /dev/md1 mounted in /home, but the problem is when I plugged off one harddisk, I can't boot my Ubuntu anymore. I think the problem is because the boot loader is installed in the harddisk (in my case in /dev/sda) and not on the RAID device /dev/md0.

Correct me if I'm wrong, but when when I plugged off the harddisk that has the bootloader, the OS can't boot. So how do I make my Ubuntu use the RAID 1 system so it can still boot in case one of the harddisks is plugged off?

I'm using Ubuntu 12.04 alternate.

share|improve this question

migrated from May 30 '12 at 18:26

This question came from our site for professional and enthusiast programmers.

Firstly, you need to install the bootloader to both devices, so that both can be booted of. Run the grub-install command for each drive in the array.

sudo grub-install /dev/sda
sudo grub-install /dev/sdb

Secondly, Ubuntu by default won't automatically boot a degraded array (i.e. an array where not all the disks are present). It will prompt you to choose whether to continue booting if the array is degraded -- if you need this to happen automatically:

  1. Edit /etc/initramfs-tools/conf.d/mdadm
  2. Set BOOT_DEGRADED=true
  3. Run update-initramfs -u to regenerate the initrd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.