Skip to content

Commit 0d8c225

Browse files
author
vilibert
committed
added changes as requested
1 parent 20515e2 commit 0d8c225

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

articles/virtual-machines/troubleshooting/chroot-lvm.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Assign a name to your new disk, select the same Resource Group as the snapshot,
4949
The **Source type** is **Snapshot** .
5050
The **Source snapshot** is the name of the **snapshot** previously created.
5151

52-
![createdisk2](./media/chroot-logical-volume-manager/create-disk-from-snap-2.png)
52+
![create disk 2](./media/chroot-logical-volume-manager/create-disk-from-snap-2.png)
5353

5454
Create a mount point for the attached disk.
5555

@@ -61,15 +61,15 @@ Run the **fdisk -l** command to verify the snapshot disk has been attached and l
6161

6262
Most scenarios, the attached snapshot disk will be seen as **/dev/sdc** displaying two partitions **/dev/sdc1** and **/dev/sdc2**
6363

64-
![fdisk](./media/chroot-logical-volume-manager/fdisk-output-sdc.png)
64+
![Fdisk](./media/chroot-logical-volume-manager/fdisk-output-sdc.png)
6565

6666
The **\*** indicates a boot partition, both partitions are to be mounted.
6767

6868
Run the command **lsblk** to see the LVMs of the affected VM
6969

7070
`lsblk`
7171

72-
![run lsblk](./media/chroot-logical-volume-manager/lsblk-output-mounted.png)
72+
![Run lsblk](./media/chroot-logical-volume-manager/lsblk-output-mounted.png)
7373

7474

7575
Verify if LVMs from the affected VM are displayed.
@@ -92,7 +92,7 @@ The output of the next command will show the path to mount for the **root** LV
9292

9393
`pvdisplay -m | grep -i rootlv`
9494

95-
![rootlv](./media/chroot-logical-volume-manager/locate-rootlv.png)
95+
![Rootlv](./media/chroot-logical-volume-manager/locate-rootlv.png)
9696

9797
Proceed to mount this device on the directory /rescue
9898

@@ -107,11 +107,11 @@ mount /dev/sdc1 /rescue/boot
107107
Verify the file systems of the attached disk are now correctly mounted using the **lsblk** command
108108

109109

110-
![run lsblk](./media/chroot-logical-volume-manager/lsblk-output.png)
110+
![Run lsblk](./media/chroot-logical-volume-manager/lsblk-output.png)
111111

112112
or the **df -Th** command
113113

114-
![df](./media/chroot-logical-volume-manager/df-output.png)
114+
![Df](./media/chroot-logical-volume-manager/df-output.png)
115115

116116
## Gaining chroot access
117117

@@ -143,7 +143,7 @@ Commands can be used to install, remove and update software. Troubleshoot VMs in
143143

144144

145145
Execute the lsblk command and the /rescue is now / and /rescue/boot is /boot
146-
![chrooted](./media/chroot-logical-volume-manager/chrooted.png)
146+
![Chrooted](./media/chroot-logical-volume-manager/chrooted.png)
147147

148148
## Perform Fixes
149149

@@ -169,19 +169,19 @@ grub2-mkconfig -o /boot/grub2/grub.cfg
169169
*walkthrough*
170170

171171
The **grep** command lists the kernels that **grub.cfg** is aware of.
172-
![kernels](./media/chroot-logical-volume-manager/kernels.png)
172+
![Kernels](./media/chroot-logical-volume-manager/kernels.png)
173173

174174
**grub2-editenv list** displays which kernel will be loaded at next boot
175-
![kernel_default](./media/chroot-logical-volume-manager/kernel-default.png)
175+
![Kernel default](./media/chroot-logical-volume-manager/kernel-default.png)
176176

177177
**grub2-set-default** is used to change to another kernel
178-
![grub2_set](./media/chroot-logical-volume-manager/grub2_set_default.png)
178+
![Grub2 set](./media/chroot-logical-volume-manager/grub2-set-default.png)
179179

180180
**grub2-editenv** list displays which kernel will be loaded at next boot
181-
![new_kernel](./media/chroot-logical-volume-manager/kernel-new.png)
181+
![New kernel](./media/chroot-logical-volume-manager/kernel-new.png)
182182

183183
**grub2-mkconfig** rebuilds grub.cfg using the versions required
184-
![grub2_mkconfig](./media/chroot-logical-volume-manager/grub2-mkconfig.png)
184+
![Grub2 mkconfig](./media/chroot-logical-volume-manager/grub2-mkconfig.png)
185185

186186

187187

@@ -194,22 +194,22 @@ Run the **lvs** command to verify which **LVs** are available for mounting, ever
194194

195195
Exit the **chroot** environment mount the required **LV**
196196

197-
![advanced](./media/chroot-logical-volume-manager/advanced.png)
197+
![Advanced](./media/chroot-logical-volume-manager/advanced.png)
198198

199199
Now access the **chroot** environment again by running
200200

201201
`chroot /rescue`
202202

203203
All LVs should be visible as mounted partitions
204204

205-
![advanced](./media/chroot-logical-volume-manager/chroot-all-mounts.png)
205+
![Advanced](./media/chroot-logical-volume-manager/chroot-all-mounts.png)
206206

207207
Query the installed **kernel**
208208

209-
![advanced](./media/chroot-logical-volume-manager/rpm-kernel.png)
209+
![Advanced](./media/chroot-logical-volume-manager/rpm-kernel.png)
210210

211211
If needed upgrade the **kernel**
212-
![advanced](./media/chroot-logical-volume-manager/rpm-remove-kernel.png)
212+
![Advanced](./media/chroot-logical-volume-manager/rpm-remove-kernel.png)
213213

214214

215215
### Example 3 - enable Serial Console
@@ -234,19 +234,19 @@ umount /rescue
234234
Detach the disk from the rescue VM and perform a Disk Swap.
235235

236236
Select the VM from the portal **Disks** and select **detach**
237-
![detachdisk](./media/chroot-logical-volume-manager/detach-disk.png)
237+
![Detach disk](./media/chroot-logical-volume-manager/detach-disk.png)
238238

239239
Save the changes
240-
![savedetach](./media/chroot-logical-volume-manager/save-detach.png)
240+
![Save detach](./media/chroot-logical-volume-manager/save-detach.png)
241241

242242
The disk will now become available allowing it to be swapped with the original OS disk of the affected VM.
243243

244244
Navigate in the Azure portal to the failing VM and select **Disks** -> **Swap OS Disk**
245-
![swapdisk](./media/chroot-logical-volume-manager/swap-disk.png)
245+
![Swap disk](./media/chroot-logical-volume-manager/swap-disk.png)
246246

247247
Complete the fields the **Choose disk** is the snapshot disk just detached in the previous step. The VM name of the affected VM is also required then select **OK**
248248

249-
![newosdisk](./media/chroot-logical-volume-manager/new-osdisk.png)
249+
![New os disk](./media/chroot-logical-volume-manager/new-osdisk.png)
250250

251251
If the VM is running the Disk Swap will shut it down, reboot the VM once the disk swap operation has completed.
252252

0 commit comments

Comments
 (0)