Package: syslinux-stuff
Version: 3:6.03~pre18+dfsg-1
Tags: patch

Configuring the packet gives:

E: cannot access "/dev/root": No such device
dpkg: error processing package syslinux-stuff (--configure):
 subprocess installed post-installation script returned error exit status 1

This is because in syslinux-stuff.postinst the following will be called:

extlinux-install /dev/root

The kernel is started with this cmdline (no modules, no initrd):

root=/dev/sda1 ro rootfstype=ext4 BOOT_IMAGE=/boot/vmlinuz-3.15.1

# findmnt -n --raw -c -o SOURCE /
/dev/root

# ls -l /dev/root
ls: cannot access /dev/root: No such file or directory

# cat /proc/mounts | awk '{ print $1 " " $2 }' | grep /$
rootfs /
/dev/root /

The attached patch solves the problem.

--- syslinux-stuff.postinst.orig	2014-07-08 21:52:18.973427876 +0200
+++ syslinux-stuff.postinst	2014-07-08 21:57:25.786769348 +0200
@@ -29,6 +29,11 @@ case "${1}" in
 
 					_PATH="$(dirname ${_PATH})"
 				done
+				if [ "${_DEVICE}" = "/dev/root" ]
+				then
+					_NODE="$(grep /dev/root /proc/self/mountinfo | awk '{ print $3 }')"
+					_DEVICE="$(tail -n +3 /proc/partitions | awk '{ print $1 ":" $2 " " $4 }' | grep "${_NODE} " | awk '{ print "/dev/" $2 }')"
+				fi
 
 				extlinux-install "${_DEVICE}"
 				;;

Reply via email to