Ubuntu hangs on startup at /dev/mapper/ubuntu--vg-root. How do I fix it?

8,760

Solution 1

Turns out, my last question put me on the right track: It had absolutely nothing to do with /dev/mapper/ubuntu--vg-root or LVM but with something that came after it. To see what comes after it, you have to enable verbose log during boot:

  1. while the ThinkPad is starting up, keep Shift pressed until you are in the Grub options screen.
  2. Press e to change startup options. You don't need to worry about breaking anything: those changes will only affect the current boot process
  3. in the line that starts with "Linux", remove "quiet splash". I also had to remove the veriable that came after it.
  4. Press Ctrl + X to continue boot

You will see much more logs on your screen while your computer is booting. Wait until it freezes and look at the last message. This most likely indicates the real problem.

In my case the message was about "Energy Management".

This put me on the right track: my T420 has a dedicated Nvidia graphics chip besides the integrated graphics. They run together with Optimus, which is a bit of a hassle to get running on Ubuntu. I remembered that I had enabled Optimus after the upgrade to 20.04 to check if it was finally working again with the latest drivers. It seemed so at first, but apparently with one of the system updates after the upgrade to 20.04, it broke again.

To disable Optimus, go to the Bios by holding F1 during startup. Select "Config", "Display", then "Graphics Device = Internal Graphics (Intel)" and "Enable OS detection = Disabled". Then press F10 to save and continue booting.

For me this fixed the boot issue. I hope it helps someone in the same situation as well. Cheers, Fred.

Solution 2

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.

Share:
8,760
Fred
Author by

Fred

If you want to get to know me, check my Twitter and my GitHub. And I'm sure you'll find out how to find me on LinkedIn as well...

Updated on September 18, 2022

Comments

  • Fred
    Fred over 1 year

    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

    • Parsa Mousavi
      Parsa Mousavi almost 4 years
      Have you created volume groups or used encryption feature ? Normally there's no ubuntu--vg-root in the /dev/mapper.
    • Fred
      Fred almost 4 years
      I installed Ubuntu using LVM but without encryption (apparently, because I don't remember what I have selected some years ago when I installed it). Something seems to be odd with LVM in 20.04. This guy stated a similar issue: askubuntu.com/questions/1249113/… And somewhere else I read that it can occur after a kernel update. But I haven't understood what exactly is broken and how to fix it.