package grub-pc 2.02~beta2-9ubuntu1 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Bug #1351414 reported by Erick Brunzell
56
This bug affects 13 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Just performed an Ubuntu Precise + Trusty HWE -> Trusty release upgrade test as a follow up to bug #1348067 and bug #1347964, also in part because people are driving me nuts wondering why their Precise installs aren't yet offering the upgrade to Trusty, and during the upgrade I was only offered the option of installing grub to the mbr of any of my three connected drives, but I wanted it in the pbr of the partition where the OS resided so I left all boxes unchecked and proceeded. Then on reboot apport offered to file this bug so here I am.

There are additional problems regarding the clean-up of old kernels as shown here:

lance@lance-desktop:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpostproc52
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-image-3.11.0-15-generic linux-image-3.11.0-26-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 310 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 171480 files and directories currently installed.)
Removing linux-image-3.11.0-15-generic (3.11.0-15.25~precise1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-15-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/disk/by-uuid/9305c825-bbef-4222-a3c8-9c87483e0592'.
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.11.0-15-generic.postrm line 328.
dpkg: error processing package linux-image-3.11.0-15-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-26-generic (3.11.0-26.45~precise1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-26-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/disk/by-uuid/9305c825-bbef-4222-a3c8-9c87483e0592'.
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.11.0-26-generic.postrm line 328.
dpkg: error processing package linux-image-3.11.0-26-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.11.0-15-generic
 linux-image-3.11.0-26-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sort of odd though that apport shows linux 3.11* not being an official ubuntu package. You can see here that a number of errors popped up on first boot:

lance@lance-desktop:~$ ls /var/crash
grub-pc.0.crash
grub-pc.0.upload
grub-pc.0.uploaded
linux-image-3.11.0-15-generic.0.crash
linux-image-3.11.0-15-generic.0.upload
linux-image-3.11.0-15-generic.0.uploaded
linux-image-3.11.0-26-generic.0.crash
linux-image-3.11.0-26-generic.0.upload
linux-image-3.11.0-26-generic.0.uploaded
_usr_lib_i386-linux-gnu_libgtk-3-0_gtk-update-icon-cache-3.0.0.crash
_usr_lib_i386-linux-gnu_libgtk-3-0_gtk-update-icon-cache-3.0.0.upload
_usr_lib_i386-linux-gnu_libgtk-3-0_gtk-update-icon-cache-3.0.0.uploaded
_usr_sbin_cupsd.0.crash
_usr_sbin_cupsd.0.upload
_usr_sbin_cupsd.0.uploaded
_usr_share_apport_apport-gtk.0.crash

So I assume that Precise -> Trusty upgrades are not being offered yet for a reason ;^)

BTW at first blush I think this may be a duplicate of bug #1311543 but since it's marked invalid I decided to let apport do it's thing.

Sorry to be a pain in the neck.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: grub-pc
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic i686
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
Date: Fri Aug 1 11:41:29 2014
DuplicateSignature: package:grub-pc:2.02~beta2-9ubuntu1:ErrorMessage: subprocess installed post-installation script returned error exit status 1
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2014-07-24 (7 days ago)
InstallationMedia: Ubuntu 12.04.4 LTS "Precise Pangolin" - Release i386 (20140204)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-32-generic root=UUID=9305c825-bbef-4222-a3c8-9c87483e0592 ro quiet splash
SourcePackage: grub2
Title: package grub-pc 2.02~beta2-9ubuntu1 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2014-08-01 (0 days ago)

Revision history for this message
Erick Brunzell (lbsolost) wrote :
tags: added: ubuntu-release-upgrader
Revision history for this message
Erick Brunzell (lbsolost) wrote :
Download full text (4.7 KiB)

That kernel business appears to have cleaned up after reboot:

lance@lance-desktop:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpostproc52
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-image-3.11.0-15-generic linux-image-3.11.0-26-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 310 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 171480 files and directories currently installed.)
Removing linux-image-3.11.0-15-generic (3.11.0-15.25~precise1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-15-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-32-generic
Found initrd image: /boot/initrd.img-3.13.0-32-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda1
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda10
Found Ubuntu Utopic Unicorn (development branch) (14.10) on /dev/sda11
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda12
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda13
Found Ubuntu 13.10 (13.10) on /dev/sda14
Found Ubuntu Utopic Unicorn (development branch) (14.10) on /dev/sda15
Found Ubuntu 12.04.4 LTS (12.04) on /dev/sda2
Found Ubuntu 12.04.4 LTS (12.04) on /dev/sda3
Found Ubuntu 12.04.4 LTS (12.04) on /dev/sda6
Found Ubuntu 12.04.4 LTS (12.04) on /dev/sda7
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda8
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda9
Found Ubuntu Utopic Unicorn (development branch) (14.10) on /dev/sdb1
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sdc1
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
 you may need to re-run your boot loader[grub]
Removing linux-image-3.11.0-26-generic (3.11.0-26.45~precise1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-26-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-32-generic
Found initrd image: /boot/initrd.img-3.13.0-32-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda1
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda10
Found Ubuntu Utopic Unicorn (development branch) (14.10) on /dev/sda11
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda12
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda13
F...

Read more...

Revision history for this message
Erick Brunzell (lbsolost) wrote :

No real surprise running dpkg-reconfigure grub-pc, nothing selected as shown in the screenshot so I selected sda16. No partition was offered as an option during the upgrade however - so that may be the root of the problem???

tags: removed: need-duplicate-check
Revision history for this message
Erick Brunzell (lbsolost) wrote :

There are some slight similarities to bug #1289977.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

I performed a couple more upgrade tests and this really is quite a corner issue. It seems that the OS being upgraded must be on drive sda and grub must be installed in the pbr rather than the mbr for the user to even be confronted with the dialog window asking where to install grub. Since only the mbr's of the existing drives appear as choices, if the user selects nothing it triggers this bug which also results in not all old kernels being cleaned up, but it can be resolved post-upgrade by running "sudo update-grub" followed by "apt-get -f install".

So I suppose it could be argued that whenever the criteria is met for the upgrade process to display the grub-install dialog that the pbr of the appropriate partition(s) should be displayed as well as just mbrs. Regardless I think it's a low priority bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

The relevant error appears to be this:

/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/disk/by-uuid/9305c825-bbef-4222-a3c8-9c87483e0592'

Can you post the output of blkid?

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Erick Brunzell (lbsolost) wrote :

I've long since wiped those test installs/upgrades and I'd only seen that while testing 14.04.1, not while testing 14.10, so I'll likely just let this expire.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.