My computer froze during an upgrade from ubuntu 12.04 to 14.04.

This resulted in a kernel panic upon reboot.

/sbin/init: relocation error: /lib/i386-linux-gnu/librt.so.1: symbol__clock_nanosleep, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference.

[followed by some kernel panic stuff]

I booted from usb and finished the upgrade via by chroot into the drive and running: sudo apt-get dist-upgrade (as well as a few other commands as described in: Recover from shutdown during Ubuntu distribution upgrade)

Basically it appears to have finished the upgrade, but it did not produce a new boot image: update-initramfs is disabled since running on read-only media

Since I cannot boot into older kernel versions, is there a way to produce a new boot image (i.e. something that would be in /boot/) from the usb.

As further clarification, when chrooted, uname -a yields the updated kernel, but no corresponding kernel image is in the /boot of the drive.

Could use some advice.

  • As a followup, I decided to simply re-install as I could not get this working. Would still be curious to hear a solution if anyone has one, and perhaps it would help others...
    – Josh
    Apr 20, 2015 at 1:15

3 Answers 3


I had a similar issue involving the update-initramfs is disabled since running on read-only media error message. If you look at the script you can see that it is just a wrapper script to mkinitramfs.

whereis update-initramfs
update-initramfs: /usr/sbin/update-initramfs …
gedit /usr/sbin/update-initramfs

So you could call mkinitramfs directly:

mkinitramfs -o /boot/initrd.img-${kernel_ver}-generic ${kernel_ver}-generic

More details about reinstalling kernel and initrd images from live media/chroot in the link above.


You mention chrooting into new ubuntu install. Run

sudo update-initramfs -u -k all

all FROM INSIDE the chroot

  • Thanks for your answer. At the time of my original post, I had tried running "sudo update-initramfs" from inside the chroot. When within "sudo apt-get dist-upgrade", it uses initramfs, it gave an error and if I tried directly using "sudo update-initramfs", the same error came up then as while it was running.
    – Josh
    Apr 20, 2015 at 1:14
  • still having issues or did you get it sorted out? If not, try adding mount --bind /run /sys /mntpt/{dev,sys} Apr 20, 2015 at 1:49
  • I did a fresh install, so I didn't really answer my original question. I played around with "--bind" when I mounted, but I still had trouble running update-initramfs even when I mounted that way and was in chroot. Perhaps, if done correctly, that would have worked?
    – Josh
    Apr 21, 2015 at 3:18
  • feel free to reference my write up which shows way to do it (substitute drive / mount points as suits your needs... for this particular question lines 89-91 are showing mount --bind properly done. gist.github.com/linux-modder/55e49074ff947ca0f97c Apr 21, 2015 at 4:02
  • Related: askubuntu.com/questions/865626/… Aug 26, 2019 at 0:57

on Linux Mint's live cd, there is a copy of update-initramfs that is used for installation. It is renamed "update-initramfs.distrib". You can run this to recreate your initrd.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .