[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#525606: initramfs-tools: update-initramfs breaks if /etc/mtab is a symlink to /proc/mounts



The attached patch fixes the problem for me (udev no longer ships vol_id since 146-1).

On the other hand, the submitter seems to have ealier version of udev, so i doubt that this patch would solve the problem for him.

--
Piotr Lewandowski
--- /tmp/hook-functions	2009-10-16 22:44:02.303336858 +0200
+++ hook-functions	2009-10-16 22:44:40.000000000 +0200
@@ -239,7 +239,7 @@
 	# findout root block device + fstype
 	eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')"
 	if [ "${root}" = "/dev/root" ] ; then
-		root="/dev/disk/by-uuid/"$(/lib/udev/vol_id --uuid ${root}) 2>/dev/null
+		root="/dev/disk/by-uuid/"$(/sbin/blkid -o value -s UUID ${root}) 2>/dev/null
 	fi
 	root="$(readlink -f ${root})"
 

Reply to: