Skip to content

Commit a2dc87a

Browse files
authored
Improve grammar and clarity in chroot environment guide
Edit review per CI 3975
1 parent 4d9042a commit a2dc87a

1 file changed

Lines changed: 47 additions & 46 deletions

File tree

support/azure/virtual-machines/linux/chroot-environment-linux.md

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ ms.author: genli
2121

2222
[!INCLUDE [CentOS End Of Life](../../../includes/centos-end-of-life-note.md)]
2323

24-
This article describes how to troubleshoot the chroot environment in the rescue virtual machine (VM) in Linux.
24+
This article describes how to troubleshoot the chroot environment on a rescue virtual machine (VM) in Linux.
2525

2626
## Ubuntu
2727

2828
1. Stop or deallocate the affected VM.
29-
1. Create a rescue VM of the same generation, same OS version, in same resource group and location using managed disk.
30-
1. Use the Azure portal to take a snapshot of the affected virtual machine's OS disk.
29+
1. Create a rescue VM of the same generation and the same OS version in same resource group and location by using a managed disk.
30+
1. Use the Azure portal to take a snapshot of the affected VM's OS disk.
3131
1. Create a disk out of the snapshot of the OS disk, and attach it to the rescue VM.
32-
1. Once the disk has been created, troubleshoot the chroot environment in the rescue VM.
32+
1. After the disk is created, troubleshoot the chroot environment on the rescue VM.
3333

3434
1. Access your VM as the root user by using the following command:
3535

3636
`sudo su -`
3737

38-
1. Find the disk using `dmesg` (the method you use to discover your new disk may vary). The following example uses `dmesg` to filter on Small Computer Systems Interface (SCSI) disks:
38+
1. Find the disk. The method that you use to discover your new disk may vary. We recommend that you use the `dmesg` command. The following example uses `dmesg` to filter on Small Computer Systems Interface (SCSI) disks:
3939

4040
`dmesg | grep SCSI`
4141

