You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/virtual-machines/linux/troubleshoot-vm-boot-error.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,18 +61,18 @@ grub rescue>
61
61
62
62
3. Check whether the VM can start by taking a look at the Azure serial console or by trying to connect to the VM.
63
63
64
-
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).
64
+
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).
65
65
66
66
See the following sections for detailed errors, possible causes, and solutions.
67
67
68
68
> [!NOTE]
69
69
> In the commands mentioned in the following sections, replace `/dev/sdX` with the corresponding Operating System (OS) disk device.
70
70
71
-
### <aid="reinstall-grub-regenerate-grub-configuration-file-repairvm"></a> Reinstall GRUB and regenerate GRUB configuration file using Azure Linux Auto Repair
71
+
### <aid="reinstall-grub-regenerate-grub-configuration-file-repairvm"></a> Reinstall GRUB and regenerate the GRUB configuration file using Azure Linux Auto Repair
72
72
73
73
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.
74
74
75
-
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 commands to automate the fix of common GRUB errors by reinstalling GRUB and regenerating the corresponding configuration file:
75
+
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 commands to automate the fix of common GRUB errors by reinstalling GRUB and regenerating the corresponding configuration file:
76
76
77
77
***Linux VMs without UEFI (BIOS based - Gen1):**
78
78
@@ -93,9 +93,9 @@ The ALAR scripts use the repair extension `repair-button` to fix GRUB issues by
93
93
> [!IMPORTANT]
94
94
> Replace the resource group name `$RGNAME` and VM name `$VMNAME` accordingly.
95
95
96
-
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 VMwith the copied fixed disk. Finally, the `repair-button` script will automatically delete the resource group containing the temporary repair VM.
96
+
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, regenerates the corresponding GRUB configuration file, and then swaps the broken VM's OS disk with the copied fixed disk. Finally, the `repair-button` script automatically deletes the resource group containing the temporary repair VM.
97
97
98
-
### <a id="reinstall-grub-regenerate-grub-configuration-file"></a>Reinstall GRUB and regenerate GRUB configuration file manually
98
+
### <a id="reinstall-grub-regenerate-grub-configuration-file"></a>Reinstall GRUB and regenerate the GRUB configuration file manually
99
99
100
100
1. Check whether a rescue/repair VM was created. If it wasn't created, follow step 1 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to create the VM. Mount all the required file systems, including `/` and `/boot` in the rescue/repair VM, and then enter the [chroot](chroot-environment-linux.md) environment.
101
101
@@ -151,9 +151,9 @@ This error might be associated with one of the following issues:
151
151
152
152
* GRUB boot loader points to an invalid disk or partition.
153
153
154
-
To resolve this issue, [reinstall GRUB and regenerate GRUB configuration file](#reinstall-grub-regenerate-grub-configuration-file).
154
+
To resolve this issue, [reinstall GRUB and regenerate the GRUB configuration file-manually](#reinstall-grub-regenerate-the-grub-configuration-file-manually).
155
155
156
-
* OS disk partition table issues caused by human errors.
156
+
* OS disk partition table issues caused by human error.
157
157
158
158
To resolve such issues, follow the steps in [Error: No such partition](#no-such-partition) to re-create the `/boot` partition if missing or created incorrectly.
159
159
@@ -179,7 +179,7 @@ To resolve this issue, follow these steps:
179
179
180
180
2. Inspect the `/boot` file system contents and determine what's missing.
181
181
182
-
3. If the GRUB configuration file is missing, [reinstall GRUB and regenerate GRUB configuration file](#reinstall-grub-regenerate-grub-configuration-file).
182
+
3. If the GRUB configuration file is missing, [reinstall GRUB and regenerate the GRUB configuration file manually](#reinstall-grub-regenerate-the-grub-configuration-file-manually).
183
183
184
184
4. Verify that the file permissions in the `/boot` file system are OK. You can compare the permissions by using another VM that's running the same Linux version.
185
185
@@ -193,7 +193,7 @@ The following screenshot shows the error message:
193
193
194
194
:::image type="content" source="./media/troubleshoot-vm-boot-error/grub-normal-file-not-found.png" alt-text="Screenshot of grub error normal.mod not found.":::
195
195
196
-
1. Check whether a rescue/repair VM was created. If it wasn't created, follow step 1 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to create one. Mount all the required file systems, including / and /boot in the rescue/repair VM, and then enter the [chroot](chroot-environment-linux.md) environment.
196
+
1. Check whether a rescue/repair VM was created. If it wasn't created, follow step 1 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to create one. Mount all the required file systems, including `/` and `/boot` in the rescue/repair VM, and then enter the [chroot](chroot-environment-linux.md) environment.
197
197
198
198
2. If you're unable to mount the `/boot` file system due to a corruption error, [fix /boot file system corruption](#fix-boot-file-system-corruption).
199
199
@@ -265,19 +265,19 @@ If the `/boot` partition is missing, re-create it by following these steps:
265
265
266
266
3. If the partition table has **dos** as the partition table type, [re-create /boot partition in dos systems](#re-create-boot-partition-in-dos-systems). If the partition table has **GPT** as the partition table type, [re-create /boot partition in GPT systems](#re-create-boot-partition-in-gpt-systems).
267
267
268
-
4. Make sure that the GRUB boot loader is installed by using the proper disk. You can follow the steps in [Reinstall GRUB and regenerate GRUB configuration file](#reinstall-grub-regenerate-grub-configuration-file) to get it installed and configured.
268
+
4. Make sure that the GRUB boot loader is installed by using the proper disk. You can follow the steps in [Reinstall GRUB and regenerate the GRUB configuration file manually](#reinstall-grub-regenerate-the-grub-configuration-file-manually) to get it installed and configured.
269
269
270
270
5. Proceed with step 3 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to swap the OS disk.
271
271
272
272
#### <a id="re-create-boot-partition-in-dos-systems"></a>Re-create /boot partition in dos systems
273
273
274
-
1. Re-create the /boot partition from a rescue/repair VM by using the following command:
274
+
1. Re-create the `/boot` partition from a rescue/repair VM by using the following command:
275
275
276
276
```bash
277
277
sudo fdisk /dev/sdX
278
278
```
279
279
280
-
Use the default values in the **First** and **Last** sectors, and **partition type** (83). Make sure the /boot partition table is marked as bootable by using the `a` option in the `fdisk` tool, as shown in the following output:
280
+
Use the default values in the **First** and **Last** sectors, and **partition type** (83). Make sure the `/boot` partition table is marked as bootable by using the `a` option in the `fdisk` tool, as shown in the following output:
281
281
282
282
```output
283
283
sudo fdisk /dev/sdc
@@ -344,7 +344,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
344
344
345
345
#### <a id="re-create-boot-partition-in-gpt-systems"></a>Re-create /boot partition in GPT systems
346
346
347
-
1. Re-create the /boot partition by using the following command, from a rescue/repair VM:
347
+
1. Re-create the `/boot` partition from a rescue/repair VM by using the following command:
348
348
349
349
```bash
350
350
sudo gdisk /dev/sdX
@@ -402,7 +402,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
402
402
The operation has completed successfully.
403
403
```
404
404
405
-
2. Check whether the /boot file system is detected by the system by using the following command:
405
+
2. Check whether the `/boot` file system is detected by the system by using the following command:
406
406
407
407
```bash
408
408
sudo blkid /dev/sdX1
@@ -415,7 +415,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
3. If the /boot file system isn't visible after you re-create the partition, this means that the /boot data no longer exists. You have to re-create the /boot file system (by using the same UUID that's in the `/etc/fstab` `/boot` entry), and then [restore its contents from a backup](/azure/backup/backup-azure-arm-restore-vms).
418
+
3. If the `/boot` file system isn't visible after you re-create the partition, this means that the `/boot` data no longer exists. You have to re-create the `/boot` file system (by using the same UUID that's in the `/etc/fstab` `/boot` entry), and then [restore its contents from a backup](/azure/backup/backup-azure-arm-restore-vms).
419
419
420
420
## <a id="grub_efi_get_secure_boot"></a>Error: symbol 'grub_efi_get_secure_boot' not found
421
421
@@ -429,7 +429,7 @@ Linux kernel version 4.12.14 (that's used in SLES 12 SP5) doesn't support the [S
429
429
430
430
To resolve the boot error, follow these steps:
431
431
432
-
1. Check whether a rescue/repair VM was created. If it wasn't created, follow step 1 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to create the VM. Mount all the required file systems, including / and /boot, and then enter the [chroot](chroot-environment-linux.md) environment.
432
+
1. Check whether a rescue/repair VM was created. If it wasn't created, follow step 1 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to create the VM. Mount all the required file systems, including `/` and `/boot`, and then enter the [chroot](chroot-environment-linux.md) environment.
433
433
434
434
2. Run the following [YaST](https://yast.opensuse.org) command in the chroot environment:
435
435
@@ -453,7 +453,7 @@ This kind of error is triggered in one of the following scenarios:
453
453
454
454
* The GRUB configuration file is missing.
455
455
* The wrong GRUB configuration is used.
456
-
* The /boot partition or its contents are missing.
456
+
* The `/boot` partition or its contents are missing.
457
457
458
458
To resolve this error, follow these steps:
459
459
@@ -467,7 +467,7 @@ To resolve this error, follow these steps:
467
467
*[GRUB access in SUSE SLES](serial-console-grub-single-user-mode.md#grub-access-in-suse-sles)
468
468
*[GRUB access in Oracle Linux](serial-console-grub-single-user-mode.md#grub-access-in-oracle-linux)
469
469
470
-
3.[Reinstall GRUB and regenerate GRUB configuration file](#reinstall-grub-regenerate-grub-configuration-file).
470
+
3.[Reinstall GRUB and regenerate the GRUB configuration file manually](#reinstall-grub-regenerate-the-grub-configuration-file-manually).
471
471
472
472
> [!NOTE]
473
473
> If the missing file is `/boot/grub/menu.lst`, this error is for older OS versions (RHEL 6.x, Centos 6.x and Ubuntu 14.04). The commands will differ because GRUB version 1 is used in those systems instead. GRUB version 1 isn't covered in this article.
0 commit comments