[nSLUG] grub2 failing on mdadm raid 1, ext4 : error: no such disk

D G Teed donald.teed at gmail.com
Sat May 21 00:15:13 ADT 2011


I must be missing a step or have muddled up something I can't spot.

I know ext4 and grub and mdadm raid 1 work together OK - I've
seen it on a Redhat 6 install.  On Debian 6 at home I'm
having the problem while converting to newer disks.
There are a number of changes from the previous disk setup.
It is going from ext3 to ext4 on the new disk, and also
from metadata .90 on mdadm to metadata 1.2 (with name=)
on the new disk's mdadm.conf lines.

When setting up the new RAID 1 in mdadm, it did make some
warning about the metadata 1.2 format, but I didn't write it down.
Looking at another system I set up for testing this
stuff, I see mdadm.conf set up with metadata=1.0
where I've got 1.2.  The working Debian 6 test box has:

ARRAY /dev/md/0 metadata=1.0 UUID=4a5f0038:e00d175e:6d7faf91:f6648f66
name=hostname:0

I wonder if the metadata 1.2 format is an issue?

Aside from copying the partitions, I've taken care to
edit /etc/fstab and /etc/mdadm/mdadm.conf on the
new disk.  /boot/grub/device.map was also updated.

UUIDs are in mdadm.conf (from mdadm --detail --scan output)
and UUIDs are in /etc/fstab (from blkid output).  By the way,
these UUIDs do not match between the different contexts
(confirmed normal on another working system).

The new disk is /dev/sdb, which has root on /dev/md10 - degraded for now.
The md10 is referenced all right in /boot/grub/grub.cnf

The old disk had md0, md1, etc., which I've set up as md10, md11,
etc. on the new disk.

I've run these commands to set up things with the new /dev/md10
root device:

update-initramfs -u -t
update-grub2
grub-install /dev/sdb

Also tried dpkg-reconfigure grub-pc

BIOS is set to boot from second disk - not hard to determine
which is which as the brands are different.

I've been working on it from the Debian netinstaller CD rescue mode.
It is good at assembling arrays and creating a ready made chroot shell.
Just need to use the right hostname when prompted or else the
md numbering gets messed up and it generates new MD devices called
md120 and the like.

On booting, I have been seeing the grub 2 error:

error: no such disk
Entering rescue mode...
grub rescue>

On this level, the commands are reduced until some basics are set up.

I've entered (for second disk, first partition):

grub rescue> set prefix=(hd1,1)/boot/grub
grub rescue> set root=(hd1,1)

At this point I should be able to do:

ls /boot
or
ls /

but it shows nothing, or produces error of no such file

If I repeat these steps under grub rescue with (hd0,1)
I can list the files on the root partition (and they are also
part of a degraded raid 1, only ext3)  I have no problem
seeing everything on md10 from the rescue chrooted
environment, so there is no doubt it is there.

Does anyone spot a step I've missed, or an incompatibility to avoid?

--Donald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/mailman/private/nslug/attachments/20110521/16537cc6/attachment-0002.html>


More information about the nSLUG mailing list