Skip to content

Instantly share code, notes, and snippets.

@ivanaugustobd
Last active February 12, 2022 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanaugustobd/0e575e93fe364f53ff31e0adcf1c9d85 to your computer and use it in GitHub Desktop.
Save ivanaugustobd/0e575e93fe364f53ff31e0adcf1c9d85 to your computer and use it in GitHub Desktop.
Fedora chroot
#!/bin/sh
# Credits:
## https://thomas-leister.de/en/repair-fedora-efi-bootloader/
## https://fedoramagazine.org/os-chroot-101-covering-btrfs-subvolumes/
mkdir -p /mnt/fedora/
mount /dev/nvme0n1p6 /mnt/fedora/ -t btrfs -o subvol=root
mount /dev/nvme0n1p6 /mnt/fedora/home -t btrfs -o subvol=home
mount /dev/nvme0n1p5 /mnt/fedora/boot/
mount /dev/nvme0n1p1 /mnt/fedora/boot/efi/
mount --bind /dev/ /mnt/fedora/dev
#mount --bind /sys /mnt/fedora/sys
#mount --bind /proc /mnt/fedora/proc
mount -t proc /proc /mnt/fedora/proc/
mount -t sysfs /sys /mnt/fedora/sys/
mount -t tmpfs tmpfs /mnt/fedora/run/
chroot /mnt/fedora/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment