Add fedora_chroot.md
This commit is contained in:
parent
ab2650edb8
commit
55a6b50b46
38
fedora_chroot.md
Normal file
38
fedora_chroot.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
|
||||||
|
## Find root partition
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo lsblk -f
|
||||||
|
```
|
||||||
|
|
||||||
|
## Enter
|
||||||
|
|
||||||
|
- `--bind` makes the contents accessible in both locations
|
||||||
|
- `-t` defines the filesystem type.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo mount /dev/nvme0n1p5 /mnt
|
||||||
|
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
|
||||||
|
|
||||||
|
sudo mount --bind /dev /mnt/dev
|
||||||
|
|
||||||
|
mount -t proc /proc /mnt/proc
|
||||||
|
mount -t sysfs /sys /mnt/sys
|
||||||
|
mount -t tmpfs tmpfs /mnt/run
|
||||||
|
|
||||||
|
mkdir -p /mnt/run/systemd/resolve/
|
||||||
|
echo 'nameserver 1.1.1.1' > /mnt/run/systemd/resolve/stub-resolv.conf
|
||||||
|
chroot /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Exit
|
||||||
|
|
||||||
|
```
|
||||||
|
exit
|
||||||
|
umount /mnt/dev
|
||||||
|
umount /mnt/proc
|
||||||
|
umount /mnt/sys
|
||||||
|
umount /mnt/run
|
||||||
|
umount /mnt
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user