Code:
danny@pimpbox ~ ⚘ uname -a 18:10:36
Linux pimpbox 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
danny@pimpbox ~ ⚘ uname -r 18:12:29
3.13.0-24-generic
danny@pimpbox ~ ⚘ ls /boot/vmlinuz* $? 1 18:12:50
-rw------- 1 root root 5.8M May 2 19:30 /boot/vmlinuz-3.13.0-24-generic
-rw------- 1 root root 5.8M May 15 14:07 /boot/vmlinuz-3.13.0-27-generic
The chroot adventure also returned very little.
Code:
root@pimpbox:~# sudo apt-get purge linux-image-extra-3.5.0-49-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-3.13.0-24-generic linux-image-3.13.0-27-generic linux-image-extra-3.13.0-24-generic linux-image-extra-3.13.0-27-generic linux-image-extra-3.5.0-49-generic*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 386 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 368953 files and directories currently installed.)
Removing linux-image-extra-3.13.0-24-generic (3.13.0-24.47) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
Generating grub configuration file ...
Found background: /usr/share/desktop-base/bugpokemondesktop.jpg
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.13.0-24-generic.postrm line 328.
dpkg: error processing package linux-image-extra-3.13.0-24-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.13.0-24-generic (3.13.0-24.47) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
Generating grub configuration file ...
Found background: /usr/share/desktop-base/bugpokemondesktop.jpg
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.13.0-24-generic.postrm line 328.
dpkg: error processing package linux-image-3.13.0-24-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.13.0-27-generic (3.13.0-27.50) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-27-generic /boot/vmlinuz-3.13.0-27-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-27-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-27-generic /boot/vmlinuz-3.13.0-27-generic
Generating grub configuration file ...
Found background: /usr/share/desktop-base/bugpokemondesktop.jpg
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.13.0-27-generic.postrm line 328.
dpkg: error processing package linux-image-extra-3.13.0-27-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.13.0-27-generic (3.13.0-27.50) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-27-generic /boot/vmlinuz-3.13.0-27-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-27-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-27-generic /boot/vmlinuz-3.13.0-27-generic
Generating grub configuration file ...
Found background: /usr/share/desktop-base/bugpokemondesktop.jpg
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.13.0-27-generic.postrm line 328.
dpkg: error processing package linux-image-3.13.0-27-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-extra-3.13.0-24-generic
linux-image-3.13.0-24-generic
linux-image-extra-3.13.0-27-generic
linux-image-3.13.0-27-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@pimpbox:~# dpkg --list | grep linux-image
rH linux-image-3.13.0-24-generic 3.13.0-24.47 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rH linux-image-3.13.0-27-generic 3.13.0-27.50 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rH linux-image-extra-3.13.0-24-generic 3.13.0-24.47 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rH linux-image-extra-3.13.0-27-generic 3.13.0-27.50 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc linux-image-extra-3.5.0-49-generic 3.5.0-49.74 amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP
root@pimpbox:~#
I suppose I am glad that it didn't end up deleting my current kernels, that would have been extremely annoying.
One thing I did notice: I modified my /etc/kernel/postinst.d/zz-update-grub, commenting out the if block:
Code:
#! /bin/sh
set -e
which update-grub >/dev/null 2>&1 || exit 0
if type running-in-container >/dev/null 2>&1 && \
running-in-container >/dev/null; then
exit 0
fi
set -- $DEB_MAINT_PARAMS
mode="${1#\'}"
mode="${mode%\'}"
case $0:$mode in
# Only run on postinst configure and postrm remove, to avoid wasting
# time by calling update-grub multiple times on upgrade and removal.
# Also run if we have no DEB_MAINT_PARAMS, in order to work with old
# kernel packages.
*/postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
# if [ -e /boot/grub/grub.cfg ]; then
# exec update-grub
# fi
;;
esac
exit 0
This actually allowed me to install packages again! So it appears there is a problem with the update-grub script itself, which as shown before is essentially a no-op right now for reasons unknown. However, I then tried to see if this would make the commands you specified work; it didn't, giving the same issue as before.
I looked more closely at the offending files, though, and found there was a portion (at around line 328) that explicitly commanded the installation to go belly-up. I'm sure there was a very good reason for them being there, but they were screwing up my install, so I tried commenting them out. The section is this, in /var/lib/dpkg/info/linux-image{-extra,}-3.13.0-{24,27}-generic.post{inst,rm}:
Code:
#if (-d "/etc/kernel/postinst.d") {
# print STDERR "Examining /etc/kernel/postinst.d.\n";
# system ("run-parts --verbose --exit-on-error --arg=$version " .
# "--arg=$realimageloc$kimage-$version " .
# "/etc/kernel/postinst.d") &&
# die "Failed to process /etc/kernel/postinst.d";
#}
#
#if (-d "/etc/kernel/postinst.d/$version") {
# print STDERR "Examining /etc/kernel/postinst.d/$version.\n";
# system ("run-parts --verbose --exit-on-error --arg=$version " .
# "--arg=$realimageloc$kimage-$version " .
# "/etc/kernel/postinst.d/$version") &&
# die "Failed to process /etc/kernel/postinst.d/$version";
#}
They weren't commented out previously, I commented them out myself. After commenting out that section for all the files matching the regular expression above, using those commands and purging previous kernels worked fine. So that problem is solved.
The problem remains, though, that my update-grub script isn't working. My /etc/default/grub is this:
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=2
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_BACKGROUND="/usr/share/desktop-base/bugpokemondesktop.jpg"
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
I'm not sure what among there might cause it not to update. As shown before, it merely recognizes the found background image, then stops. Are there any issues in other files that could be causing it to fail?
Bookmarks