Public bug reported:

Binary package hint: grub2

I have a RAID5 mdadm array on /dev/md0. It is fully functional but I
cannot boot from it because grub detects it as "/dev/md/0" (with an
extra slash). Running "update-grub", for example, produces a grub.cfg
with the lines "set root='(md/0)'". Upon rebooting, grub reports "error:
file not found" and drops into a rescue shell.

Some (or all) disks in this array were previously used in a RAID array
using mdadm metadata version 0.90. Now, however, they are using version
1.20. Since mdadm puts metadata v1.20 in a different location, I wonder
if perhaps there's a ghost of the old 0.90 metadata hanging around,
which is confusing grub.

$ sudo mdadm --detail --scan
ARRAY /dev/md0 metadata=1.2 name=eve:0 UUID=98ab8ad1:23e4df2e:d8bb3605:b9be0e1f

$ sudo mount /dev/md0 /mnt/raid
$ sudo mount --bind /dev /mnt/raid/dev
$ sudo mount --bind /dev/pts /mnt/raid/dev/pts
$ sudo mount --bind /proc /mnt/raid/proc
$ sudo mount --bind /sys /mnt/raid/sys
$ sudo chroot /mnt/raid
# ls -l /dev/md*
brw-rw---- 1 root disk 9, 0 2011-02-06 11:14 /dev/md0
# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
[raid10] 
md0 : active raid5 sdc1[1] sda1[0]
      968576000 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
# grub-mkconfig | grep 'set root'
Generating grub.cfg ...
set root='(md/0)'
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
        set root='(md/0)'
        set root='(md/0)'
Found linux image: /boot/vmlinuz-2.6.35-24-generic
Found initrd image: /boot/initrd.img-2.6.35-24-generic
        set root='(md/0)'
        set root='(md/0)'
Found linux image: /boot/vmlinuz-2.6.35-23-generic
Found initrd image: /boot/initrd.img-2.6.35-23-generic
        set root='(md/0)'
        set root='(md/0)'
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
        set root='(md/0)'
        set root='(md/0)'
Found linux image: /boot/vmlinuz-2.6.32-25-generic
Found initrd image: /boot/initrd.img-2.6.32-25-generic
        set root='(md/0)'
        set root='(md/0)'
Found memtest86+ image: /boot/memtest86+.bin
        set root='(md/0)'
        set root='(md/0)'
Found Microsoft Windows XP Home Edition on /dev/sdb1
        set root='(hd1,msdos1)'
done

$ lsb_release -rd
Description:    Ubuntu 10.10
Release:        10.10

$ apt-cache policy grub-pc mdadm
mdadm:
  Installed: 2.6.7.1-1ubuntu16
  Candidate: 2.6.7.1-1ubuntu16
  Version table:
 *** 2.6.7.1-1ubuntu16 0
        500 http://mirror.aarnet.edu.au/pub/ubuntu/archive/ maverick/main amd64 
Packages
        500 http://au.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status
grub-pc:
  Installed: 1.98+20100804-5ubuntu3
  Candidate: 1.98+20100804-5ubuntu3
  Version table:
 *** 1.98+20100804-5ubuntu3 0
        500 http://mirror.aarnet.edu.au/pub/ubuntu/archive/ maverick/main amd64 
Packages
        500 http://au.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/713874

Title:
  grub misinterprets md/raid device

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to