diff --git a/config/etc/fstab b/config/etc/fstab index c58acd2..c379b27 100644 --- a/config/etc/fstab +++ b/config/etc/fstab @@ -6,3 +6,6 @@ /dev/mapper/root-unlocked / btrfs relatime 0 0 UUID=%boot_uuid% /boot btrfs relatime 0 0 UUID=%esp_uuid% /boot/efi vfat relatime 0 0 + +UUID=%disk1_uuid% /longhorn/01 ext4 relatime 0 0 +UUID=%disk2_uuid% /longhorn/02 ext4 relatime 0 0 diff --git a/hardware/hetzner_ax51-nvme/parted.sh b/hardware/hetzner_ax51-nvme/parted.sh index d96863d..2827f89 100755 --- a/hardware/hetzner_ax51-nvme/parted.sh +++ b/hardware/hetzner_ax51-nvme/parted.sh @@ -14,4 +14,9 @@ parted /dev/nvme0n1 mkpart primary 1022GB 1024GB # set flag for ESP parted /dev/nvme0n1 set 3 boot on +parted /dev/nvme1n1p1 mklabel gpt +parted /dev/nvme1n1p1 mkpart primary 1 -1 +parted /dev/nvme2n1p1 mklabel gpt +parted /dev/nvme2n1p1 mkpart primary 1 -1 + sleep 1 diff --git a/post-debootstrap-installer.sh b/post-debootstrap-installer.sh index f596e5b..0dc4394 100755 --- a/post-debootstrap-installer.sh +++ b/post-debootstrap-installer.sh @@ -50,9 +50,12 @@ fi root_uuid=$(blkid --output value "$(cryptsetup status root-unlocked | grep device | perl -pe 's#.*device.* (.*)#$1#')" | head -n1) boot_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/boot" | head -n1) esp_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/esp" | head -n1) +disk1_uuid=$(blkid --output value "/dev/nvme1n1p1" | head -n1) +disk2_uuid=$(blkid --output value "/dev/nvme2n1p2" | head -n1) sed -i "s/%root_uuid%/${root_uuid}/" /etc/crypttab sed -i "s/%boot_uuid%/${boot_uuid}/" /etc/fstab -sed -i "s/%esp_uuid%/${esp_uuid}/" /etc/fstab +sed -i "s/%disk1_uuid%/${disk1_uuid}/" /etc/fstab +sed -i "s/%disk2_uuid%/${disk2_uuid}/" /etc/fstab # after cryptsetup, mdadm, ... because of update-initramfs apt-get -y install linux-image-amd64 diff --git a/setup.sh b/setup.sh index 2e502c0..a1df071 100755 --- a/setup.sh +++ b/setup.sh @@ -39,6 +39,12 @@ mkfs.fat "$esp" mkdir "$chroot/boot/efi" mount "$esp" "$chroot/boot/efi" +# additional data disks +mkfs.ext4 /dev/nvme1n1p1 +mkdir "$chroot/longhorn/01" +mkfs.ext4 /dev/nvme2n1p1 +mkdir "$chroot/longhorn/02" + # debootstrap