Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
803b908
updated metadata.json with all documentation links
Feb 5, 2025
bf9b3a6
updated file
Feb 26, 2025
19fd699
added 2 new support docs
Feb 26, 2025
31829ac
updated ai tool
Feb 28, 2025
8f325c2
added 3rd support doc
Mar 3, 2025
5c0eebf
added 3rd support doc
Mar 3, 2025
6af4d22
added new doc using AI agent!
Mar 4, 2025
4a4fb71
added 4 new ai generated conversion docs
Mar 4, 2025
11aba81
added toms vnet doc
Mar 4, 2025
aab66af
added 2 new ai docs
Mar 4, 2025
1e37504
added a bunch of more functionalities in the ai tool and its readme
Mar 5, 2025
22f4088
Merge branch 'main' of github.com:MicrosoftDocs/executable-docs into …
Mar 5, 2025
4ef52ee
updated tool
Mar 6, 2025
21668d5
Merge branch 'main' of github.com:MicrosoftDocs/executable-docs into …
Mar 6, 2025
8fa1a14
updated tool
Mar 6, 2025
14f103b
updated readme around tool
Mar 6, 2025
d7dd7a8
updated doc and tool
Mar 6, 2025
e10542b
updated final tool
Mar 7, 2025
7dfe87b
updated documentation with technical constraints
Mar 10, 2025
74044b5
updated documentation with technical constraints
Mar 10, 2025
06fe6de
updated documentation with technical constraints
Mar 10, 2025
c851540
updated documentation with technical constraints
Mar 10, 2025
105c55b
updated documentation with technical constraints
Mar 10, 2025
f353531
updated docs
Mar 10, 2025
8a3a602
Update README.md
naman-msft Mar 10, 2025
fe0baab
updated docs
Mar 10, 2025
0608a0b
updated docs
Mar 10, 2025
a19398b
updated docs
Mar 10, 2025
d30d69e
Merge branch 'test_new' of github.com:MicrosoftDocs/executable-docs i…
Mar 10, 2025
e863fd6
updated readme with content filters
Mar 11, 2025
459bfa5
updated readme with content filters
Mar 11, 2025
c0ce34c
Merge branch 'main' of github.com:MicrosoftDocs/executable-docs into …
Mar 11, 2025
3a66d3a
Merge branch 'main' of github.com:MicrosoftDocs/executable-docs into …
Mar 12, 2025
35ec0f1
updated documentation
Mar 12, 2025
71fad60
updated documentation
Mar 12, 2025
7722d6a
updated documentation
Mar 12, 2025
0042b23
updated documentation
Mar 12, 2025
308232e
updated documentation
Mar 12, 2025
21a854e
updated documentation
Mar 12, 2025
f7430a9
updated documentation
Mar 12, 2025
6386522
updated documentation
Mar 12, 2025
42f76a8
updated documentation
Mar 12, 2025
edabbaa
updated documentation
Mar 12, 2025
02cad3a
updated documentation
Mar 12, 2025
682fee7
updated documentation
Mar 12, 2025
7a8dbba
updated documentation
Mar 12, 2025
f184fb4
updated documentation
Mar 12, 2025
aa56f28
updated commands
Mar 13, 2025
0a6bcdb
updated doc
Mar 13, 2025
918131e
updated metadata
Mar 17, 2025
175804f
added support request as next step for support docs
Mar 17, 2025
e4eb3b4
added flatcar doc in exec docs
Mar 18, 2025
78d5d24
updated doc
Mar 19, 2025
5f8c6f3
updated files and added new docs
Mar 20, 2025
e75ea8c
updated files and added new docs
Mar 20, 2025
a9a0647
updated docs
Mar 21, 2025
e38f6b9
added new docs
Mar 26, 2025
42bf42d
updated latest metadata pending new converted docs
Mar 28, 2025
30d7205
added a bunch of new converted docs and updated their metadata to be …
Mar 28, 2025
6613502
updated docs
Mar 29, 2025
9cedeea
added new docs
Mar 30, 2025
387002b
added aks doc on windows node
Mar 31, 2025
e6dbd42
added 2 new aks docs
Apr 1, 2025
6b50195
added 2 new aks docs
Apr 1, 2025
17bad14
added new aks docs
Apr 1, 2025
8832384
added new doc
Apr 1, 2025
0722745
ready to test all exec docs
Apr 3, 2025
6445b55
updated docs
Apr 4, 2025
eb1ed0a
updated doc
Apr 4, 2025
95a41c5
updated doc
Apr 4, 2025
ee46c62
updated docs
Apr 4, 2025
b3a2a9a
updated docs
Apr 4, 2025
8467d5a
updated docs
Apr 4, 2025
11d4bf9
updated docs
Apr 4, 2025
bd5fea5
updated docs
Apr 4, 2025
2fd3ac5
updated docs
Apr 4, 2025
48fed94
updated docs
Apr 4, 2025
2befa31
updated doc;
Apr 4, 2025
3e0af05
updated doc;
Apr 4, 2025
e71d61e
updated doc;
Apr 4, 2025
20ca325
updated doc;
Apr 4, 2025
2db4765
updated doc;
Apr 5, 2025
2ee3fb4
ready to merge;
Apr 5, 2025
7971ef3
updated documentationurl of a scenario
Apr 8, 2025
2819301
updated ada script
Apr 9, 2025
e780199
added new functionalities
Apr 9, 2025
f80b78b
added new functionalities
Apr 9, 2025
3f73d00
updated ada to v3
Apr 9, 2025
96ffb8f
updated ada with a bunch more functionality around taking user input …
Apr 9, 2025
f212627
updated ada with a bunch more functionality around taking user input …
Apr 9, 2025
238cd90
ada ready for webapp
Apr 9, 2025
c1b4dad
updated tool
Apr 9, 2025
01a78c5
updated tools
Apr 9, 2025
e15d741
updating the tools folder
Apr 9, 2025
f0b2407
removed the tools folder for easier PR review. it all lives in test_a…
Apr 10, 2025
01028ff
removed inactive metadata
Apr 10, 2025
4322251
added the tools folder with ada - nothing to do with the scenarios fo…
Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions LICENSE-CODE

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ I'll update the highlighted section with the clarified information about command
Not all documentation is suitable for conversion to Exec Docs. Use these filters to determine if a document can be effectively converted:

