Bug#428399: [PATCH] Bug#428399: Fails to boot, cannot mount / partition: No such device
tags 428399 +patch
tags 428399 -moreinfo
thanks
Hi,
I had the problem, which ended up with the same message, but wasn't caused by dirty first sector of ext3 (I use xfs):
The problem was in two things:
1) init/local, in function get_fstype, contains:
if [ -x /lib/udev/vol_id ]; then
eval $(fstype "${FS}" 2> /dev/null)
else
FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null)
fi
that means, that when vol_id is ok, then fstype is used, and when is not ok, then is used.
2) I had old version of klibc-utils (1.4.xx). When I tried "fstype /dev/sda8" in the busybox shell, it ended up
with "Invalid seek" error. Then ROOTFSTYPE was set up to unknown, and that caused mount command to fail.
In my case then, even if I had working vol_id, this broken utility fstype was called instead.
To fix the problem, I suggest (patch attached):
1) switch if and else branch above
2) bump dependency on klibc-utils
best regards
diff -prNu initramfs-tools-0.89.orig/debian/control initramfs-tools-0.89/debian/control
--- initramfs-tools-0.89.orig/debian/control 2007-05-29 00:13:06.000000000 +0200
+++ initramfs-tools-0.89/debian/control 2007-07-28 18:15:07.043447696 +0200
@@ -8,7 +8,7 @@ Standards-Version: 3.7.2.2
Package: initramfs-tools
Architecture: all
-Depends: klibc-utils (>= 1.4.19-2), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1)
+Depends: klibc-utils (>= 1.5-2), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1)
Provides: linux-initramfs-tool
Description: tools for generating an initramfs
This package contains tools to create and boot an initramfs for packaged 2.6
diff -prNu initramfs-tools-0.89.orig/scripts/local initramfs-tools-0.89/scripts/local
--- initramfs-tools-0.89.orig/scripts/local 2007-07-04 00:28:13.000000000 +0200
+++ initramfs-tools-0.89/scripts/local 2007-07-28 18:13:54.036498422 +0200
@@ -10,9 +10,9 @@ get_fstype ()
# vol_id has a more complete list of file systems
if [ -x /lib/udev/vol_id ]; then
- eval $(fstype "${FS}" 2> /dev/null)
- else
FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null)
+ else
+ eval $(fstype "${FS}" 2> /dev/null)
fi
RET=$?
Reply to: