boot fails: mdadm not looking for UUIDs but hostname in superblocks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: mdadm
Release: Hardy Heron
I tried converting my Hardy system from a single-disk to RAID-1 by the usual procedure of making the new second disc a degraded RAID-1. Everything went fine but rebooting with the md device as root failed due to the fact that there is no hostname in the initramfs environment. Once it is set to the correct hostname in the initramfs busybox shell the boot can resume normally.
To reproduce, make sure that there is two discs, one of which contains a working Hardy installation, after that:
1. Partition the empty disc, set the partition type to FD
2. Create a md array using mdadm:
# mdadm --create /dev/md0 --level=raid1 --raid-devices=2 missing <your_partition>
3. mkfs and mount the new raid partition, copy the system over
4. reboot, edit grub commandline so that root=/dev/md1
The boot fails, and the initramfs environment:
$ mdadm --assemble --scan --verbose
says:
mdadm: /dev/md0: not built for host (none)
Once the hostname is set to the one the system used when booted up, mdadm is able to assemble /dev/md0 and mount it as root.
I don't know whether this also breaks the bootup when creating the raid-1 system upon installation.
summary: |
- boot from manually constructed raid1 root fails because of missing - hostname in initramfs + boot fails: mdadm not looking for UUIDs but hostname in superblocks |
Changed in mdadm (Ubuntu): | |
status: | Invalid → Confirmed |
The installer seems to work around the issue of an unset hostname in initramfs by putting an ARRAY line into the mdadm.conf file, or by having an unset hostname when creating the md device. Whichever, this error does not appear after raid installations.