This commit is contained in:
Ward from fusion-voyager-3 2024-08-24 01:50:57 +03:00
parent d24434162d
commit 7f747b4e8c
4 changed files with 232 additions and 232 deletions

View File

@ -9,8 +9,8 @@ for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get
swapoff $PARTITION || true swapoff $PARTITION || true
done done
wipefs -af /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK" wipefs -af /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
"###; "###;

View File

@ -6,54 +6,54 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
btrfs subvolume create /var/cache/root-mnt/@home btrfs subvolume create /var/cache/root-mnt/@home
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
btrfs subvolume create /var/cache/root-mnt/@home btrfs subvolume create /var/cache/root-mnt/@home
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -68,17 +68,17 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -93,16 +93,16 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -117,9 +117,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -137,62 +137,62 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
# #
mkdir -p /var/cache/home-mnt mkdir -p /var/cache/home-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 /var/cache/home-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 /var/cache/home-mnt
btrfs subvolume create /var/cache/home-mnt/@ btrfs subvolume create /var/cache/home-mnt/@
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
# #
mkdir -p /var/cache/home-mnt mkdir -p /var/cache/home-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 /var/cache/home-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 /var/cache/home-mnt
btrfs subvolume create /var/cache/home-mnt/@ btrfs subvolume create /var/cache/home-mnt/@
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -209,19 +209,19 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 crypt_home
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_home yes | mkfs.btrfs -f /dev/mapper/crypt_home
sleep 2 sleep 2
@ -240,18 +240,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 crypt_home
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_home yes | mkfs.btrfs -f /dev/mapper/crypt_home
sleep 2 sleep 2
@ -270,9 +270,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -287,48 +287,48 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.btrfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p /var/cache/root-mnt mkdir -p /var/cache/root-mnt
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 /var/cache/root-mnt
btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@
# #
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -343,17 +343,17 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -365,16 +365,16 @@ btrfs subvolume create /var/cache/root-mnt/@
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -386,8 +386,8 @@ btrfs subvolume create /var/cache/root-mnt/@
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;

View File

@ -10,46 +10,46 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -66,19 +66,19 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 crypt_home
yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root
yes | mkfs.ext4 -F /dev/mapper/crypt_home yes | mkfs.ext4 -F /dev/mapper/crypt_home
sleep 2 sleep 2
@ -89,18 +89,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 crypt_home
yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root
yes | mkfs.ext4 -F /dev/mapper/crypt_home yes | mkfs.ext4 -F /dev/mapper/crypt_home
sleep 2 sleep 2
@ -111,9 +111,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -128,40 +128,40 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.ext4 -F /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -176,17 +176,17 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -194,16 +194,16 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -211,9 +211,9 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;

View File

@ -11,46 +11,46 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -67,19 +67,19 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p4 crypt_home
yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root
yes | mkfs.xfs -f /dev/mapper/crypt_home yes | mkfs.xfs -f /dev/mapper/crypt_home
sleep 2 sleep 2
@ -90,18 +90,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 crypt_home printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"4 crypt_home
yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root
yes | mkfs.xfs -f /dev/mapper/crypt_home yes | mkfs.xfs -f /dev/mapper/crypt_home
sleep 2 sleep 2
@ -112,9 +112,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/home
mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -129,40 +129,40 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
# #
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 yes | mkfs.xfs -f /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
echo 'MOUNTING' | nc -U $SOCKET_PATH || true echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;
@ -177,17 +177,17 @@ mkpart "linux-boot" 500Mib 1500Mib \
mkpart "linux-root" 1500Mib 100%Mib \ mkpart "linux-root" 1500Mib 100%Mib \
print print
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" blockdev --rereadpt "$PIKA_INSTALL_AUTO_TARGET_DISK"
# add p to partition if it's nvme # add p to partition if it's nvme
if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" if echo "$PIKA_INSTALL_AUTO_TARGET_DISK" | grep -i "nvme"
then then
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p3 crypt_root
yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -195,16 +195,16 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
else else
sleep 10 sleep 10
# Add filesystems # Add filesystems
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 yes | mkfs -t vfat -F 32 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 yes | mkfs -t ext4 /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3
printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"3 crypt_root
yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root
sleep 2 sleep 2
# Begin Mounting # Begin Mounting
@ -212,9 +212,9 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true
mkdir -p $PIKA_INSTALL_CHROOT_PATH mkdir -p $PIKA_INSTALL_CHROOT_PATH
mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot
mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi
mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi mount /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
fi fi
"###; "###;