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.

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.