1. **Command Execution Limitations**
<<<<<<< HEAD
- **Supported:**
- Any command that can run in a BASH terminal (e.g. azurecli, azure-cli-interactive, azurecli-interactive commands)

- **Not supported:**
=======
- **Supported scenarios:**
- Any command that can run in a BASH terminal (e.g. azurecli, azure-cli-interactive, azurecli-interactive commands)

- **Not supported currently:**
>>>>>>> 33a7dbee83edb5d5749d591f55071a48c2be6547
- PowerShell scripts
- GUI-based instructions
- Commands requiring `sudo` privileges
Expand Down
88 changes: 88 additions & 0 deletions scenarios/FixFstabIssuesRepairVM/fix-fstab-issues-repair-vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Troubleshoot Linux VM boot issues due to fstab errors | Microsoft Learn
description: Explains why Linux VM cannot start and how to solve the problem.
services: virtual-machines
documentationcenter: ''
author: divargas-msft
ms.author: divargas
manager: dcscontentpm
tags: ''
ms.custom: sap:My VM is not booting, linux-related-content, devx-track-azurecli, mode-api, innovation-engine
ms.service: azure-virtual-machines
ms.collection: linux
ms.topic: troubleshooting
ms.workload: infrastructure-services
ms.tgt_pltfrm: vm-linux
ms.devlang: azurecli
ms.date: 02/25/2025
---


# Troubleshoot Linux VM boot issues due to fstab errors

**Applies to:** :heavy_check_mark: Linux VMs

<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region

The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.

