Problem to boot the VM machine after upgrading from Ubuntu 18.04.3 to 20.04

Hung Duong 5 Reputation points
2023-07-18T05:28:44.3766667+00:00

I have a problem booting the VM machine after upgrading OS to Ubuntu 20.04. I got an error in boot diagnostics:

error: symbol 'grub_file_filter' not found.

Entering rescue mode...

grub rescue>

I do not have a backup. How could I fix this issue?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,487 Reputation points Moderator
    2023-07-18T06:45:25.7933333+00:00

    Hello Hung Duong

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    It looks like the error message you're seeing is related to the GRUB bootloader. This error can occur if the GRUB configuration is not updated correctly during the upgrade process.

    To fix this issue, you can try the following steps:

    Check the GRUB configuration file, boot into the rescue mode and use the following commands:

    grub rescue> set root=(hd0,1)

    grub rescue> configfile /boot/grub/grub.cfg

    If this resolves the issue and allows you to boot into Ubuntu, you can update the GRUB configuration file permanently using the following command:

    sudo update-grub

    Restart the VM to check if it boots normally.

    If the above step did not resolve the problem, you can try reinstalling GRUB.

    1.Boot the VM from an Ubuntu 20.04 installation ISO. You can attach the ISO to the VM in the Azure portal.

    2.Once the VM is booted from the ISO, open a terminal and run the following command to identify the partition where Ubuntu is installed:

    sudo fdisk -l
    

    3.Look for the partition that contains the Ubuntu installation. It should be labeled as "Linux" in the "System" column.

    4.Mount the partition by running the following command, replacing /dev/sda1 with the partition you identified in step 3:

    sudo mount /dev/sda1 /mnt
    

    5.Chroot into the mounted partition by running the following command:

    sudo chroot /mnt
    

    6.Reinstall the GRUB bootloader by running the following command:

    sudo grub-install /dev/sda
    

    7.Update the GRUB configuration by running the following command:

    sudo update-grub
    

    8.Exit the chroot environment by running the following command:

    exit
    

    9.Unmount the partition by running the following command:

    sudo umount /mnt
    

    10.Reboot the VM and see if it boots up correctly.

    If these steps don't work, I would recommend to seek additional help from the Ubuntu community here(https://ubuntuforums.org/).

    Hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.