After modifying 'GRUB_DEFAULT' from 0 to '1> 1 ' in '/etc/default/grub', can't enter ubuntu virtual machine

Zuobiao ZB6 Wang 0 Reputation points
2023-06-29T07:25:23.5033333+00:00

Hello, after modifying 'GRUB_DEFAULT' from 0 to '1> 1 ' in '/etc/default/grub', can't enter ubuntu virtual machine, could you help recover it again? Thanks.

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

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2023-06-29T13:59:18.53+00:00

    Hello @Zuobiao ZB6 Wang

    There many methods to repair your VM, one of them is to use Azure serial console:

    Restart the VM by using the Azure serial console.

    1. Select the shutdown button at the top of the serial console window.
    2. Select the Restart VM (Hard) option.

    Once the serial console connection resumes, you'll see a countdown counter at the left top corner of the serial console window. Press the ESCAPE key to interrupt your VM at the GRUB menu.

    Press the down arrow key to select any previous kernel version.

    [Animated GIF that shows the process of interrupting the boot process at GRUB menu level to select an older kernel to boot the system on.

    ](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/media/kernel-related-boot-issues/boot-previous-kernel.gif#lightbox)

    Change the GRUB_DEFAULT variable in the /etc/default/grub file as instructed in Change default kernel version manually. This is a persistent change.

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/kernel-related-boot-issues
    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-grub-proactive-configuration

    0 comments No comments

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.