How to Fix ‘Failed to Connect to lvmetad’ Error on Ubuntu?

Ubuntu is a free and open-source Linux based operating system used mostly for cloud computing with OpenStack support. Updates are released every 6 months that come with extended features and performance enhancements. However, quite recently, a lot of reports have been coming in where users are unable to boot into the operating system and the “Failed to Connect to lvmetad, Falling back to Device Scanning” message is observed.

Failed to Connect to Lvmetad, Falling back to Device Scanning

What Causes the “Failed to Connect to Lvmetad” Error on Ubuntu?

After receiving numerous reports from multiple users, we decided to investigate the issue and devised a set of solutions to rectify it completely. Also, we looked into the reasons due to which this error is triggered and listed them as follows.

  • Nvidia Drivers: For some users, it was seen that the Nvidia drivers were causing the issue with the operating system. Sometimes, the drivers can malfunction and interfere with important system features which can result in triggering this error.
  • Corrupt/Broken Kernel: In some cases, it was seen that updating kernel to the latest version wasn’t processed properly and it might have gotten broken/corrupted in the process due to which the error might be triggered.

Now that you have a basic understanding of the nature of the problem, we will move on towards the solutions. Make sure to implement these in the specific order in which they are presented to avoid conflict.

Solution 1: Purging Nvidia Drivers

If the Nvidia drivers are interfering with certain system functions, the error might be triggered. Therefore, in this step, we will be completely uninstalling the Nvidia Drivers from our computer using the purge command. For that:

  1. If the computer doesn’t boot up follow the second solution before trying the steps below,
  2. Press “Ctrl” + “Alt” + “T” keys to bring up the terminal.
    Opening Terminal
  3. Type in the following command and press “Enter“.
    sudo apt-get remove --purge '^nvidia-.*'
  4. This will delete all Nvidia related packages, however, a command needs to be executed for Ubuntu to work.
  5. Type in the following command and press “Enter“.
    sudo apt-get install ubuntu-desktop
  6. Check to see if the issue persists.

Solution 2: Booting into an Older Kernel

If the new kernel hasn’t been processed properly it can cause issues during the bootup. Therefore, in this step, we will be booting into an older kernel. For that:

  1. During the bootup press the Esc, F9 or the F3 key to boot into the BIOS.
  2. Select the “Advanced Options for Ubuntu” to boot into the Ubuntu options screen.
    Selecting Advanced Options for Ubuntu
  3. Navigate with the arrow keys and select an older version of the kernel.
  4. Press “Enter” to select the kernel.
  5. Reboot the computer and try to boot into the older kernel
  6. Check to see if the issue persists.

Solution 3: Processing New Kernel

The issue is mostly seen if the newer kernel hasn’t been processed properly. Therefore, in this step, we will be properly processing the newer kernel. Make sure that you have already tried the first solution listed in this article and installed the proper Nvidia drivers before trying this solution.

  1. Boot into the older kernel before trying this using the second solution.
  2. Press the “Ctrl” + “ALT” + “F3” keys simultaneously to boot into the virtual terminal.
    Opening Virtual Box
  3. Type in the following command and press “Enter” to update everything.
    sudo apt-get update && sudo apt-get upgrade -y
  4. Type in the following command and press “Enter” to remove the older kernels.
    sudo apt-get autoremove
  5. Type in the following command and press “Enter” to reinstall the current kernel
    sudo apt-get install --reinstall linux-image-4.13.0-32-generic

    Note: Replace the numbers in this command with the version of the kernel you want to install. The version could be found by executing the following command.

    uname -r
  6. Reboot and check to see if the issue persists.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

7
    AM
    Andy Macdonald Mar 25, 2020

    Thanks. Useful looking advice, unfortunately nothing worked for me. I think I will reinstall from scratch.

      SW
      Shane Warren Author Mar 28, 2020

      Did that fix the issue for you?

        AM
        Andy Macdonald Mar 29, 2020

        Thanks for asking. I haven’t yet tried reinstalling on that machine. I have another machine I am using for now …

    DP
    Daniel P Jul 5, 2020

    Unfortunately Solutions 2 and 3 didn’t work for me. I cannot try Solution 1 because the thing cannot boot at all. This seems to be a fatal error for my machine. I tried recovering my data from a liveusb, I tried mounting it. Noting is working for me.

      SW
      Shane Warren Author Jul 8, 2020

      i think you will have to reinstall your OS.

    PS
    Peter Storch Jul 23, 2020

    I came here because my laptop display went back to the text console and showed the above error message. Only the external monitor showed the desktop.Solution 1 didn’t really work. I had problems uninstalling the Nvidia drivers. The result was that I saw the graphical desktop on the laptop display, but then the external monitor wasn’t recognized anymore.Solution 2 worked, so I hoped to fix it permanently by Solution 3, but when reinstalling the newer Kernel I get the following error:dpkg: error processing archive /var/cache/apt/archives/linux-image-5.4.0-42-generic_5.4.0-42.46~18.04.1_amd64.deb (–unpack):
    unable to make backup link of ‘./boot/vmlinuz-5.4.0-42-generic’ before installing new version: Operation not permittedAny tip to solve it?

      SW
      Shane Warren Author Jul 26, 2020

      You can leave it be if solution 2 fixes your issue.