Package: extlinux
Version: 2:4.03+dfsg-9
Severity: important
Tags: experimental patch
Hi,
on one system I have my / partition (including /boot) on /dev/sda3. The
extlinux-update script thus correctly sets the EXTLINUX_ROOT variable to
/dev/sda3, resp. its UID. However, when the root partition is represented by
its UID in EXTLINUX_ROOT, then extlinux-postinst will call extlinux-install
with this UID, i.e. "extlinux-install ${UID-of-/dev/sda3}" instead of
"extlinux-install ${UID-of-/dev/sda}". Needless to say this won't install
/usr/lib/extlinux/mbr.bin into the MBR of the /dev/sda disk.
I think the UUID of the root partition has to get translated into the classic
device name form and then get the partition number removed. the attached patch
does right this.
- Fabian
-- System Information:
Debian Release: 6.0
APT prefers unstable
APT policy: (501, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages extlinux depends on:
ii cdebconf [debconf-2.0] 0.153 Debian Configuration Management Sy
ii debconf [debconf-2.0] 1.5.38 Debian configuration management sy
ii libc6 2.11.2-8 Embedded GNU C Library: Shared lib
Versions of packages extlinux recommends:
ii syslinux-common 2:4.03+dfsg-9 collection of boot loaders (common
ii syslinux-themes-debian 3-1 utilities for the syslinux bootloa
extlinux suggests no packages.
-- debconf information:
* extlinux/install: true
--- extlinux.postinst.orig 2011-01-20 13:16:34.000000000 +0100
+++ extlinux.postinst 2011-01-20 13:19:14.000000000 +0100
@@ -19,7 +19,8 @@
if echo ${EXTLINUX_ROOT} | grep -qs UUID
then
- _DEVICE="/dev/disk/by-uuid/$(echo
${EXTLINUX_ROOT} | awk -F= '{ print $3 }')"
+ _PARTITION="$(readlink -f
`/dev/disk/by-uuid/$(echo ${EXTLINUX_ROOT} | awk -F= '{ print $3 }')`)"
+ _DEVICE="$(echo ${_PARTITION} | sed -e
's|[0-9]||g')"
else
_DEVICE="$(echo ${EXTLINUX_ROOT} | awk
-F= '{ print $2 }' | sed -e 's|[0-9]||g')"
fi