@@ -66,9 +66,9 @@ This article describes how to troubleshoot the chroot environment in the rescue
6666
chroot /rescue
6767
```
6868
> [!NOTE]
69-
> On newer Ubuntu images, there is only one partition for `/boot`. If you are recovering an older Ubuntu image, you can ignore errors when mounting `/dev/sdc16` to `/rescue/boot`, as long as there are files in `/rescue/boot` after completing these steps.
69+
> On newer Ubuntu images, there is only one partition for the `/boot` folder. If you are recovering an older Ubuntu image, you can ignore any errors that occur when you mount `/dev/sdc16` to `/rescue/boot`. However, make sure that there are files in `/rescue/boot` after you complete these steps.
7070
>
71-
> If an error occurs during mounting, it will be safe to ignore the error that may occur when you unmount `/rescue/boot` in the step v.
71+
> If an error does occur during mounting, you can safely ignore an error that may occur when you unmount `/rescue/boot` in the step 5e.
7272
7373
1. Troubleshoot the chroot environment.
7474
@@ -89,24 +89,24 @@ This article describes how to troubleshoot the chroot environment in the rescue
8989
```
9090
9191
> [!NOTE]
92-
> If you receive the error message "unable to unmount /rescue," add the `-l` option to the `umount` command, for example, `umount -l /rescue`.
92+
> If you receive an "unable to unmount /rescue" error message, add the `-l` option to the `umount` command. For example: `umount -l /rescue`.
9393
94-
1. Detach the disk from the rescue VM and perform a disk swap with the original VM.
95-
1. Start the original VM and check its connectivity.
94+
1. Detach the disk from the rescue VM, and then perform a disk swap with the original VM.
95+
1. Start the original VM, and check its connectivity.
9696
97-
## RHEL/Centos/Oracle 6.x && Oracle 8.x && RHEL/Centos 7.x with RAW Partitions
97+
## RHEL/Centos/Oracle 6.x && Oracle 8.x && RHEL/Centos 7.x with RAW partitions
9898
9999
1. Stop or deallocate the affected VM.
100-
1. Create a rescue VM image of the same OS version in the same resource group (RSG) and location using a managed disk.
101-
1. Use the Azure portal to take a snapshot of the affected virtual machine's OS disk.
102-
1. Create a disk out of the snapshot of the OS disk, and attach it to the rescue VM.
103-
1. Once the disk has been created, troubleshoot the chroot environment in the rescue VM.
100+
1. Create a rescue VM image of the same OS version in the same resource group (RSG) and location by using a managed disk.
101+
1. Use the Azure portal to take a snapshot of the affected VM's OS disk.
102+
1. Create a disk out of the snapshot of the OS disk, and then attach it to the rescue VM.
103+
1. After the disk is created, troubleshoot the chroot environment on the rescue VM.
104104
105105
1. Access your VM as the root user by using the following command:
106106
107107
`sudo su -`
108108
109-
1. Find the disk using `dmesg` (the method you use to discover your new disk may vary). The following example uses `dmesg` to filter on SCSI disks:
109+
1. Find the disk. The method that you use to discover your new disk may vary. We recommend that you use the `dmesg` command. The following example uses `dmesg` to filter on SCSI disks:
110110
111111
`dmesg | grep SCSI`
112112
@@ -153,10 +153,10 @@ This article describes how to troubleshoot the chroot environment in the rescue
153153
```
154154
155155
> [!NOTE]
156-
> If you receive the error message "unable to unmount /rescue," add the `-l` option to the `umount` command, for example, `umount -l /rescue`.
156+
> If you receive an "unable to unmount /rescue" error message, add the `-l` option to the `umount` command. For example: `umount -l /rescue`.
157157
158-
1. Detach the disk from the rescue VM and perform a disk swap with the original VM.
159-
1. Start the original VM and check its connectivity.
158+
1. Detach the disk from the rescue VM, and then perform a disk swap with the original VM.
159+
1. Start the original VM, and check its connectivity.
160160
161161
## RHEL/Centos 7.x & 8.X with LVM
162162
@@ -173,7 +173,7 @@ This article describes how to troubleshoot the chroot environment in the rescue
173173
174174
`sudo su -`
175175
176-
1. Find the disk using `dmesg` (the method you use to discover your new disk may vary). The following example uses `dmesg` to filter on SCSI disks:
176+
1. Find the disk. The method that you use to discover your new disk may vary. We recommend that5 you use the `dmesg` command. The following example uses `dmesg` to filter on SCSI disks:
177177
178178
`dmesg | grep SCSI`
179179
@@ -235,7 +235,7 @@ This article describes how to troubleshoot the chroot environment in the rescue
235235
mount /dev/sdc1 /rescue/boot/efi
236236
```
237237
238-
The */rescue/boot/* and */rescue/boot/efi* partitions may not always be located on */dev/sdc2* or */dev/sdc1*. If you encounter an error while trying to mount these partitions, check the */rescue/etc/fstab* file to determine the correct devices for the */boot* and */boot/efi* partitions from the broken OS disk. Then, run the `blkid` command and compare the Universal Unique Identifier (UUID) from the */rescue/etc/fstab* file with the output of the `blkid` command to determine the correct device for mounting */rescue/boot/* and */rescue/boot/efi* in the repair VM.
238+
The */rescue/boot/* and */rescue/boot/efi* partitions may not always be located on */dev/sdc2* or */dev/sdc1*. If you encounter an error when you try to mount these partitions, check the */rescue/etc/fstab* file to determine the correct devices for the */boot* and */boot/efi* partitions from the broken OS disk. Then, run the `blkid` command and compare the Universal Unique Identifier (UUID) from the */rescue/etc/fstab* file to the output of the `blkid` command to determine the correct device for mounting */rescue/boot/* and */rescue/boot/efi* in the repair VM.
239239
240240
The `mount /dev/mapper/rootvg-optlv /rescue/opt` command may fail if the *rootvg-optlv* volume group doesn't exist. In this case, you can bypass this command.
241241
@@ -274,19 +274,19 @@ This article describes how to troubleshoot the chroot environment in the rescue
274274
```
275275
276276
> [!NOTE]
277-
> If you receive the error message "unable to unmount /rescue," add the `-l` option to the `umount` command, for example, `umount -l /rescue`.
277+
> If you receive an "unable to unmount /rescue" error message, add the `-l` option to the `umount` command. For example: `umount -l /rescue`.
278278
279-
1. Detach the disk from the rescue VM and perform a disk swap with the original VM.
280-
1. Start the original VM and check its connectivity.
279+
1. Detach the disk from the rescue VM, and then perform a disk swap with the original VM.
280+
1. Start the original VM, and check its connectivity.
281281
282282
### Using the same LVM image
283283
284284
> [!NOTE]
285-
> If you need to deploy the rescue VM by using the same LVM image, you need to modify some aspects of the rescue VM with LVM.
285+
> If you have to deploy the rescue VM by using the same LVM image, you must modify some aspects of the rescue VM with LVM.
286286
287-
The following commands are to be executed on the recovery/rescue VM that's temporarily created for the recovery operation.
287+
The following commands are to be run on the recovery (rescue) VM that's temporarily created for the recovery operation.
288288
289-
1. Use the following command to check the status of the disks prior to attaching the disk you want to rescue:
289+
1. Use the following command to check the status of the disks before you attach the disk that you want to rescue:
290290
291291
```bash
292292
sudo lsblk -f
@@ -309,7 +309,7 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
309309
└─sdb1 ext4 e72e7c2c-db27-4a73-a97e-01d63d21ccf8 /mnt
310310
```
311311

312-
2. Attach the disk you want to rescue as a data drive.
312+
2. Attach the disk that you want to rescue as a data drive.
313313
3. Check the disks again by using the following command:
314314

315315
```bash
@@ -477,7 +477,7 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
477477
sudo mount -o bind /run /rescue/run
478478
```
479479

480-
The */rescue/boot/* and */rescue/boot/efi* partitions may not always be located on */dev/sdc2* or */dev/sdc1*. If you encounter an error while trying to mount these partitions, check the */rescue/etc/fstab* file to determine the correct devices for the */boot* and */boot/efi* partitions from the broken OS disk. Then, run the `blkid` command and compare the UUID from the */rescue/etc/fstab* file with the output of the `blkid` command to determine the correct device for mounting */rescue/boot/* and */rescue/boot/efi* in the repair VM. Duplicated UUIDs may appear in the output. In this scenario, mount the partition that matches the device letter from step 5. In the example of this section, the correct partition you should mount is */dev/sdc*. The *dev/sda* represents the operating system currently in use and should be ignored.
480+
The */rescue/boot/* and */rescue/boot/efi* partitions may not always be located on */dev/sdc2* or */dev/sdc1*. If you encounter an error whem you try to mount these partitions, check the */rescue/etc/fstab* file to determine the correct devices for the */boot* and */boot/efi* partitions from the broken OS disk. Then, run the `blkid` command and compare the UUID from the */rescue/etc/fstab* file to the output of the `blkid` command to determine the correct device for mounting */rescue/boot/* and */rescue/boot/efi* on the repair VM. Duplicated UUIDs may appear in the output. In this scenario, mount the partition that matches the device letter from step 5. In the example of this section, the correct partition that you should mount is */dev/sdc*. The *dev/sda* represents the operating system that's currently in use and should be ignored.
481481

482482
10. Verify the mounts by using the following command:
483483

@@ -519,7 +519,7 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
519519
sudo chroot /rescue/
520520
```
521521

