Ubuntu

MASTER update-initramfs is disabled since running on a live CD but it is running from a flash drive.

Reported by mjaniszewski2 on 2008-11-01
952
This bug affects 27 people
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
High
Evan Dandrea
Intrepid
High
Unassigned
Jaunty
High
Evan Dandrea
initramfs-tools (Ubuntu)
Undecided
Unassigned
Intrepid
Undecided
Unassigned
Jaunty
Undecided
Unassigned
linux (Ubuntu)
Undecided
Unassigned
Intrepid
Undecided
Unassigned
Jaunty
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6.27-7-generic

unaltered ibex, ran from usb pendrive - prepared by "create a usb startup disk". I ran update manager to update packages and played some mp3 file from hard disk, when the update manager reported an error, moreover the totem player hang.

The kernel upgrade fail with the following message:
Setting up linux-image-2.6.27-7-generic (2.6.27-7.14) ...
Running depmod.
update-initramfs is disabled since running on a live CD
Failed to symbolic-link /boot/initrd.img-2.6.27-7-generic to initrd.img.
dpkg: error processing linux-image-2.6.27-7-generic (--configure):
 subprocess post-installation script returned error exit status 17

:: Rationale ::
If it's not possible to upgrade the kernel, that's fine. But in that case, the kernel version should be locked for live CD / live USB bootups. (e.g. in Synaptic via "Lock Version" in the "Package")

Currently, "sudo apt-get upgrade" is forever broken, because it always tries & fails to install the kernel update. This is a huge turn-off for anyone trying out "usb-creator"-built persistent USB installations.

:: Workaround ::
Workaround discussed here: http://kubuntuforums.net/forums/index.php?topic=3096170
in brief
"A bit of digging has revealed that the /usr/sbin/update-initramfs script is a stub on the live CD (or the bootable USB drive made from a live CD). The original version can be found in:

/rofs/usr/sbin/update-initramfs
so you can (as root):
mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old
and then:
ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs
"
Thanks to latchkeyed for providing this info.

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 8.10
ErrorMessage: podproces post-installation script zwrócił kod błędu 17
Package: linux-image-2.6.27-7-generic 2.6.27-7.15
ProcCmdLine: BOOT_IMAGE=/casper/vmlinuz noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/hostname.seed boot=casper initrd=/casper/initrd.gz quiet splash -- debian-installer/language=pl console-setup/layoutcode?=pl
ProcVersionSignature: Ubuntu 2.6.27-7.14-generic
SourcePackage: linux
Title: package linux-image-2.6.27-7-generic 2.6.27-7.15 failed to install/upgrade: podproces post-installation script zwrócił kod błędu 17

mjaniszewski2 (mjaniszewski2) wrote :
Daniel Holbert (dholbert) wrote :

See also bug 290730 (related, possibly a duplicate)

Changed in linux:
importance: Undecided → Low
status: New → Triaged
description: updated
description: updated

The attempted upgrade on my system then caused the USB memory stick to not be recognized as a boot device. To be clear, this memory stick had successfully been used to boot a Lenovo T500 laptop. An upgrade was attempted, initiated from the upgrade manager, which failed in the now well reported bug. Following this the USB Stick was not recognised as bootable media when the same laptop was rebooted.

Rational for building the USB Memory Stick from a Live CD was because core system is an AMD-64 bit version of Ubuntu. I specifically wanted the memory stick to boot an I386 based laptop and desktop.

Advantages of having a USB memory stick boot are so many to list.

This issue does also pop up on livecds, though its hardly as critical of an issue, as it does not stop it from booting since you can just reboot and restart. However, it does break apt-get. The reason i used the update feature on a livecd in the first place is because ubiquity crashed and i was trying to report the crash, however it told me i had outdated packages.

Now, because of this bug, i can report bugs, but apt-get is broken. So while not as critical, its a big issue on livecds as well. Just thought i'd bring it up since all the duplicates as well as this one seem to focus specifically on the USB boot side of things.

zoostation (zoothousand-one) wrote :

This isn't limited to upgrading from USB or CD. I upgraded from 8.04 to 8.10 straight off the internet, and upon my first aptitude update & upgrade this problem occurred.

Descention (descention) wrote :

I'm still a novice with reporting bugs, but I have this same issue. If there is anything I can submit that would help with this issue, please let me know.

latchkeyed (ian-cloudwatcher) wrote :

Workaround discussed here: http://kubuntuforums.net/forums/index.php?topic=3096170

in brief
"A bit of digging has revealed that the /usr/sbin/update-initramfs script is a stub on the live CD (or the bootable USB drive made from a live CD). The original version can be found in:

/rofs/usr/sbin/update-initramfs

so you can (as root):

mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old

and then:

ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs
"

