File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 12
12
13
13
[ Using your own kexec image] ( ./custom-kexec.md )
14
14
15
+ [ Repair installations without wiping data] ( ./disko-modes.md )
16
+
15
17
[ Secrets and full disk encryption] ( ./secrets.md )
16
18
17
19
[ Use without flakes] ( ./use-without-flakes.md )
Original file line number Diff line number Diff line change
1
+ # Repair installations without wiping data
2
+
3
+ By default, nixos-anywhere will reformat all configured disks before running the
4
+ installation. However it is also possible to mount the filesystems of an
5
+ existing installation and run ` nixos-install ` . This is useful to recover from a
6
+ mis-configured NixOS installation by first booting into a NixOS installer or
7
+ recovery system.
8
+
9
+ To only mount existing filesystems, add ` --disko-mode mount ` to
10
+ ` nixos-anywhere ` :
11
+
12
+ ```
13
+ nix run github:nix-community/nixos-anywhere -- --disko-mode mount --flake <path to configuration>#<configuration name> root@<ip address>
14
+ ```
15
+
16
+ 1 . This will first boot into a nixos-installer
17
+ 2 . Mounts disks with disko
18
+ 3 . Runs nixos-install based on the provided flake
19
+ 4 . Reboots the machine.
You can’t perform that action at this time.
0 commit comments