add additional disks

master
lub 1 year ago
parent 9d2a02cfe3
commit 3de47520c3

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save