[Bug 1104463] Re: /etc/kernel/postinst.d/zz-update-grub triggers a grub update in lxc containers
Colin Watson
cjwatson at canonical.com
Thu Jan 24 23:21:33 UTC 2013
"Skip update-grub in containers" is already in Debian/experimental/bzr
for now, just not yet in raring. Sure, it's not really the best answer
- but it'll do for the moment.
I actually prefer Adam's option one, because leaving manual calls to
update-grub broken makes it clear that GRUB isn't really functional in
this environment.
--
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:
New
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