Bug#789152: boot fails using root=UUID= for root-device on software, raid /dev/md*

Chris Vogel cv at sernet.de
Thu Jun 18 12:07:32 BST 2015


Package: udev
Version: 215-17+deb8u1
Severity: normal

Dear Maintainer,

copying a Jessie installation from a server with hardware raid to a 
system with software raid /dev/md* I found that the system would not 
start on the new machine and would get stuck in initramfs.

Looking at /proc/mdstat and using blkid I found that all software raid 
devices were available and their UUID could be found. Only symlinks to 
the devices in /dev/disk/by-uuid/ were missing.

Setting the missing symlink to the root-filesystem manually and exiting 
initramfs shell led to normal system boot.

Looking into the problem I found that in file 
/usr/share/initramfs-tools/hooks/udev a wrong filename prevents 
/lib/udev/rules.d/63-md-raid-arrays.rules from being copied to the 
initramfs.

A temporary solution without edditing files owned by the package is 
putting the following script into e.g. 
/etc/initramfs-tools/hooks/udev-fix-md-boot:

=========================== cut here ============================
#!/bin/sh -e

PREREQS=""

prereqs() { echo "$PREREQS"; }

case "$1" in
     prereqs)
     prereqs
     exit 0
     ;;
esac

. /usr/share/initramfs-tools/hook-functions

mkdir -p $DESTDIR/lib/udev/rules.d/

rules=63-md-raid-arrays.rules
if   [ -e /etc/udev/rules.d/$rules ]; then
   cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
elif [ -e /lib/udev/rules.d/$rules ]; then
   cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
fi
=========================== cut here ============================

For a final fix a change of /usr/share/initramfs-tools/hooks/udev is needed:

=========================== cut here ============================
--- /usr/share/initramfs-tools/hooks/udev	2015-06-18 08:52:45.217944318 
+0200
+++ udev	2015-06-18 11:52:38.896375650 +0200
@@ -35,7 +35,7 @@
  mkdir -p $DESTDIR/lib/udev/rules.d/
  for rules in 50-firmware.rules 50-udev-default.rules 
60-persistent-storage.rules \
  	80-drivers.rules \
-	64-md-raid.rules 60-persistent-storage-lvm.rules \
+	63-md-raid-arrays.rules 60-persistent-storage-lvm.rules \
  	55-dm.rules 60-persistent-storage-dm.rules; do
    if   [ -e /etc/udev/rules.d/$rules ]; then
      cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
=========================== cut here ============================

With either solution after rebuilding initramfs with 'update-initramfs 
-k all -u' the system booted without problems using the software-raid 
/dev/mdX as root filesystem identified by its UUID.

-- System Information:
Debian Release: 8.1
   APT prefers stable
   APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages udev depends on:
ii  adduser        3.113+nmu3
ii  libacl1:amd64  2.2.52-2
ii  libblkid1:amd64 2.25.2-6
ii  libc6:amd64    2.19-18
ii  libkmod2:amd64 18-3
ii  libselinux1:amd64 2.3-2
ii  libudev1:amd64 215-17+deb8u1
ii  lsb-base       4.1+Debian13+nmu1
ii  util-linux     2.25.2-6
ii  procps         2:3.3.9-9

Versions of packages initramfs-tools recommends:

Versions of packages initramfs-tools suggests:




More information about the Pkg-systemd-maintainers mailing list