Package: extlinux
Version: 2:4.05+dfsg-1
Followup-For: Bug #653188
Dear Maintainer,
I have the exact same problem, and looking at the postinst script
I believe that the conclusion that lead to closing this bug was
wrong. The postinst script calls "df -P" to detect the device
where extlinux is installed. This means that it does in fact
use the /etc/mtab data.
The script does:
_DEVICE="$(df -P /boot/extlinux | tail -1 | awk '{ print $1 }' | sed -e
's|[0-9]||g')"
and with /etc/mtab symlinked to /proc/mounts I get:
frtest3:~# df -P /boot/extlinux
Filesystem 1024-blocks Used
Available Capacity Mounted on
/dev/disk/by-uuid/0d3e856e-8f99-4b3e-8d4f-37a65486930b 1913244 1524980
291076 84% /
and hence the result:
Setting up extlinux (2:4.05+dfsg-1) ...
P: extlinux-update is disabled in /etc/default/extlinux.
E: cannot access "/dev/disk/by-uuid/dee-f-be-df-ab": No such device
dpkg: error processing extlinux (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
extlinux
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now, for this particular case we could probably fix it by adding a
call to readlink:
frtest3:~# readlink -f /dev/disk/by-uuid/0d3e856e-8f99-4b3e-8d4f-37a65486930b
/dev/vda1
but there are other failure modes which cannot be solved that easily. What
should
happen here for example:
bjorn@canardo:~$ df -P /boot/extlinux
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/md0 253807 51528 189178 22% /boot
So I think the whole device calculation logic in postinst needs some
serious rethinking. At the very least, it should not cause a fatal
error as long as the logic is as error prone as it currently is.
Maybe it is sufficient to exit silently in case the logic fails to
map to an existing disk device? So just test for it existing before
actually calling extlinux-install? Primitive approach:
frtest3:~# diff -u /var/lib/dpkg/info/extlinux.postinst{.orig,}
--- /var/lib/dpkg/info/extlinux.postinst.orig 2011-12-23 16:14:30.000000000
+0100
+++ /var/lib/dpkg/info/extlinux.postinst 2012-01-07 16:49:25.000000000
+0100
@@ -17,7 +17,7 @@
_DEVICE="$(df -P /boot/extlinux | tail -1 | awk
'{ print $1 }' | sed -e 's|[0-9]||g')"
- extlinux-install "${_DEVICE}"
+ [ -b "${_DEVICE}" ] && extlinux-install
"${_DEVICE}"
;;
*)
But a better approach would be fixing the extlinux-install to
actually do this correct by itself.
Bjørn
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages extlinux depends on:
ii debconf [debconf-2.0] 1.5.41
ii libc6 2.13-24
Versions of packages extlinux recommends:
pn syslinux-common 2:4.05+dfsg-1
pn syslinux-themes-debian <none>
extlinux suggests no packages.
-- debconf information:
* extlinux/install: true
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]