Skip to content

Commit ce1b311

Browse files
authored
Updates from editor
1 parent e96db19 commit ce1b311

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

support/azure/virtual-machines/linux/troubleshoot-vm-boot-error.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ grub rescue>
6161

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

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).
6565

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

6868
> [!NOTE]
6969
> In the commands mentioned in the following sections, replace `/dev/sdX` with the corresponding Operating System (OS) disk device.
7070
71-
### <a id="reinstall-grub-regenerate-grub-configuration-file-repairvm"></a> Reinstall GRUB and regenerate GRUB configuration file using Azure Linux Auto Repair
71+
### <a id="reinstall-grub-regenerate-grub-configuration-file-repairvm"></a> Reinstall GRUB and regenerate the GRUB configuration file using Azure Linux Auto Repair
7272

7373
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.
7474

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:
7676

7777
* **Linux VMs without UEFI (BIOS based - Gen1):**
7878

@@ -93,9 +93,9 @@ The ALAR scripts use the repair extension `repair-button` to fix GRUB issues by
9393
> [!IMPORTANT]
9494
> Replace the resource group name `$RGNAME` and VM name `$VMNAME` accordingly.
9595
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 VM with 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.
9797
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
9999
100100
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.
101101
@@ -151,9 +151,9 @@ This error might be associated with one of the following issues:
151151
152152
* GRUB boot loader points to an invalid disk or partition.
153153
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).
155155
156-
* OS disk partition table issues caused by human errors.
156+
* OS disk partition table issues caused by human error.
157157
158158
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.
159159
@@ -179,7 +179,7 @@ To resolve this issue, follow these steps:
179179
180180
2. Inspect the `/boot` file system contents and determine what's missing.
181181
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).
183183
184184
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.
185185
@@ -193,7 +193,7 @@ The following screenshot shows the error message:
193193
194194
:::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.":::
195195
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.
197197
198198
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).
199199
@@ -265,19 +265,19 @@ If the `/boot` partition is missing, re-create it by following these steps:
265265
266266
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).
267267
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.
269269
270270
5. Proceed with step 3 in [Troubleshoot GRUB rescue issue offline](#offline-troubleshooting) to swap the OS disk.
271271
272272
#### <a id="re-create-boot-partition-in-dos-systems"></a>Re-create /boot partition in dos systems
273273
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:
275275
276276
```bash
277277
sudo fdisk /dev/sdX
278278
```
279279
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:
281281
282282
```output
283283
sudo fdisk /dev/sdc
@@ -344,7 +344,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
344344
345345
#### <a id="re-create-boot-partition-in-gpt-systems"></a>Re-create /boot partition in GPT systems
346346
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:
348348
349349
```bash
350350
sudo gdisk /dev/sdX
@@ -402,7 +402,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
402402
The operation has completed successfully.
403403
```
404404
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:
406406
407407
```bash
408408
sudo blkid /dev/sdX1
@@ -415,7 +415,7 @@ If the `/boot` partition is missing, re-create it by following these steps:
415415
/dev/sdc1: UUID="<UUID>" BLOCK_SIZE="4096" TYPE="xfs" PARTLABEL="Linux filesystem" PARTUUID="<PARTUUID>"
416416
```
417417
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).
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).
419419
420420
## <a id="grub_efi_get_secure_boot"></a>Error: symbol 'grub_efi_get_secure_boot' not found
421421
@@ -429,7 +429,7 @@ Linux kernel version 4.12.14 (that's used in SLES 12 SP5) doesn't support the [S
429429
430430
To resolve the boot error, follow these steps:
431431
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.
433433
434434
2. Run the following [YaST](https://yast.opensuse.org) command in the chroot environment:
435435
@@ -453,7 +453,7 @@ This kind of error is triggered in one of the following scenarios:
453453

454454
* The GRUB configuration file is missing.
455455
* The wrong GRUB configuration is used.
456-
* The /boot partition or its contents are missing.
456+
* The `/boot` partition or its contents are missing.
457457

458458
To resolve this error, follow these steps:
459459

@@ -467,7 +467,7 @@ To resolve this error, follow these steps:
467467
* [GRUB access in SUSE SLES](serial-console-grub-single-user-mode.md#grub-access-in-suse-sles)
468468
* [GRUB access in Oracle Linux](serial-console-grub-single-user-mode.md#grub-access-in-oracle-linux)
469469

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).
471471

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

Comments
 (0)