-
Notifications
You must be signed in to change notification settings - Fork 0
chroot
XADE edited this page Dec 10, 2023
·
1 revision
How to chroot?
mount /dev/... /mnt # mount ROOT device
cd /mnt/name_of_installation/
export PATH="$PATH:/bin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/run/wrappers/bin:/root/.nix-profile/bin:/etc/profiles/per-user/root/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
mount /dev/... fat # mount FAT partition
mount -R /sys sys
mount -R /dev dev
mount -R /run run
mount -R /proc proc
mount -R . .
chroot . /nix/var/nix/profiles/system/activate # for NIXOS only
chroot . /run/current-system/sw/bin/bash # for NIXOS only
chroot . /bin/sh