Skip to content
Related Articles
Open in App
Not now

Related Articles

Microsoft Azure – Accessing GRUB on Ubuntu

Improve Article
Save Article
  • Last Updated : 24 Mar, 2022
Improve Article
Save Article

In this article, you will learn how to configure your Ubuntu Azure VM for GRUB, and use GRUB to drop into a single-user mode. GRUB is the Grand Unified Boot loader. It’s available during Boot App and allows you to select what operating system to run or even select a specific kernel configuration that’s available. 

Being able to modify your GRUB config to change your run level at boot time is crucial to being able to debug your VM in situations where you may be unable to boot into your regular operating system. In some situations, GRUB might be misconfigured to not show up at all during boot or to show up on the wrong output port. 


Here, to see if your VM has GRUB configured properly follow the given steps.

Step 1:  Go to set after you reboot the VM from the serial console blade, you don’t see GRUB show up. Eventually, GRUB in Ubuntu is actually really easy to modify. There’s just one file you need to change on your Ubuntu VM running in Azure. This file is etc/default/grub.d/50-clouding-settings.cfg. 


Note: GRUB timeout has a value of zero here. Change that to a value of 15. Note that the higher the number, the longer GRUB will display on-screen, which gives you more time to act on it. But increasing this GRUB timeout will also increase the perceived boot time over VM, this is a trade-off to be aware of. 

Step 2: You need to add one more line to make sure that the GRUB menu is actually visible. Now with that, exit. Run update-grub, and reboot the VM again.


Step 3:  Now, you will see that GRUB is automatically showing up upon boot, and it’s counting down from 15 seconds. You can press any key to interrupt the countdown and you can press “E” to edit your GRUB.


Step 4: So now, drop into single-user mode. To do this, you will find the line that starts with Linux, and then append the word single to the end of it. Press “CTRL+X” to boot, now, wait. As you will see you will be in single-user mode and you can log in, and get yourself a shell.


Hence, that is how you can access GRUB on Ubuntu.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!