From 55a6b50b46bb03fba57e093afe4a3341b3d7cc23 Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Thu, 10 Jul 2025 21:13:00 +0300 Subject: [PATCH] Add fedora_chroot.md --- fedora_chroot.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 fedora_chroot.md diff --git a/fedora_chroot.md b/fedora_chroot.md new file mode 100644 index 0000000..8158355 --- /dev/null +++ b/fedora_chroot.md @@ -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 +``` \ No newline at end of file