seanlynch (sean-seanlynch) wrote :

I can confirm that the above workaround from latchkeyed works when done in a Xubuntu persistent install to flash drive.

$ sudo su

to go to root user in terminal.

then

# mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old

and then

# ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs

description: updated
Tristan Guez (tguez) wrote :

The workaround seems to work, however I didn't rebooted yet!

Thank you all for the whole great work done!

Bruno Sarlo (bsarlo) wrote :

this workaround don't work for me. I'm working from a pendrive ubuntu installation

freekngdom (freekngdom) wrote :

The workaround seemed to work, although when I tried to reboot, the flash drive was no longer recognized as a boot device.

freekngdom (freekngdom) wrote :

Nevermind, removing and re-inserting flash drive into computer seemed to solve.

Workaround worked fine for me. Was able to upgrade, reboot, etc. without any
strange problems.

On Mon, Dec 22, 2008 at 5:48 PM, freekngdom <email address hidden> wrote:

> Nevermind, removing and re-inserting flash drive into computer seemed to
> solve.
>
> --
> MASTER update-initramfs is disabled since running on a live CD but it is
> running from a flash drive.
> https://bugs.launchpad.net/bugs/292159
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "linux" source package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: linux-image-2.6.27-7-generic
>
> unaltered ibex, ran from usb pendrive - prepared by "create a usb startup
> disk". I ran update manager to update packages and played some mp3 file from
> hard disk, when the update manager reported an error, moreover the totem
> player hang.
>
> The kernel upgrade fail with the following message:
> Setting up linux-image-2.6.27-7-generic (2.6.27-7.14) ...
> Running depmod.
> update-initramfs is disabled since running on a live CD
> Failed to symbolic-link /boot/initrd.img-2.6.27-7-generic to initrd.img.
> dpkg: error processing linux-image-2.6.27-7-generic (--configure):
> subprocess post-installation script returned error exit status 17
>
> :: Rationale ::
> If it's not possible to upgrade the kernel, that's fine. But in that case,
> the kernel version should be locked for live CD / live USB bootups. (e.g. in
> Synaptic via "Lock Version" in the "Package")
>
> Currently, "sudo apt-get upgrade" is forever broken, because it always
> tries & fails to install the kernel update. This is a huge turn-off for
> anyone trying out "usb-creator"-built persistent USB installations.
>
> :: Workaround ::
> Workaround discussed here:
> http://kubuntuforums.net/forums/index.php?topic=3096170
> in brief
> "A bit of digging has revealed that the /usr/sbin/update-initramfs script
> is a stub on the live CD (or the bootable USB drive made from a live CD).
> The original version can be found in:
>
> /rofs/usr/sbin/update-initramfs
> so you can (as root):
> mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old
> and then:
> ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs
> "
> Thanks to latchkeyed for providing this info.
>
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 8.10
> ErrorMessage: podproces post-installation script zwrócił kod błędu 17
> Package: linux-image-2.6.27-7-generic 2.6.27-7.15
> ProcCmdLine: BOOT_IMAGE=/casper/vmlinuz noprompt cdrom-detect/try-usb=true
> persistent file=/cdrom/preseed/hostname.seed boot=casper
> initrd=/casper/initrd.gz quiet splash -- debian-installer/language=pl
> console-setup/layoutcode?=pl
> ProcVersionSignature: Ubuntu 2.6.27-7.14-generic
> SourcePackage: linux
> Title: package linux-image-2.6.27-7-generic 2.6.27-7.15 failed to
> install/upgrade: podproces post-installation script zwrócił kod błędu 17
>

Manan Desai (mananbdesai) wrote :

Workaround works like a charm! I am able to update USB ibex very well.

Vit Svarc (vs-pb) wrote :

Link change helped me too. But the system is still booting the old kernel. What to change to boot the last kernel? (Ubuntu 8.10 on USB persistant)

chipmaker75 (chipmaker75) wrote :

After performing the solution, is there a way to upgrade to the newest available kernel?

Notch-1 (n1-notch-1) wrote :

hi, the workaround solved the first problem but now i got a new error:

Spacchetto il sostituto di linux-image-2.6.27-7-generic ...
dpkg: errore processando /var/cache/apt/archives/linux-image-2.6.27-7-generic_2.6.27-7.16_i386.deb (--unpack):
 impossibile creare il link per la copia di sicurezza di `./lib/modules/2.6.27-7-generic/initrd/vesafb.ko' prima di installarne la nuova versione: Errore di I/O
Selezionato il pacchetto linux-image-2.6.27-9-generic, che non lo era.
Spacchetto linux-image-2.6.27-9-generic (da .../linux-image-2.6.27-9-generic_2.6.27-9.19_i386.deb) ...
Done.
...
...
Processing triggers for man-db ...
Sono occorsi degli errori processando:
 /var/cache/apt/archives/linux-image-2.6.27-7-generic_2.6.27-7.16_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

my procedure was:
1) install kubuntu intrepid to hd and boot it
2) update apt-get and install usb-creator
3) dist-upgrade and reboot
5) run usb-creator and create a 3.8 gb persistent file in my 16gb pendrive (using the same kubuntu cd, reinserted into the cd drive after the reboot, as base image)
6) halt, unplug and replug the pendrive (this little things are evil) and boot again, this time from the pendrive
7) apply the workaround(s) so:

sudo mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old
sudo ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs
sudo killall hald
sudo aa-complain /usr/sbin/cupsd

the last commad shows:

Setting /usr/sbin/cupsd to complain mode.
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

and then sudo apt-get clean ; sudo apt-get update ; sudo apt-get dist-upgrade ... and the error.
See the attached file for dmesg output and the complete dist-upgrade log, and tell me if you need anything else...thanks

Confirmed-Workaround fixes the problem.

Can a fix be released for this?

Correction-The upgrade has broken HAL, GParted, and Firefox even with the workaround implemented.

I will reinstall Ubuntu on the flash drive and disable updates. I use this flash drive to run Ubuntu on school computers, due to Windows insecurity and instability.

Notch-1 (n1-notch-1) wrote :

The fresh installation is very unstable, X crashes every 5 minutes even if i do nothing, how can you use it? IMHO the persistent/live/casper mode is useless without a working upgrade system...
How about to set this bug to a higher importance?
Thanks

Agreed, this is is an important feature as Ubuntu moves forward and needs to be correctly implemented. This bug should be at medium, or even high priority.

abdool (abed-badawi) wrote :

FC10 is beating Interped in this point, persistent usb is working with
updates 100% without any problem

On Tue, Jan 13, 2009 at 3:09 AM, Pi Boy <email address hidden> wrote:

> Agreed, this is is an important feature as Ubuntu moves forward and
> needs to be correctly implemented. This bug should be at medium, or
> even high priority.
>
> --
> MASTER update-initramfs is disabled since running on a live CD but it is
> running from a flash drive.
> https://bugs.launchpad.net/bugs/292159
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
Kind regards,

Abed

Colin Watson (cjwatson) wrote :

This is really a casper bug; in the event that we're running from a USB stick, the update-initramfs script needs to be adjusted to run the real (diverted) update-initramfs, then copy the new kernel and initramfs out to "/cdrom" (actually the outer filesystem on the USB stick).

Changed in linux:
assignee: nobody → evand
Changed in casper:
importance: Low → High

If the problem is with update-initramfs, why do other packages break?

Colin Watson (cjwatson) wrote :

Simple: because other packages call update-initramfs as part of their configuration process ...

jruss (jruss) wrote :

Adding the link to update-initramfs is working for me. However I would like to update my kernel. As Colin said update-initramfs should update the real kernel that is located in "/cdrom". I was wondering how to go about doing this manually until things are fixed. I tried copying vmlinuz and initrd.img from "/" to "/cdrom/casper". I gzipped initrd.img and saved it as initrd.gz, (since the previous file had a gz extension, I assumed it was gzipped). However, when I boot this up it just gives me a kernel panic. What would be the proper way to manually update the kernel on a persistent usb drive?

Id2ndR (id2ndr) wrote :

I was trying to install bootchart on jaunty live usb (with casper-rw) when I got the same error. I didn't tried the woraround yet because I'm not sure it will allow me to use bootchart with the boot=casper option.

Notch-1 (n1-notch-1) wrote :

jruss: the initrd.img is already gzipped (try "file /boot/initrd-VERSION.img" and you'll see), so just move it to /cdrom/casper/initrd.gz and it will work.
...And the kernel is in /cdrom/casper too (not /cdrom)...
Btw now i'm about to use simple loop images, because aufs has toooooo many bugs and stranges behaviors (at least for me) :P maybe i should post a simple installation script when i'm done...
thank you for the help, anyway

andybleaden (andy-bleaden) wrote :

coolio that seemed to work for me so many many thanks

I got the workaround to work! I stil can't update the kernel, though. . .

I'm getting the same message as Notch-1 after implementing the workaround:

Setting up linux-image-2.6.27-7-generic (2.6.27-7.16) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
Failed to symbolic-link boot/initrd.img-2.6.27-7-generic to initrd.img.
dpkg: error processing linux-image-2.6.27-7-generic (--configure):
 subprocess post-installation script returned error exit status 17
Errors were encountered while processing:
 linux-image-2.6.27-7-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm not sure if this means I did something wrong in implementing?

My wireless connection was also working before I implemented the workaround and now it's not (though Ubuntu is still reporting my drivers are installed) and I suspect this may have something to do with the inability to get this kernel upgrade.

I have been able to install packages to my Intrepid installation with a wired connection and they seem to be working fine (I installed Apache2, PHP, MySQL, and phpMyAdmin)

My flash drive installation is via Portable Linux so I have a GRUB menu. Install was done from a Hardy install using an Intrepid LiveCD for the image.

Bowmore (bowmore) wrote :

The two workarounds together works for me when running in live mode, i.e.

1) kernel updates work
2) running the latest kernel works

Including the second workaround, i.e. replacing
/cdrom/casper/initrd.gz and vmlinuz with the updated ones
though made a following test installation on harddisk unbootable.

The message I got was:
Starting up ...
[9.112117] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

This was due to that initrd.img was missing in
- /boot folder
- /boot/grub/menu.lst

Strange, but adding the initrd.img to both those places made the test installation boot up.

However, the pointer didn't respond to mouse movements and the network didn't connect, i.e. got stuck in trying to connect to the network. So I assume there is something still missing to be able to use an updated LiveUSB for new installations.

Before copying the updated initrd.gz and vmlinuz to /cdrom/casper installations worked. Furthermore, I also tried to copy the missing abi, config, System.map and vmcoreinfo files from the USB to the test installation but that didn't change anything.

Colin Watson (cjwatson) on 2009-02-13
Changed in casper:
milestone: none → ubuntu-9.04-beta
Adam Gundy (adam-starsilk) wrote :

Kristen... I got the same behavior. it seemed to be because I had *two* kernel versions installed, 2.6.27-7 and 2.6.27-11.

the 2.6.27-11 version had been installed (badly) before I fixed the mkinitramfs program, so the symbolic link to it from /initrd.img was broken - this seems to prevent other kernels installing properly. I fixed it by running 'sudo dpkg-reconfigure linux-image-2.6.27-11-generic' (note the '11'), which built the correct files, and fixed the link. after that, apt-get dist-upgrade succeeded in correctly installing the '7' kernel.

Thank you Adam, your fix worked for me! My wireless connection is working again now as well and all looks good thus far...

Moonspell (cbmoon) wrote :

thx :)

as root:

mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old

and...

ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs

and then

sudo dpkg-reconfigure linux-image-2.6.27-11-generic

worked just fine for me with ubuntu persistent install to flash drive.

Juanje Ojeda (juanje) wrote :

I tried to upgrade the kernel from Jaunty CDROM and USB live and on both cases it did work for me. With no workaround.

I use Jaunty Apha 4 and after launch I tried the upgrade.

Has someone still problems with that in Jaunty?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.162

---------------
casper (1.162) jaunty; urgency=low

  * If /cdrom is writable, call the diverted update-initramfs and copy
    the resulting kernel and initrd to /cdrom/casper (LP: #292159).

 -- Evan Dandrea <email address hidden> Tue, 10 Mar 2009 14:36:30 +0000

Changed in casper:
status: Triaged → Fix Released

Closing linux task as Colin pointed out this was a casper bug - https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/292159/comments/24

Changed in linux (Ubuntu Jaunty):
status: New → Invalid
chipmaker75 (chipmaker75) wrote :

How can I upgrade to casper 1.162? The latest version available in Synaptic is 1.152.

Matt Zimmerman (mdz) wrote :

Installing 9.04 beta will avoid this problem.

Colin Watson (cjwatson) wrote :

mdz suggested that we ought to work around this in intrepid-updates to help out people still affected by this there; I think we could probably manage to do so in initramfs-tools. (Or, on second thoughts, maybe in casper itself; I'll think about this in the morning.)

Changed in linux (Ubuntu Intrepid):
status: New → Invalid
Changed in initramfs-tools (Ubuntu Jaunty):
status: New → Invalid
Changed in casper (Ubuntu Intrepid):
status: New → Won't Fix
Changed in initramfs-tools (Ubuntu Intrepid):
assignee: nobody → cjwatson
importance: Undecided → High
status: New → Triaged
Colin Watson (cjwatson) wrote :

Thinking about it, a workaround would make much more sense in casper, since that's still installed on the live filesystem, and fixing it there rather than in initramfs-tools means that we don't risk breaking "normal" installed systems.

Changed in casper (Ubuntu Intrepid):
assignee: nobody → cjwatson
importance: Undecided → High
status: Won't Fix → Triaged
Changed in initramfs-tools (Ubuntu Intrepid):
assignee: cjwatson → nobody
importance: High → Undecided
status: Triaged → Invalid
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the report. The bug has been fixed in newer releases of Ubuntu.

Changed in casper (Ubuntu Intrepid):
assignee: Colin Watson (cjwatson) → nobody
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers