kernel upgrade failed on a USB live system created by usb-creator

Bug #932663 reported by Eric Miao
156
This bug affects 24 people
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Fix Released
High
Unassigned
Precise
Won't Fix
Undecided
Unassigned

Bug Description

ubuntu@ubuntu:~/Downloads$ ls -l
total 37512
-rw-rw-r-- 1 ubuntu ubuntu 38365944 Feb 15 10:46 linux-image-3.2.0-16-generic_3.2.0-16.25_amd64.deb
ubuntu@ubuntu:~/Downloads$ sudo dpkg --install linux-image-3.2.0-16-generic_3.2.0-16.25_amd64.deb
Selecting previously unselected package linux-image-3.2.0-16-generic.
(Reading database ... 131642 files and directories currently installed.)
Unpacking linux-image-3.2.0-16-generic (from linux-image-3.2.0-16-generic_3.2.0-16.25_amd64.deb) ...
Done.
Setting up linux-image-3.2.0-16-generic (3.2.0-16.25) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /vmlinuz is a dangling linkto /boot/vmlinuz-3.2.0-12-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-16-generic /boot/vmlinuz-3.2.0-16-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-16-generic
cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-16-generic /boot/vmlinuz-3.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-16-generic /boot/vmlinuz-3.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-16-generic /boot/vmlinuz-3.2.0-16-generic
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
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.2.0-16-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-16-generic (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-3.2.0-16-generic
ubuntu@ubuntu:~/Downloads$

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: casper 1.303
ProcVersionSignature: Ubuntu 3.2.0-12.21-generic 3.2.2
Uname: Linux 3.2.0-12-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
CasperVersion: 1.303
Date: Wed Feb 15 11:04:48 2012
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120201.1)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: casper
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Eric Miao (eric.y.miao) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

I think casper needs to arrange for grub not to be updated on kernel upgrades. I could have sworn we'd done this already, but obviously not.

(Of course, this does still leave the question of what to do if grub2 is upgraded.)

