1

I ran an update from Ubuntu 16.04 and cannot boot anymore. I took all the distribution options when there was customized config conflict. I didn't do anything fancy during the update process otherwise.

Screenshot: https://drive.google.com/open?id=1XsRTLKEkgMivxd0aSezYyt9EBq89_qKQ

That one is when I tried to use 4.4.0 in safe mode. The other option is 4.15.0, but the result is the same. Basically, I cannot get any further beyond grub.

How can I get out of this?

Evgen
  • 21
  • 5
  • Update: I tried repairing it from live USB. It instead offered to install another 18.04.01 alongside. I went for that, but first I had to edit (relink to edited copy) /etc/mtab to avoid it getting stuck on /cdrom not accessible. Once past that, it still failed halfway copying files, claiming DVD or hard disk failure. I don't think it's either, but likely an intermittent USB connection loss. Now it sees two 18.04.01 and offers to install the third, but on another HD, which it fails to partition, etc. STUCK!
    There's an option for manual partition, but I am afraid to mess my user data
    – Evgen Nov 13 '18 at 06:31
  • I should also note the "new" OS does not show up in grub during normal boot without USB – Evgen Nov 13 '18 at 06:37

2 Answers2

1

Ok, this was a self-inflicted wound. As I mentioned, I moved /usr to /home and linked /usr to it in order to free up space for the upgrade. Looks like during the upgrade the link (while still pointing to /home/usr) got invalid somehow.

When I was in the live Linux, I copied usr back. Luckily there was still enough space. After that all the boot problems disappeared. Lesson: don't mess with system files. On the bright side - it did enable me to upgrade the OS, and I now have a bootable Linux USB as a bonus :)

Evgen
  • 21
  • 5
0

In many cases this will be due to the /boot drive becoming 100% full because many updates have been made to the kernel. By default, ubuntu will retain the old kernels and add them to the list of available kernels you can boot into in the Grub2 boot loader menu.

Restart OS. Into the Grub2 menu then choose Advanced options for ubuntu view where you can see a list of old kernels you can boot into. Some report you can do this booting with the Shift key held down.

Choose the next-oldest kernel from the top/highest version of kernels. Try found kernel to login.

Then run:

uname -a

Note kernel version. Run:

dpkg --list | grep linux-image

Find all the kernels that are lower than your current kernel version. Run the commands below to remove the kernel you selected:

sudo apt-get purge linux-image-x.x.x.x-generic

update grub2:

sudo update-grub2

Reboot system.

Helping sources:

  1. How do I remove old kernel versions to clean up the boot menu? How do I remove old kernel versions to clean up the boot menu?
  2. Fix ubuntu when the OS will not boot – kernel panic https://jasoncoltrin.com/2017/01/13/fix-ubuntu-when-the-os-will-not-boot-kernel-panic-kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block-0-0-error-boot-full-remove-old-kernels-from-command-line/
  3. Kernel panic and unable to boot Ubuntu 16.04 after updating Kernel panic and unable to boot Ubuntu 16.04 after updating
slava
  • 3,887
  • Thanks for a detailed response! However, I cleaned all I could prior as I could not install due to lack of root space. I also moved /usr to /home/usr, replacing with a link. That gave me some trouble initially (froze before link command happened), but I was able to recover later. /boot may have limited space, though. There are only 4.4.0 and 4.15.0 in grub options. Can't log into either. I don't get to run any commands other than in grub edit and then shell mode, where there are only special grub commands available. I don't think I can run the ones you list, @S_Flash – Evgen Nov 12 '18 at 08:16