10

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.

Josh
  • 111

4 Answers4

4

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.

3

You mention chrooting into new ubuntu install. Run

sudo update-initramfs -u -k all

all FROM INSIDE the chroot

linuxdev2013
  • 1,395
1

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.

0

I don't know about ubuntu 14.04, but in 22.04 you can avoid this check by creating a file called /.live-build which will trigger update-initramfs to skip this test and continue.

So the solution to your problem would be to first chroot into the mounted root directory of your installation, then touch this file and run your update-initramfs command. Don't forget to delete that file afterwards.