How to use GRUB and the Azure Serial Console on a Linux Virtual Machine | Azure Tips and Tricks

How to use GRUB and the Azure Serial Console on a Linux Virtual Machine | Azure Tips and Tricks


>>Hi everyone. My name is Ken. Today I will show you how to edit, run through Azure Serial Console. GRUB stands for
GRand Unified Bootloader, and it is available during boot up and allows you to select
what operating system to run or select specific kernel
configuration available. Being able to modify your GRUB config change or run
a boot time is crucial to being able to debug your VM
in situations where may be unable to boot
into the regular OS. In some situations like
what we’ll show you today, GRUB maybe misconfigured not
to show up on older boot, or to show up on
the wrong output port. In this video, I will
show you how to properly configure your GRUB settings
in RHEL7. In this case right now, I will show you that if I reboot from my current session
in Azure Serial Console, why GRUB timeout setting
is set to zero, so it will skip the GRUB menu
and immediately boot into REHL. So I’ll reboot. Here you see
that GRUB did not come up. GRUB in REHL is easy to modify. The GRUB config file modifier
is at ETC/default/grub. Once you modify that,
you can run GRUB to make config to rebuild GRUB.
So let’s do that. I will edit the file, and you can see in this case
the timeout is set to zero seconds. So in this case, let’s go ahead
and set it to 15 seconds. We’ll save the file and
we will rebuild GRUB. Let’s reboot to VM. You can see that GRUB came up. I can interrupt the countdown
and make it display permanently. In this situation, because
my operating system has not booted, I won’t be able to SSH yet, but no need to panic as we just
need to boot the operating system. In this case, I can also edit the GRUB configuration by
pressing “E” on the keyboard. Here I can change my run level by appending the level to
the Linux boot line. For example, I will add runlevel one, which stands for single user mode. Once I’ve added this line, I will press “Control
X” to continue boot. This will continue booting
into runlevel one, which is single user mode. Now that I am in
single user mode, I will login. I can also confirm that I am in
runlevel one by typing runlevel. Here we see one, and this means I have runlevel one. In this video, you learned
how to configure GRUB on your Realm VM and change
runlevels on boot within GRUB.

Leave a Reply

Your email address will not be published. Required fields are marked *