diff --git a/install.sh b/install.sh index fd312e3..8a62b44 100644 --- a/install.sh +++ b/install.sh @@ -5,13 +5,10 @@ DISK="/dev/sda" parted $DISK -- mklabel gpt # Create the root partition -parted $DISK -- mkpart root ext4 512MiB -8GB - -# Create the swap partition -parted $DISK -- mkpart swap linux-swap -8GB 100% +parted $DISK -- mkpart root ext4 512MiB 100% parted $DISK -- mkpart ESP fat32 1MB 512MiB -parted $DISK -- set 3 esp on +parted $DISK -- set 2 esp on # DO NOT FORMAT the root partition before encryption! # cryptsetup will fail if the partition is already formatted @@ -21,14 +18,13 @@ cryptsetup luksFormat ${DISK}1 cryptsetup open ${DISK}1 root # Now format the encrypted partition -mkfs.ext4 /dev/mapper/root +mkfs.ext4 -L nixos /dev/mapper/root # Mount the partitions mount /dev/mapper/root /mnt # Format -mkswap -L swap ${DISK}2 -mkfs.fat -F 32 -n boot ${DISK}3 +mkfs.fat -F 32 -n boot ${DISK}2 # Mount the partitions mkdir -p /mnt/boot