522-
12. Verify the mounts "inside" the chroot environment by using the following command:
522+
12. Verify the mounts that are "inside" the chroot environment by using the following command:
523523

524524
```bash
525525
sudo lsblk -f
@@ -554,7 +554,7 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
554554
```
555555
Now, *rescuemevg-rootlv* is the one mounted on */*.
556556

557-
13. Rename the Volume Group (VG) to keep it consistent by using the following command. Renaming the VG keeps you from facing issues when regenerating the initrd and booting the disk again on the original VM.
557+
13. Rename the Volume Group (VG) to keep it consistent by using the following command. Renaming the VG helps you to avoid issues that might occur when you regenerate the initrd and restart the disk on the original VM.
558558

559559
```bash
560560
sudo vgrename rescuemevg rootvg
@@ -598,14 +598,14 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
598598
└─rootvg-rootlv xfs d8dc4d62-ada5-4952-a0d9-1bce6cb6f809 /
599599
```
600600

601-
15. Proceed with the required activities to rescue the OS. These activities may include regenerating initramfs or the GRUB configuration.
601+
15. Perform the required activities to rescue the OS. These activities may include regenerating initramfs or the GRUB configuration.
602602
16. Exit the chroot environment by using the following command:
603603

604604
```bash
605605
sudo exit
606606
```
607607

608-
17. Unmount and detach the data disk from the rescue VM and perform a disk swap with the original VM by using the following commands:
608+
17. Unmount and detach the data disk from the rescue VM, and then perform a disk swap with the original VM by using the following commands:
609609

610610
```bash
611611
umount /rescue/run/
@@ -623,21 +623,21 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
623623
umount /rescue
624624
```
625625

626-
18. Start the original VM and verify its functionality.
626+
18. Start the original VM, and verify its functionality.
627627

628-
## Oracle 7.x
628+
## Oracle 7._x_
629629

630630
1. Stop or deallocate the affected VM.
631-
1. Create a rescue VM image of the same OS version, in the same resource group (RSG) and location using a managed disk.
632-
1. Use the Azure portal to take a snapshot of the affected virtual machine's OS disk.
631+
1. Create a rescue VM image of the same OS version in the same resource group (RSG) and location by using a managed disk.
632+
1. Use the Azure portal to take a snapshot of the affected VM's OS disk.
633633
1. Create a disk out of the snapshot of the OS disk, and attach it to the rescue VM.
634-
1. Once the disk has been created, troubleshoot the chroot environment in the rescue VM.
634+
1. After the disk is created, troubleshoot the chroot environment on the rescue VM.
635635
636636
1. Access your VM as the root user by using the following command:
637637
638638
`sudo su -`
639639
640-
1. Find the disk by using `dmesg` (the method you use to discover your new disk may vary). The following example uses `dmesg` to filter on SCSI disks:
640+
1. Find the disk. The method that you use to discover your new disk may vary. We recommend that you use the `dmesg` command. The following example uses `dmesg` to filter on SCSI disks:
641641
642642
`dmesg | grep SCSI`
643643
@@ -685,15 +685,15 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
685685
```
686686
687687
> [!NOTE]
688-
> If you receive the error message "unable to unmount /rescue," add the `-l` option to the `umount` command, for example, `umount -l /rescue`.
688+
> If you receive an "unable to unmount /rescue" error message, add the `-l` option to the `umount` command. For example: `umount -l /rescue`.
689689
690-
1. Detach the disk from the rescue VM and perform a disk swap with the original VM.
691-
1. Start the original VM and check its connectivity.
690+
1. Detach the disk from the rescue VM, and then perform a disk swap with the original VM.
691+
1. Start the original VM, and check its connectivity.
692692
693693
## SUSE-SLES 12 SP4, SUSE-SLES 12 SP4 For SAP && ## SUSE-SLES 15 SP1, SUSE-SLES 15 SP1 For SAP
694694
695695
1. Stop or deallocate the affected VM.
696-
1. Create a rescue VM image of the same OS version, in the same resource group (RSG) and location using a managed disk.
696+
1. Create a rescue VM image of the same OS version in the same resource group (RSG) and location by using a managed disk.
697697
1. Use the Azure portal to take a snapshot of the affected virtual machine's OS disk.
698698
1. Create a disk out of the snapshot of the OS disk, and attach it to the rescue VM.
699699
1. Once the disk has been created, troubleshoot the chroot environment in the rescue VM.
@@ -702,7 +702,7 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
702702

703703
`sudo su -`
704704

705-
1. Find the disk using `dmesg` (the method you use to discover your new disk may vary). The following example uses `dmesg` to filter on SCSI disks:
705+
1. Find the disk. The method you use to discover your new disk may vary. We recommend that you use the `dmesg` command. The following example uses `dmesg` to filter on SCSI disks:
706706

707707
`dmesg | grep SCSI`
708708

@@ -752,11 +752,12 @@ The following commands are to be executed on the recovery/rescue VM that's tempo
752752
> [!NOTE]
753753
> If you receive the error message "unable to unmount /rescue," add the `-l` option to the `umount` command, for example, `umount -l /rescue`.
754754

755-
1. Detach the disk from the rescue VM and perform a disk swap with the original VM.
756-
1. Start the original VM and check its connectivity.
755+
1. Detach the disk from the rescue VM, and then perform a disk swap with the original VM.
756+
1. Start the original VM, and check its connectivity.
757757

758758
## Next Steps
759759

760760
- [Troubleshoot ssh connection](troubleshoot-ssh-connection.md)
761761

762762
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
763+
a

0 commit comments

Comments
 (0)