Grub fails during upgrade due to lingering BTRFS information on drive

Bug #1385045 reported by jdfalk
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

Description: Ubuntu 14.10
Release: 14.10

grub-pc:
  Installed: 2.02~beta2-15
  Candidate: 2.02~beta2-15
  Version table:
 *** 2.02~beta2-15 0
        500 http://us.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
        100 /var/lib/dpkg/status

root@build:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
  g++-4.8 libept1.4.12 libgnutls28 libgssglue1 libstdc++-4.8-dev linux-headers-3.13.0-30 linux-headers-3.13.0-30-generic
  linux-image-3.13.0-30-generic linux-image-extra-3.13.0-30-generic
Use 'apt-get autoremove' to remove them.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-3.16.0-23-generic (3.16.0-23.31) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.16.0-23-generic
) points to /boot/initrd.img-3.16.0-23-generic
 (/boot/initrd.img-3.16.0-23-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-23-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.16.0-23-generic
) points to /boot/vmlinuz-3.16.0-23-generic
 (/boot/vmlinuz-3.16.0-23-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-23-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-23-generic /boot/vmlinuz-3.16.0-23-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-23-generic /boot/vmlinuz-3.16.0-23-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-23-generic /boot/vmlinuz-3.16.0-23-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-23-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-23-generic /boot/vmlinuz-3.16.0-23-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-23-generic /boot/vmlinuz-3.16.0-23-generic
Generating grub configuration file ...
grub-probe: error: disk `mduuid/1e540a9191a312e1958e545d8b42b984' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-23-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-23-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up friendly-recovery (0.2.26) ...
Generating grub configuration file ...
grub-probe: error: disk `mduuid/1e540a9191a312e1958e545d8b42b984' not found.
dpkg: error processing package friendly-recovery (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up grub-pc (2.02~beta2-15) ...
Replacing config file /etc/default/grub with new version
Generating grub configuration file ...
grub-probe: error: disk `mduuid/1e540a9191a312e1958e545d8b42b984' not found.
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-23-generic:
 linux-image-extra-3.16.0-23-generic depends on linux-image-3.16.0-23-generic; however:
  Package linux-image-3.16.0-23-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-23-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.16.0-23-generic; however:
  Package linux-image-3.16.0-23-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.16.0-23-generic; however:
  Package linux-image-extra-3.16.0-23-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.16.0.23.24); however:
  Package linux-image-generic is not cNo apport report written because MaxReports is reached already
                                                                                                    No apport report written because MaxReports is reached already
                       No apport report written because MaxReports is reached already
                                                                                     onfigured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.16.0-23-generic
 friendly-recovery
 grub-pc
 linux-image-extra-3.16.0-23-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: grub-pc 2.02~beta2-15
ProcVersionSignature: Ubuntu 3.15.0-6.11-generic 3.15.0
Uname: Linux 3.15.0-6-generic x86_64
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
Date: Thu Oct 23 21:52:10 2014
InstallationDate: Installed on 2011-12-07 (1052 days ago)
InstallationMedia: Ubuntu-Server 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 XDG_RUNTIME_DIR=<set>
SourcePackage: grub2
UpgradeStatus: Upgraded to utopic on 2014-07-03 (112 days ago)
---
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
DistroRelease: Ubuntu 14.10
InstallationDate: Installed on 2011-12-07 (1052 days ago)
InstallationMedia: Ubuntu-Server 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
Package: grub2 (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.15.0-6.11-generic 3.15.0
Tags: utopic
Uname: Linux 3.15.0-6-generic x86_64
UpgradeStatus: Upgraded to utopic on 2014-07-03 (112 days ago)
UserGroups:

_MarkForUpload: True
---
ApportVersion: 2.14.7-0ubuntu10
Architecture: amd64
DistroRelease: Ubuntu 15.04
InstallationDate: Installed on 2011-12-07 (1083 days ago)
InstallationMedia: Ubuntu-Server 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
Package: grub2 (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.16.0-24.32-generic 3.16.4
Tags: vivid
Uname: Linux 3.16.0-24-generic x86_64
UpgradeStatus: Upgraded to vivid on 2014-11-15 (9 days ago)
UserGroups:

_MarkForUpload: True
---
ApportVersion: 2.15.1-0ubuntu1
Architecture: amd64
DistroRelease: Ubuntu 15.04
InstallationDate: Installed on 2011-12-07 (1117 days ago)
InstallationMedia: Ubuntu-Server 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
Package: grub2 (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.16.0-24.32-generic 3.16.4
Tags: vivid
Uname: Linux 3.16.0-24-generic x86_64
UpgradeStatus: Upgraded to vivid on 2014-11-15 (43 days ago)
UserGroups:

_MarkForUpload: True

Revision history for this message
jdfalk (johnathan-falk) wrote :
jdfalk (johnathan-falk)
tags: added: apport-collected
description: updated
Revision history for this message
jdfalk (johnathan-falk) wrote :

Using wipefs you can see that it has the remnants of btrfs on the raw /dev/sda because I am an idiot.

root@build:~# wipefs /dev/sda
offset type
----------------------------------------------------------------
0x1fe dos [partition table]

0x10040 btrfs [filesystem]
                     LABEL: jf-002-001
                     UUID: 50f898e6-febe-486e-b8c9-bf728d7935ac

It would be useful if during the upgrade grub checks for this and spits out a more useful warning at least and tells you to run wipefs -o 0x10040 /dev/xxx to eliminate the fs. Grub updated but now it says:
/usr/sbin/grub-probe: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..

jdfalk (johnathan-falk)
tags: added: vivid
description: updated
jdfalk (johnathan-falk)
description: updated
Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Triaged → Incomplete
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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