Skip to content

Commit

Permalink
Add some additional comments on what the chroot commands are doing
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-zimmerman committed Sep 27, 2023
1 parent e0de735 commit f1d07b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions content/login-from-live-disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ section: software-troubleshooting
tableOfContents: true
---

## Login from Live Disk (Chroot)
## Log in from Live Disk (Chroot)

It is possible to mount an OS drive and log into the installed OS with root access. This is called gaining "chroot" (change to root) access. This process is useful when [rescuing files](/articles/disaster-recovery), [fixing package manager issues](/articles/package-manager-pop), or [resetting forgotten user passwords](/articles/password).

Expand Down Expand Up @@ -59,17 +59,20 @@ To access an encrypted disk, run these additional commands to unlock the encrypt
>**Note:** You will see "Enter passphrase for /dev/nvme0n1p3 (or the name of your exact drive):" - Enter your encryption password here. You will "enter this blind," i.e. you won't see the characters typed out. Then press Enter.

Check failure on line 59 in content/login-from-live-disk.md

View workflow job for this annotation

GitHub Actions / Lint (Markdown)

Trailing spaces [Expected: 0 or 2; Actual: 1]
```bash
# scan for logical volumes
sudo lvscan
# scan and setup volume groups
sudo vgchange -ay
```

>**Note:** Pay attention to what the `cryptdata` group is called. If it is named something other than `data-root`, substitute the correct info into this next command. Make sure that `-root` is on the end:
```bash
# setup access to the encrypted file system on '/mnt'
sudo mount /dev/mapper/data-root /mnt
```

Now the existing hard drive can be accessed by going to the `/mnt` folder. To use the <u>Files</u> program, go to `+ Other Locations` -> `Computer` and then click on the `/mnt` folder.
**Note:** If you want to backup your files, you can do so at this point in the process if you don't already have a [backup of your data](https://support.system76.com/articles/backup-files/)

## Chroot

Expand All @@ -82,6 +85,7 @@ The EFI partition is the next partition to be mounted. To help identify it, this
| ```sudo mount /dev/sda1 /mnt/boot/efi``` | ```sudo mount /dev/nvme0n1p1 /mnt/boot/efi``` |

```bash
# mount several "kernel" virtual file systems from the live system to '/mnt/'
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
```
Expand Down

0 comments on commit f1d07b6

Please sign in to comment.