Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

grub 2 is unable to detect /dev/md1 which is a raid 1 drive on my computer.

When I press c in grub menu and run ls I get a list of all the drives but don't see md1 for booting Ubuntu which is on md1_p1.

This is the config I'm using in the grub2 40_custom file.

    menuentry "Ubuntu 12.10 uuid" {
        insmod ext2
        insmod mdraid
        set root='(md1,1)'
        search --no-floppy --fs-uuid --set=root 23451bea-fd08-cff7-9289-9f9aa51f8599
        linux /boot/vmlinuz-3.5.0-17-generic root=UUID=23451bea-fd08-cff7-9289-9f9aa51f8599 ro
        initrd /boot/initrd.img-3.5.0-17-generic
}

I'm able to load linux installed on other partition but unable to start 12.10 which I've just installed on a raid 1 ext4 fs.

share|improve this question
add comment

1 Answer

I was able to fix the issue using boot-repair using live cd. I followed the following steps

  1. Start ubuntu using live CD
  2. Install mdadm sudo apt-get install mdadm
  3. Assemble the array sudo mdadm --assemble --scan
  4. Install boot-repair sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update sudo apt-get install -y boot-repair && boot-repair
  5. Using advanced options in boot-repair I was able to select /dev/md1 as my operating system (this is the RAID where my ubuntu was installed earlier)
  6. Reboot and select Ubuntu on RAID 1

This way boot-repair purged the previous installation of grub and installed a new one and I think that's how the problem was solved as this new version was able to detect the RAID 1 drive.

share|improve this answer
add comment

Your Answer

 
discard

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.