Changed in casper (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Workaround: remove /etc/kernel/*/zz-update-grub before touching kernel packages in the live session.

Revision history for this message
Gary M (garym) wrote :

Duplicate of bug 860238 ?

Gary M (garym)
tags: added: oneiric
Revision history for this message
tekstr1der (tekstr1der) wrote :

This issue is still affecting the latest daily build of precise 12.04. Any update on progress?

Revision history for this message
letmedeletemyaaccount (letmedeletemyaaccount) wrote :

I can confirm that Colin Watson's workaround worked. I just did "sudo rm /etc/kernel/*/zz-update-grub" and "sudo apt-get dist-upgrade" worked with a couple of warnings about missing scripts!

Revision history for this message
Stéphane Graber (stgraber) wrote :

The current grub in quantal doesn't appear to complain nearly as much as it used to. A kernel update now applies just fine.

Changed in casper (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
linuxball (linuxball) wrote :

Bug still exists in quantal (Ubuntu Desktop i386 USB live). Ececuting "sudo apt-get dist-upgrade" wanted to upgrade from preinstalled package linux-image-3.5.0-17-generic (3.5.0-17.28) to linux-image-3.5.0-18-generic (3.5.0-18.29).
Errror message:
linux-image-3.5.0-18-generic (3.5.0-18.29) wird eingerichtet ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /vmlinuz is a dangling linkto /boot/vmlinuz-3.5.0-17-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-18-generic /boot/vmlinuz-3.5.0-18-generic
update-initramfs: Generating /boot/initrd.img-3.5.0-18-generic
cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.5.0-18-generic /boot/vmlinuz-3.5.0-18-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-18-generic /boot/vmlinuz-3.5.0-18-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-18-generic /boot/vmlinuz-3.5.0-18-generic
/usr/sbin/grub-probe: Fehler: Kanonischer Pfad von »/cow« konnte nicht ermittelt werden.
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.5.0-18-generic.postinst line 1010.
dpkg: Fehler beim Bearbeiten von linux-image-3.5.0-18-generic (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
Es wurde kein Apport-Bericht verfasst, da das Limit MaxReports bereits erreicht ist

Revision history for this message
linuxball (linuxball) wrote :

Colin Watson's workaround (https://bugs.launchpad.net/ubuntu/+source/casper/+bug/932663/comments/3) worked in quantal, too. I just did "sudo rm /etc/kernel/*/zz-update-grub" and "sudo apt-get dist-upgrade" worked.

Revision history for this message
Roger Hunwicks (roger-tonic-solutions) wrote :

I'm not sure why this says Fix Released - it is still happening for me on a 12.10 Live USB + persistence set up.

In fact, I got it trying to apt-get install mdadm - so it seems possible it occurs any time update-initramfs runs rather than just on a kernel update.

I suppose it is possible that if you can get the first update done using Colin Watson's workaround that future updates will work, but install from the 12.10 release Desktop iso doesn't.

Revision history for this message
David (david-in-perth) wrote :

It seems that this bug hasn't been fixed after all...

What I want to know is, if/when this is fixed, will it enable us to fix an existing liveUSB via a simple package update?
If not, will the Ubuntu 12.04.2 image at least include a fix?

Revision history for this message
C de-Avillez (hggdh2) wrote :

when you are testing compatibility/working of a new kernel update, it is quite important to be able to *boot* under it. Nominating for Precise.

Revision history for this message
David (david-in-perth) wrote :

I'm attempting to reproduce the bug by downgrading the kernel from the Raring Ringtail daily snapshot (2013-01-07) liveUSB.

Downloaded kernel image package from: https://launchpad.net/ubuntu/raring/i386/linux-image-3.7.0-6-generic/3.7.0-6.14

The actual commands are:
   wget http://launchpadlibrarian.net/125442988/linux-image-3.7.0-6-generic_3.7.0-6.14_i386.deb
   sudo dpkg -i linux-image-3.7.0-6-generic_3.7.0-6.14_i386.deb
(apologies if there are any typos)

The installation seems to have frozen early on in the process.
I'll have to try again tomorrow.

P.S. Running "sudo update-initramfs -u" produces the same symptoms for this installation as for 12.04.
That is, it displays the following two warning messages:
   cryptsetup: WARNING: failed to detect canonical device of overlayfs
   cryptsetup: WARNING: could not determine root device from /etc/fstab
and then seems to lock up (I needed to Ctrl+C out of it, although I suppose it's possible that it was doing something, only really slowly).

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

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

Changed in casper (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
David (david-in-perth) wrote :

See also: Related bug #984276.

Revision history for this message
Maurice Johnson (103730258b) wrote :

Colin Watson (cjwatson): I have followed his advice concerning the workaround w/ this apparent bug! I was stunned that this has not been corrected at this late date of 03-19-2013! Fortunately for me I am just using a live USB which is never being installed on my laptop! I feel forunate to have found these posted messages!

Revision history for this message
Maurice Johnson (103730258b) wrote :

Please note the following webpage:
https://bugs.launchpad.net/ubuntu/+source/casper-----Can anyone comment which fix is the right package to download for the 11.10 liveUSB?

Revision history for this message
James Neave (roboj1m) wrote :

I have this problem with 14.04.1
I partition a USB stick with a 1GB partition (fat32) and 31GB partition (ext4)
I create the live system with the Startup Disk Creator
I name the other partition casper-rw
I edit txt.cfg and syslinux.cfg, adding `persistant`
After booting, I perform a dist-upgrade.
There's some warnings from cryptsetup and after it's complete the system will not boot.
cjwatson's workaround no longer works.

Revision history for this message
pavel bursa (bursap) wrote :

Yes the same bug as mr neave.

Revision history for this message
pavel bursa (bursap) wrote :

Fresh install of ubuntu live 14.10 on USB stick (unetbootin), mdadm (sw raid RAID utility + postfix) install triggered:

cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab

so not ony kernel update is triggering these messages.

Revision history for this message
Mmortal03 (mmortal03) wrote :

It doesn't seem like this was fixed, or maybe it has regressed, but I'm having the same issue with 14.10, when a security update takes the kernel from 3.16.0-23.24 to 3.16.0-31.43.

I happened to use Universal-USB-Installer to create my persistent live USB copy of Lubuntu, then I used gparted to make a larger casper-rw ext2 partition than the 4GB FAT32 file limit, but that probably doesn't matter.

I get the cryptsetup warnings like everyone else, but that's only a canary in a coalmine, as you can simply remove cryptsetup, and the OS *still* won't boot after installing the updates that cause this.

I also tried Colin Watson's workaround before running the update, and this did *not* help.

So, to reproduce the bug, all I have to do in Software Updater is put a check, under security updates, next to "Generic Linux Kernel Image" and then run the update -- also, any other update that *depends* on the kernel image being updated also causes the issue.

On restart, I get ""(initramfs) Unable to find a medium containing a live file system", and it won't boot into Lubuntu.

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in casper (Ubuntu Precise):
status: Confirmed → Won't Fix
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.