Skip to content

Commit 19fd699

Browse files
author
naman-msft
committed
added 2 new support docs
1 parent bf9b3a6 commit 19fd699

File tree

3 files changed

+224
-0
lines changed

3 files changed

+224
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Troubleshoot Linux VM boot issues due to fstab errors | Microsoft Learn
3+
description: Explains why Linux VM cannot start and how to solve the problem.
4+
services: virtual-machines
5+
documentationcenter: ''
6+
author: divargas-msft
7+
ms.author: divargas
8+
manager: dcscontentpm
9+
tags: ''
10+
ms.custom: sap:My VM is not booting, linux-related-content, devx-track-azurecli, mode-api, innovation-engine
11+
ms.service: azure-virtual-machines
12+
ms.collection: linux
13+
ms.topic: troubleshooting
14+
ms.workload: infrastructure-services
15+
ms.tgt_pltfrm: vm-linux
16+
ms.devlang: azurecli
17+
ms.date: 02/25/2025
18+
---
19+
20+
21+
# Troubleshoot Linux VM boot issues due to fstab errors
22+
23+
**Applies to:** :heavy_check_mark: Linux VMs
24+
25+
<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region
26+
27+
The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.
28+
29+
```azurecli-interactive
30+
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
31+
export MY_VM_NAME="myVM89f292"
32+
```
33+
-->
34+
35+
The Linux filesystem table, fstab is a configuration table which is designed to configure rules where specific file systems are detected and mounted in an orderly manner during the system boot process.
36+
This article discusses multiple conditions where a wrong fstab configuration can lead to boot issue and provides troubleshooting guidance.
37+
38+
Few common reasons that can lead to Virtual Machine Boot issues due to fstab misconfiguration are listed below:
39+
40+
* Traditional filesystem name is used instead of the Universally Unique Identifier (UUID) of the filesystem.
41+
* An incorrect UUID is used.
42+
* An entry exists for an unattached device without `nofail` option within fstab configuration.
43+
* Incorrect entry within fstab configuration.
44+
45+
## Identify fstab issues
46+
47+
Check the current boot state of the VM in the serial log within the [Boot diagnostics] (/azure/virtual-machines/boot-diagnostics#boot-diagnostics-view) blade in the Azure portal. The VM will be in an Emergency Mode. You see log entries that resemble the following example leading to the Emergency Mode state:
48+
49+
```output
50+
[K[[1;31m TIME [0m] Timed out waiting for device dev-incorrect.device.
51+
[[1;33mDEPEND[0m] Dependency failed for /data.
52+
[[1;33mDEPEND[0m] Dependency failed for Local File Systems.
53+
...
54+
Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.
55+
Give root password for maintenance
56+
(or type Control-D to continue)
57+
```
58+
59+
>[!Note]
60+
> "/data" is an example of mount point used. Dependency failure for filesystem mount point will differ based on the names used.
61+
62+
## Resolution
63+
64+
There are 2 ways to resolve the issue:
65+
66+
* Repair the VM online
67+
* [Use the Serial Console](#use-the-serial-console)
68+
* Repair the vm offline
69+
* [Use Azure Linux Auto Repair (ALAR)](#use-azure-linux-auto-repair-alar)
70+
* [Use Manual Method](#use-manual-method)
71+
72+
#### Use Azure Linux Auto Repair (ALAR)
73+
74+
Azure Linux Auto Repair (ALAR) scripts is a part of VM repair extension described in [Repair a Linux VM by using the Azure Virtual Machine repair commands](./repair-linux-vm-using-azure-virtual-machine-repair-commands.md). ALAR covers automation of multiple repair scenarios including `/etc/fstab` issues.
75+
76+
The ALAR scripts use the repair extension `run` command and its `--run-id` option. The script-id for the automated recovery is: **linux-alar2**. Implement the following steps to automate fstab errors via offline ALAR approach:
77+
78+
```azurecli-interactive
79+
output=$(az extension add -n vm-repair; az extension update -n vm-repair; az vm repair repair-button --button-command 'fstab' --verbose --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME)
80+
value=$(echo "$output" | jq -r '.message')
81+
extracted=$(echo $value)
82+
echo "$extracted"
83+
```
84+
85+
> [!NOTE]
86+
> The fstab repair script will take a backup of the original file and strip off any lines in the /etc/fstab file which are not needed to boot a system. After successful start of the OS, edit the fstab again and correct any errors which didn't allow a reboot of the system before.
87+
88+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Recover Azure Linux VM from kernel panic due to missing initramfs
3+
description: Provides solutions to an issue in which a Linux virtual machine (VM) can't boot after applying kernel changes.
4+
author: divargas-msft
5+
ms.author: divargas
6+
ms.date: 02/25/2025
7+
ms.reviewer: jofrance
8+
ms.service: azure-virtual-machines
9+
ms.custom: sap:Cannot start or stop my VM, devx-track-azurecli, mode-api, innovation-engine, linux-related-content
10+
ms.workload: infrastructure-services
11+
ms.tgt_pltfrm: vm-linux
12+
ms.collection: linux
13+
ms.topic: troubleshooting
14+
---
15+
16+
# Azure Linux virtual machine fails to boot after applying kernel changes
17+
18+
**Applies to:** :heavy_check_mark: Linux VMs
19+
20+
<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region
21+
22+
The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.
23+
24+
```azurecli-interactive
25+
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
26+
export MY_VM_NAME="myVM89f292"
27+
```
28+
-->
29+
30+
31+
## Prerequisites
32+
33+
Make sure the [serial console](serial-console-linux.md) is enabled and functional in the Linux VM.
34+
35+
## <a id="missing-initramfs"></a>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
36+
37+
This error occurs because of a recent system update (kernel). It's most commonly seen in RHEL-based distributions.
38+
You can [identify this issue from the Azure serial console](#identify-kernel-boot-issue). You'll see any of the following error messages:
39+
40+
1. "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
41+
42+
```output
43+
[ 301.026129] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
44+
[ 301.027122] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G ------------ T 3.10.0-1160.36.2.el7.x86_64 #1
45+
[ 301.027122] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090008 12/07/2018
46+
[ 301.027122] Call Trace:
47+
[ 301.027122] [<ffffffff82383559>] dump_stack+0x19/0x1b
48+
[ 301.027122] [<ffffffff8237d261>] panic+0xe8/0x21f
49+
[ 301.027122] [<ffffffff8298b794>] mount_block_root+0x291/0x2a0
50+
[ 301.027122] [<ffffffff8298b7f6>] mount_root+0x53/0x56
51+
[ 301.027122] [<ffffffff8298b935>] prepare_namespace+0x13c/0x174
52+
[ 301.027122] [<ffffffff8298b412>] kernel_init_freeable+0x222/0x249
53+
[ 301.027122] [<ffffffff8298ab28>] ? initcall_blcklist+0xb0/0xb0
54+
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
55+
[ 301.027122] [<ffffffff8237235e>] kernel_init+0xe/0x100
56+
[ 301.027122] [<ffffffff82395df7>] ret_from_fork_nospec_begin+0x21/0x21
57+
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
58+
[ 301.027122] Kernel Offset: 0xc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
59+
```
60+
61+
2. "error: file '/initramfs-*.img' not found"
62+
63+
> error: file '/initramfs-3.10.0-1160.36.2.el7.x86_64.img' not found.
64+
65+
This kind of error indicates that the initramfs file isn't generated, the GRUB configuration file has the initrd entry missing after a patching process, or a GRUB manual misconfiguration.
66+
67+
### <a id="missing-initramfs-alar"></a>Regenerate missing initramfs by using Azure Repair VM ALAR scripts
68+
69+
1. Create a repair VM by running the following Bash command line with [Azure Cloud Shell](/azure/cloud-shell/overview). For more information, see [Use Azure Linux Auto Repair (ALAR) to fix a Linux VM - initrd option](repair-linux-vm-using-ALAR.md#initrd). This command will regenerate the initrd/initramfs image, regenerate the GRUB configuration file if it has the initrd entry missing, and swap the OS disk
70+
71+
```azurecli-interactive
72+
output=$(az extension add -n vm-repair; az extension update -n vm-repair; az vm repair repair-button --button-command 'initrd' --verbose --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME)
73+
value=$(echo "$output" | jq -r '.message')
74+
extracted=$(echo $value)
75+
echo "$extracted"
76+
```
77+
78+
2. Once the repair VM command has been executed, restart the original VM and validate that it's able to boot up.
79+
80+
## Next steps
81+
82+
If the specific boot error isn't a kernel related boot issue, see [Troubleshoot Azure Linux Virtual Machines boot errors](./boot-error-troubleshoot-linux.md) for further troubleshooting options.
83+
84+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

scenarios/metadata.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,5 +919,57 @@
919919
"configurations": {
920920
"permissions": []
921921
}
922+
},
923+
{
924+
"status": "active",
925+
"key": "FixFstabIssuesRepairVM/fix-fstab-issues-repair-vm.md",
926+
"title": "Troubleshoot Linux VM boot issues due to fstab errors",
927+
"description": "Explains why Linux VM cannot start and how to solve the problem.",
928+
"stackDetails": "",
929+
"sourceUrl": "https://raw.githubusercontent.com/MicrosoftDocs/executable-docs/main/scenarios/FixFstabIssuesRepairVM/fix-fstab-issues-repair-vm.md",
930+
"documentationUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/linux-virtual-machine-cannot-start-fstab-errors#use-azure-linux-auto-repair-alar",
931+
"configurations": {
932+
"permissions": [],
933+
"configurableParams": [
934+
{
935+
"inputType": "textInput",
936+
"commandKey": "MY_RESOURCE_GROUP_NAME",
937+
"title": "Resource Group Name",
938+
"defaultValue": ""
939+
},
940+
{
941+
"inputType": "textInput",
942+
"commandKey": "MY_VM_NAME",
943+
"title": "VM Name",
944+
"defaultValue": ""
945+
}
946+
]
947+
}
948+
},
949+
{
950+
"status": "active",
951+
"key": "KernelBootIssuesRepairVM/kernel-related-boot-issues-repairvm.md",
952+
"title": "Troubleshoot Linux VM boot issues due to fstab errors",
953+
"description": "Explains why Linux VM cannot start and how to solve the problem.",
954+
"stackDetails": "",
955+
"sourceUrl": "https://raw.githubusercontent.com/MicrosoftDocs/executable-docs/main/scenarios/KernelBootIssuesRepairVM/kernel-related-boot-issues-repairvm.md",
956+
"documentationUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/kernel-related-boot-issues#missing-initramfs-alar",
957+
"configurations": {
958+
"permissions": [],
959+
"configurableParams": [
960+
{
961+
"inputType": "textInput",
962+
"commandKey": "MY_RESOURCE_GROUP_NAME",
963+
"title": "Resource Group Name",
964+
"defaultValue": ""
965+
},
966+
{
967+
"inputType": "textInput",
968+
"commandKey": "MY_VM_NAME",
969+
"title": "VM Name",
970+
"defaultValue": ""
971+
}
972+
]
973+
}
922974
}
923975
]

0 commit comments

Comments
 (0)