-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathencZFS.txt
50 lines (39 loc) · 981 Bytes
/
encZFS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
nano /etc/nixos/configuration.nix
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.enableUnstable = true;
nixos-rebuild switch
modprobe zfs
fdisk /dev/sda
o
n
p
1
[enter]
+500M
n
p
2
[enter]
[enter]
w
a
1
zpool create -o ashift=12 -o altroot/mnt tank /dev/sda2
zfs create -o encryption=aes-256-gcm -o keyformat=passphrase -o mountpoint=none tank/encfs
[password]
[password]
zfs create -o mountpoint=legacy tank/encfs/nixos
zfs create -o mountpoint=legacy tank/encfs/VMs
mount -t zfs tank/encfs/nixos /mnt
mkdir /mnt/boot
mkdir /mnt/VMs
mount -t zfs tank/encfs/VMs /mnt/VMs
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt/boot
nixos-generate-config --root /mnt
nano /mnt/etc/nixos/configuration.nix
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.enableUnstable = true;
hostId = "bac8c473";
# Open DD image:
losetup --offset 500170752 /dev/loop2 sda.img