```azurecli-interactive
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
export MY_VM_NAME="myVM89f292"
```
-->

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.
This article discusses multiple conditions where a wrong fstab configuration can lead to boot issue and provides troubleshooting guidance.

Few common reasons that can lead to Virtual Machine Boot issues due to fstab misconfiguration are listed below:

* Traditional filesystem name is used instead of the Universally Unique Identifier (UUID) of the filesystem.
* An incorrect UUID is used.
* An entry exists for an unattached device without `nofail` option within fstab configuration.
* Incorrect entry within fstab configuration.

## Identify fstab issues

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:

```output
[K[[1;31m TIME [0m] Timed out waiting for device dev-incorrect.device.
[[1;33mDEPEND[0m] Dependency failed for /data.
[[1;33mDEPEND[0m] Dependency failed for Local File Systems.
...
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.
Give root password for maintenance
(or type Control-D to continue)
```

>[!Note]
> "/data" is an example of mount point used. Dependency failure for filesystem mount point will differ based on the names used.

## Resolution

There are 2 ways to resolve the issue:

* Repair the VM online
* [Use the Serial Console](#use-the-serial-console)
* Repair the vm offline
* [Use Azure Linux Auto Repair (ALAR)](#use-azure-linux-auto-repair-alar)
* [Use Manual Method](#use-manual-method)

#### Use Azure Linux Auto Repair (ALAR)

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.

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:

```azurecli-interactive
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)
value=$(echo "$output" | jq -r '.message')
extracted=$(echo $value)
echo "$extracted"
```

> [!NOTE]
> 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.

[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: Recover Azure Linux VM from kernel panic due to missing initramfs
description: Provides solutions to an issue in which a Linux virtual machine (VM) can't boot after applying kernel changes.
author: divargas-msft
ms.author: divargas
ms.date: 02/25/2025
ms.reviewer: jofrance
ms.service: azure-virtual-machines
ms.custom: sap:Cannot start or stop my VM, devx-track-azurecli, mode-api, innovation-engine, linux-related-content
ms.workload: infrastructure-services
ms.tgt_pltfrm: vm-linux
ms.collection: linux
ms.topic: troubleshooting
---

# Azure Linux virtual machine fails to boot after applying kernel changes

**Applies to:** :heavy_check_mark: Linux VMs

<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region

The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.

```azurecli-interactive
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
export MY_VM_NAME="myVM89f292"
```
-->


## Prerequisites

Make sure the [serial console](serial-console-linux.md) is enabled and functional in the Linux VM.

## Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

This error occurs because of a recent system update (kernel). It's most commonly seen in RHEL-based distributions.
You can [identify this issue from the Azure serial console](#identify-kernel-boot-issue). You'll see any of the following error messages:

1. "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"

```output
[ 301.026129] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 301.027122] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G ------------ T 3.10.0-1160.36.2.el7.x86_64 #1
[ 301.027122] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090008 12/07/2018
[ 301.027122] Call Trace:
[ 301.027122] [<ffffffff82383559>] dump_stack+0x19/0x1b
[ 301.027122] [<ffffffff8237d261>] panic+0xe8/0x21f
[ 301.027122] [<ffffffff8298b794>] mount_block_root+0x291/0x2a0
[ 301.027122] [<ffffffff8298b7f6>] mount_root+0x53/0x56
[ 301.027122] [<ffffffff8298b935>] prepare_namespace+0x13c/0x174
[ 301.027122] [<ffffffff8298b412>] kernel_init_freeable+0x222/0x249
[ 301.027122] [<ffffffff8298ab28>] ? initcall_blcklist+0xb0/0xb0
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
[ 301.027122] [<ffffffff8237235e>] kernel_init+0xe/0x100
[ 301.027122] [<ffffffff82395df7>] ret_from_fork_nospec_begin+0x21/0x21
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
[ 301.027122] Kernel Offset: 0xc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
```

2. "error: file '/initramfs-*.img' not found"

> error: file '/initramfs-3.10.0-1160.36.2.el7.x86_64.img' not found.

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.

### Regenerate missing initramfs by using Azure Repair VM ALAR scripts

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

```azurecli-interactive
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)
value=$(echo "$output" | jq -r '.message')
extracted=$(echo $value)
echo "$extracted"
```

2. Once the repair VM command has been executed, restart the original VM and validate that it's able to boot up.

## Next steps

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.

[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export MY_VM_NAME="myVM89f292"
The full command for installation of the `sysstat` package on some popular Distros is:

```bash
az vm run-command invoke --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --command-id RunShellScript --scripts "/bin/bash -c 'OS=\$(cat /etc/os-release|grep NAME|head -1|cut -d= -f2 | sed \"s/\\\"//g\"); if [[ \$OS =~ \"Ubuntu\" ]] || [[ \$OS =~ \"Debian\" ]]; then sudo apt install sysstat -y; elif [[ \$OS =~ \"Red Hat\" ]]; then sudo dnf install sysstat -y; elif [[ \$OS =~ \"SUSE\" ]]; then sudo zypper install sysstat --non-interactive; else echo \"Unknown distribution\"; fi'"
output=$(az vm run-command invoke --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --command-id RunShellScript --scripts "/bin/bash -c 'OS=\$(cat /etc/os-release|grep NAME|head -1|cut -d= -f2 | sed \"s/\\\"//g\"); if [[ \$OS =~ \"Ubuntu\" ]] || [[ \$OS =~ \"Debian\" ]]; then sudo apt install sysstat -y; elif [[ \$OS =~ \"Red Hat\" ]]; then sudo dnf install sysstat -y; elif [[ \$OS =~ \"SUSE\" ]]; then sudo zypper install sysstat --non-interactive; else echo \"Unknown distribution\"; fi'")
value=$(echo "$output" | jq -r '.value[0].message')
extracted=$(echo "$value" | awk '/\[stdout\]/,/\[stderr\]/' | sed '/\[stdout\]/d' | sed '/\[stderr\]/d')
echo "$extracted"
```

## CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: Linux VM boots to GRUB rescue
description: Provides troubleshooting guidance for GRUB rescue issues with Linux virtual machines.
services: virtual-machines
documentationcenter: ''
author: divargas
ms.service: azure-virtual-machines
ms.collection: linux
ms.workload: infrastructure-services
ms.tgt_pltfrm: vm-linux
ms.custom: sap:My VM is not booting, linux-related-content
ms.topic: troubleshooting
ms.date: 02/25/2025
ms.author: divargas
ms.reviewer: ekpathak, v-leedennis, v-weizhu
---

# Linux virtual machine boots to GRUB rescue

**Applies to:** :heavy_check_mark: Linux VMs

<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region

The First step in this tutorial is to define environment variables.

```azurecli-interactive
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
export MY_VM_NAME="myVM89f292"
```
-->



This article discusses multiple conditions that cause GRUB rescue issues and provides troubleshooting guidance.

During the boot process, the boot loader tries to locate the Linux kernel and hand off the boot control. If this handoff can't be performed, the virtual machine (VM) enters a GRUB rescue console. The GRUB rescue console prompt isn't shown in the Azure serial console log, but it can be shown in the [Azure boot diagnostics screenshot](/azure/virtual-machines/boot-diagnostics#boot-diagnostics-view).

## Identify GRUB rescue issue

[View a boot diagnostics screenshot](/azure/virtual-machines/boot-diagnostics#boot-diagnostics-view) in the VM **Boot diagnostics** page of the Azure portal. This screenshot helps diagnose the GRUB rescue issue and determine if a boot error causes the issue.

The following text is an example of a GRUB rescue issue:

```output
error: file '/boot/grub2/i386-pc/normal.mod' not found.
Entering rescue mode...
grub rescue>
```

## Troubleshoot GRUB rescue issue offline

1. To troubleshoot a GRUB rescue issue, a rescue/repair VM is required. Use [vm repair commands](repair-linux-vm-using-azure-virtual-machine-repair-commands.md) to create a repair VM that has a copy of the affected VM's OS disk attached. Mount the copy of the OS file systems in the repair VM by using [chroot](chroot-environment-linux.md).

> [!NOTE]
> Alternatively, you can create a rescue VM manually by using the Azure portal. For more information, see [Troubleshoot a Linux VM by attaching the OS disk to a recovery VM using the Azure portal](troubleshoot-recovery-disks-portal-linux.md).

2. [Identify GRUB rescue issue](#identify-grub-rescue-issue). When you encounter one of the following GRUB rescue issues, go to the corresponding section to resolve it:

* [Error: unknown filesystem](#unknown-filesystem)
* [Error 15: File not found](#error15)
* [Error: file '/boot/grub2/i386-pc/normal.mod' not found](#normal-mod-file-not-found)
* [Error: no such partition](#no-such-partition)
* [Error: symbol 'grub_efi_get_secure_boot' not found](#grub_efi_get_secure_boot)
* [Other GRUB rescue errors](#other-grub-rescue-errors)

3. After the GRUB rescue issue is resolved, perform the following actions:

1. Unmount the copy of the file systems from the rescue/repair VM.

2. Run the `az vm repair restore` command to swap the repaired OS disk with the original OS disk of the VM. For more information, see Step 5 in [Repair a Linux VM by using the Azure Virtual Machine repair commands](repair-linux-vm-using-azure-virtual-machine-repair-commands.md).

3. Check whether the VM can start by taking a look at the Azure serial console or by trying to connect to the VM.

4. If the entire /boot partition or other important contents are missing and can't be recovered, we recommend restoring the VM from a backup. For more information, see [How to restore Azure VM data in Azure portal](/azure/backup/backup-azure-arm-restore-vms).

See the following sections for detailed errors, possible causes, and solutions.

> [!NOTE]
> In the commands mentioned in the following sections, replace `/dev/sdX` with the corresponding Operating System (OS) disk device.

### Reinstall GRUB and regenerate GRUB configuration file using Auto Repair (ALAR)

Azure Linux Auto Repair (ALAR) scripts are part of the VM repair extension described in [Use Azure Linux Auto Repair (ALAR) to fix a Linux VM](./repair-linux-vm-using-alar.md). ALAR covers the automation of multiple repair scenarios, including GRUB rescue issues.

The ALAR scripts use the repair extension `repair-button` to fix GRUB issues by specifying `--button-command grubfix` for Generation 1 VMs, or `--button-command efifix` for Generation 2 VMs. This parameter triggers the automated recovery. Implement the following step to automate the fix of common GRUB errors that could be fixed by reinstalling GRUB and regenerating the corresponding configuration file:

```azurecli-interactive
GEN=$(az vm get-instance-view --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --query "instanceView.hyperVGeneration" --output tsv)
if [[ "$GEN" =~ "[Vv]?2" ]]; then ALAR="efifix"; else ALAR="grubfix"; fi
output=$(az extension add -n vm-repair; az extension update -n vm-repair; az vm repair repair-button --button-command $ALAR --verbose --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME)
value=$(echo "$output" | jq -r '.message')
extracted=$(echo $value)
echo "$extracted"
```

The repair VM script, in conjunction with the ALAR script, temporarily creates a resource group, a repair VM, and a copy of the affected VM's OS disk. It reinstalls GRUB and regenerates the corresponding GRUB configuration file and then it swaps the OS disk of the broken VM with the copied fixed disk. Finally, the `repair-button` script will automatically delete the resource group containing the temporary repair VM.

## Next steps

If the specific boot error isn't a GRUB rescue issue, refer to [Troubleshoot Azure Linux Virtual Machines boot errors](boot-error-troubleshoot-linux.md) for further troubleshooting options.

[!INCLUDE [Third-party disclaimer](../../../includes/third-party-disclaimer.md)]

[!INCLUDE [Third-party contact disclaimer](../../../includes/third-party-contact-disclaimer.md)]
Loading