Ubuntu – Ubuntu hangs on startup at /dev/mapper/ubuntu–vg-root. How to fix it

bootfsckgrub2lvmubuntu-gnome

I have Ubuntu 20.04 (recently upgraded from 19.10) running on my ThinkPad T420 and since a couple of days I have the issue that Ubuntu stops startup at a screen that just shows

/dev/mapper/ubuntu--vg-root: clean, 1737827/15081472 files, 51603057/60309504 bl
ocks
_

and a flashing prompt in the next line.

gif of the screen at hand

There's no error message, the prompt doesn't accept any input, no reaction on special keys like Esc, F keys, Strg + C, Enter, … If I wait, nothing else happens.

When it happened first, after a couple of power-off/boot cycles the Ubuntu login screen came up. So it seeemed like a random annoyance. But since a reboot (after some updates) I had to do yesterday, I'm out of luck. Boot stops at this screen everytime I try.

I found tons of advice on how to fix different kinds of issues with /dev/mapper/ubuntu--vg-root (Ubuntu boots into busybox, Ubuntu boots into initramfs, …) but all of those issues come with related error messages that give a hint what's wrong. None of them fit my issue exactly. So I randomly tried a couple of suggestions that seemed appropriate to get more information about the issue and possible fixes, but with no luck so far.

So I hope one of you knows more abbout that issue and can help me to fix it.

What I tried on the system:

  • change boot options UEFI/BIOS –> apparently my system boots from BIOS
  • go into recovery menu

    • update grub –> no error, but doesn't fix the issue
    • fsck –> tells me that /dev/mapper/ubuntu–vg-root is mounted and e2fsck can't continue
    • drop to root shell and try to upgrade LVM2 via sudo apt update && sudo apt upgrade lvm2 –> tells me that the current version (2.03.07-1ubuntu1) is already installed
  • removed the SSD and put it back in (to rule out a connection issue) –> didn't help

Then I booted from a live stick and tried the following:

  • mount /dev/mapper/ubuntu--vg-root /mnt works and I can access the file system, so apparently it's not an encrypted partition as many posts say. I was able to do a full backup of my home directory to an external USB drive (yay!)
  • udisksctl unlock -b /dev/sda5 confirms that the partition is not encrypted –> "Object /org/freedesktop/UDisks2/block_devices/sda5 is not an encrypted device."
  • tried to re-install grub –> didn't fix the issue
  • Tried to do fsck (see note below) –> didn't fix the issue
  • tried to re-install Ubuntu following this guide, but I didn't get the re-install option that wouldn't overwrite the whole disk. **Does anyone know how to enforce the "re-install" option if it doesn't show up?*
  • I was able to run a file system check with 'gnome-disks' which reported that the extra file system on /dev/ubuntu-vg/root was fine

During my experiments there was one thing that caught my eye:

I did fsck /dev/mapper/ubuntu--vg-root from the live stick:

ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# fsck /dev/mapper/ubuntu--vg-root 
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
/dev/mapper/ubuntu--vg-root: clean, 1737833/15081472 files, 51605368/60309504 blocks
root@ubuntu:/home/ubuntu# 

It gives the same output as ubuntu shows when it hangs during boot. So I assume that Ubuntu gets stuck while doing fsck on startup. But why?

May it be possible that this is not an issue with ubuntu-vg-root, but with whatever comes after it during the boot process? How do I find out what would come next?

I hope one of you guys knows more about this stuff and can give me a hint.

Thanks in advance
Fred

Best Answer

After two months with this problem, I could find a solution. For some reason, when I ran apt upgrade, my kernel: 5.4.0-52-generic (18.04.4 LTS) had this error that you said. So I moved to a older kernel 5.4.0.48 recovery mode.

sudo apt install aptitude

sudo aptitude update

sudo aptitude dist-upgrade

reboot :)

And that is all, I could fix all the broken packages. Now I'm using this kernel 5.4.0.48.