Skip to content
Related Articles
Open in App
Not now

Related Articles

Microsoft Azure – Fix Broken fstab File Using Azure Serial Console

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

In this article, you will learn how to fix an unreachable VM. So, suppose you have an Azure VM running with a public IP address and a website on Azure VM at the IP address.

What if one day you see the website refuses to connect, and no amount of refreshing will do anything? You would probably go back to the VM, and try to SSH in, to see what’s wrong. But in this case, SSH doesn’t seem to be doing anything. You are not able to SSH in. 


In this case,  Azure has a serial console feature that allows you to connect to the VM, even in these network connectivity issue cases.


So, to fix this given issue follow the steps given below:

Step 1: Now, let’s go to the “Serial console.”So, you will see, now you were able to connect to the Serial console up the VM. This is because the Serial console here is connected to the virtual serial port on the VM, so it’s unaffected by the lack of SSH or any other connectivity. As the VM has dropped us into emergency mode, something has gone wrong.


Step 2: Let’s login in and check this out. So a lot of emergency scenarios happened when the OS can’t boot, and this is often because of a faulty fstab file. Check it out. As you can see, there’s an erroneous entry. It’s got a UUID of one, and it’s trying to mount that too. So clearly, this is wrong.


Note: It’s that when you add an entry into fstab, you can actually avoid these boot failures by adding a no-fail option at the end of the defaults line. This will tell the OS to continue booting even if mounting fails. However, you know this line is just plain wrong, so you can delete it.

Step 3: Now, reboot the VM and see what happens. Now, you can see that the boot was successful because you were presented with a proper login prompt.

Step 4: Now, go to the webpage, and refresh it. As you can see, this was successful and you can see that the web app has loaded.


Hence, that’s all how you can use an azure serial console to fix a broken fstab file.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!