[Bug 1104463] Re: /etc/kernel/postinst.d/zz-update-grub triggers a grub update in lxc containers
Colin Watson
cjwatson at canonical.com
Fri Jan 25 00:42:11 UTC 2013
I fixed this as the other half of bug 1060404, hence the changelog.
grub2 (2.00-12ubuntu1) raring; urgency=low
* Resynchronise with Debian. Remaining changes:
- Adjust for default Ubuntu boot options ("quiet splash").
- Default to hiding the menu; holding down Shift at boot will show it.
- Set a monochromatic theme and an appropriate background for Ubuntu.
- Apply Ubuntu GRUB Legacy changes to legacy update-grub script.
- Remove "GNU/Linux" from default distributor string.
- Add crashkernel option.
- Bypass menu unless other OSes are installed or Shift is pressed.
- Allow Shift to interrupt 'sleep --interruptible'.
- Reduce visual clutter in normal mode.
- Remove verbose messages printed before reading configuration.
- Suppress kernel/initrd progress messages, except in recovery mode.
- Show the boot menu if the previous boot failed.
- Adjust upgrade version checks for Ubuntu.
- Suppress "GRUB loading" message unless Shift is held down.
- Check hardware support before using gfxpayload=keep.
- Set vt.handoff=7 for smooth handoff to kernel graphical mode.
- In recovery mode, add nomodeset to the Linux kernel arguments, and
remove the 'set gfxpayload=keep' command.
- Skip Windows os-prober entries on Wubi systems, and suppress the menu
by default if those are the only other-OS entries.
- Handle probing striped DM-RAID devices.
- Disable cursor as early as possible in grub_main.
- Apply patch from Fedora to add a "linuxefi" loader.
- Automatically call linuxefi from linux when necessary.
- On amd64, add raw-uefi custom upload tarballs for signing.
- Generate configuration for signed UEFI kernels if available.
- Install signed images if UEFI Secure Boot is enabled.
- Output a menu entry for firmware setup on UEFI FastBoot systems.
- Stop using the /usr/share/images/desktop-base/desktop-grub.png
alternative as the fallback background.
-- Colin Watson <cjwatson at ubuntu.com> Fri, 25 Jan 2013 00:36:50 +0000
grub2 (2.00-12) experimental; urgency=low
* Silence output from running-in-container.
* Also skip update-grub when running in a container (LP: #1060404).
-- Colin Watson <cjwatson at debian.org> Thu, 24 Jan 2013 23:21:48 +0000
** Changed in: grub2 (Ubuntu)
Status: New => Fix Released
** Changed in: grub2 (Ubuntu)
Assignee: (unassigned) => Colin Watson (cjwatson)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1104463
Title:
/etc/kernel/postinst.d/zz-update-grub triggers a grub update in lxc
containers
Status in “grub2” package in Ubuntu:
Fix Released
Bug description:
Before anyone points it out, this is NOT a duplicate of bug 1060404,
just a different but extremely similar problem :)
So I'm doing 12.10 => 13.04 desktop upgrade testing in a container.
That means setting up a full dekstop 12.10 system, including grub and
kernel, then dist-upgrading that to 13.04.
In the past, this used to fail because of bug 1060404 but now that it's been fixed, I'm getting into a different problem bcause of zz-update-grub calling update-grub, bypassing the check added to grub's postinst and causing a similar error:
===
Setting up linux-image-3.8.0-1-generic (3.8.0-1.5) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-1-generic /boot/vmlinuz-3.8.0-1-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-1-generic /boot/vmlinuz-3.8.0-1-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-1-generic
cryptsetup: WARNING: could not determine root device from /etc/fstab
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.8.0-1-generic /boot/vmlinuz-3.8.0-1-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.8.0-1-generic /boot/vmlinuz-3.8.0-1-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8.0-1-generic /boot/vmlinuz-3.8.0-1-generic
/usr/sbin/grub-probe: error: failed to get canonical path of /dev/mapper/castiana-home.
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.8.0-1-generic.postinst line 1010.
dpkg: error processing linux-image-3.8.0-1-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-image-extra-3.8.0-1-generic:
linux-image-extra-3.8.0-1-generic depends on linux-image-3.8.0-1-generic; however:
Package linux-image-3.8.0-1-generic is not configured yet.
dpkg: error processing linux-image-extra-3.8.0-1-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-3.8.0-1-generic; however:
Package linux-image-3.8.0-1-generic is not configured yet.
linux-image-generic depends on linux-image-extra-3.8.0-1-generic; however:
Package linux-image-extra-3.8.0-1-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.8.0.1.14); however:No apport report written because MaxReports is reached already
Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-3.8.0-1-generic
linux-image-extra-3.8.0-1-generic
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
===
Proposed ways of fixing this as discussed in #ubuntu-devel include:
- Make update-grub exit 0 if running-in-container returns 0
- Patch just zz-update-grub with a similar check
- Make the scripts check for the presence of the device and only then attempt to read/write to it (but limit that check to containers)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1104463/+subscriptions
More information about the foundations-bugs
mailing list