Last active
November 29, 2020 07:48
-
-
Save dejanr/50f257a2f6c26e7f9edf5850394cfc65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parted | |
mklabel gpt | |
mkpart ESP fat32 8MiB 2048MiB | |
set 1 boot on | |
set 1 bios_grub on | |
mkpart swap linux-swap 2048MiB 10GiB | |
mkpart zfs 10GiB -1 | |
zpool create -O xattr=sa -O acltype=posixacl -O atime=off -o ashift=12 -O mountpoint=legacy -f zpool mirror /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21NNSAFC24953N-part3 /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21NNSAFC24938P-part3 | |
zfs create -o mountpoint=none zpool/root | |
zfs create -o mountpoint=legacy zpool/root/nixos | |
zfs create -o mountpoint=legacy zpool/root/nix | |
zfs create -o mountpoint=legacy zpool/home | |
swapon /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21NNSAFC24953N-part2 /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21NNSAFC24938P-part2 | |
mount -t zfs zpool/root/nixos /mnt | |
mkdir /mnt/boot | |
mkdir /mnt/nix | |
mkdir /mnt/home | |
mount -t zfs zpool/root/nix /mnt/nix | |
mount -t zfs zpool/home /mnt/home | |
mount /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21NNSAFC24953N-part1 /mnt/boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clean drive from zfs meta:
dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=10
dd if=/dev/zero of=/dev/nvme0n1 bs=512 seek=$(( $(blockdev --getsz /dev/nvme0n1) - 4096 )) count=1M