Package: extlinux Version: 2:3.85+dfsg-1 Severity: normal Attached is a transcript of an attempt to purge a removed kernel (triggering update-extlinux) on a host that uses extlinux with a static, hand-written extlinux.conf (using kernel-img.conf symlinks) rather than update-extlinux.
This issue is also triggered if one has installed extlinux but doesn't want to use it as the bootloader at all -- e.g. when one is using it to prepare bootable USB keys. IMO these use cases are valid and update-extlinux shouldn't break kernel installs/removes/purges on them by doing a hard "exit 1" when it isn't in charge. -- System Information: Debian Release: squeeze/sid Architecture: i386 (i686) Kernel: Linux 2.6.32-3-686 (SMP w/1 CPU core) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages extlinux depends on: ii libc6 2.10.2-6em1 Embedded GNU C Library: Shared lib Versions of packages extlinux recommends: ii syslinux-common 2:3.85+dfsg-1 Kernel loader which uses a FAT, ex extlinux suggests no packages. -- no debconf information
Script started on Tue 16 Mar 2010 15:39:32 EST $ aptitude search ~c c linux-image-2.6.30-2-686 - Linux 2.6.30 image on PPro/Celeron/PII/PIII/P4 c linux-image-2.6.32-2-686 - Linux 2.6.32 for modern PCs $ find /boot/ -ls 358337 4 drwxr-xr-x 2 root root 4096 Mar 16 15:34 /boot/ 358719 1236 -rw-r--r-- 1 root root 1259340 Feb 25 20:00 /boot/System.map-2.6.32-3-686 358403 1356 -rw-r--r-- 1 root root 1382584 Jan 28 16:35 /boot/initrd.img-2.6.32-trunk-686.dep 163330 0 lrwxrwxrwx 1 root root 20 Mar 16 15:08 /boot/vmlinuz -> vmlinuz-2.6.32-3-686 358392 4 -rw-r--r-- 1 root root 579 Mar 16 15:34 /boot/extlinux.conf 162967 112 -rw-r--r-- 1 root root 110091 Jan 10 20:55 /boot/config-2.6.32-trunk-686 163513 1232 -rw-r--r-- 1 root root 1254290 Jan 10 20:55 /boot/System.map-2.6.32-trunk-686 163512 2176 -rw-r--r-- 1 root root 2223264 Jan 10 20:54 /boot/vmlinuz-2.6.32-trunk-686 163329 0 lrwxrwxrwx 1 root root 23 Mar 16 15:08 /boot/initrd.img -> initrd.img-2.6.32-3-686 358385 16 -r--r--r-- 1 root root 14336 Mar 16 15:24 /boot/extlinux.sys 358949 7640 -rw-r--r-- 1 root root 7807967 Mar 16 15:08 /boot/initrd.img-2.6.32-3-686 309834 60 -rw-r--r-- 1 root root 57140 Dec 1 09:34 /boot/menu.c32 358720 112 -rw-r--r-- 1 root root 110248 Feb 25 20:00 /boot/config-2.6.32-3-686 358513 5372 -rw-r--r-- 1 root root 5486072 Jan 28 16:29 /boot/initrd.img-2.6.32-trunk-686 358473 2188 -rw-r--r-- 1 root root 2234080 Feb 25 19:59 /boot/vmlinuz-2.6.32-3-686 $ # Note how I am using my own static, hand-written extlinux.conf. $ sudo aptitude purge linux-image-2.6.30-2-686 -y Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information... Done Initializing package states... Done The following packages will be REMOVED: linux-image-2.6.30-2-686{p} 0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Writing extended state information... Done (Reading database ... 31127 files and directories currently installed.) Removing linux-image-2.6.30-2-686 ... Purging configuration files for linux-image-2.6.30-2-686 ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/extlinux 2.6.30-2-686 /boot/vmlinuz-2.6.30-2-686 + DEVICE=2.6.30-2-686 + echo -n P: Searching for EXTLINUX directory... + [ -e /boot/extlinux ] + [ -e /boot/boot/exlinux ] + [ -e /extlinux ] + [ -z ] + echo not found. + echo E: To create a template run 'mkdir /boot/extlinux' first. + echo E: To install extlinux, do it manually or try the 'extlinux-install' command. + echo E: Warning, extlinux-install is used to change your MBR. + exit 1 run-parts: /etc/kernel/postrm.d/extlinux exited with return code 1 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.30-2-686.postrm line 331. dpkg: error processing linux-image-2.6.30-2-686 (--purge): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-2.6.30-2-686 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information... Done Initializing package states... Done $ Script done on Tue 16 Mar 2010 15:42:57 EST