Add chroot info

pull/1/head
Inex Code 2022-06-21 16:45:39 +03:00
parent b40d2627e3
commit 33a7782340
1 changed files with 19 additions and 0 deletions

19
src/nixos/chroot.md Normal file
View File

@ -0,0 +1,19 @@
# Entering nixos chroot from rescue
```
mount /dev/sda1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt /nix/var/nix/profiles/system/activate
cp /etc/resolv.conf /mnt/etc/
chroot /mnt /run/current-system/sw/bin/bash
```
Use `--option sandbox false` when `nixos-rebuild`