From d24434162dafe5e27133e2573faa115529991e93 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sat, 24 Aug 2024 01:43:56 +0300 Subject: [PATCH] fix env var name --- src/installation_progress_page/auto_basic.rs | 4 +- src/installation_progress_page/auto_btrfs.rs | 204 +++++++++---------- src/installation_progress_page/auto_ext4.rs | 128 ++++++------ src/installation_progress_page/auto_xfs.rs | 128 ++++++------ src/installation_summary_page/mod.rs | 35 ++-- 5 files changed, 251 insertions(+), 248 deletions(-) diff --git a/src/installation_progress_page/auto_basic.rs b/src/installation_progress_page/auto_basic.rs index d3e82ed..7080799 100644 --- a/src/installation_progress_page/auto_basic.rs +++ b/src/installation_progress_page/auto_basic.rs @@ -9,8 +9,8 @@ for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get swapoff $PARTITION || true done -wipefs -af /dev/"$AUTO_INSTALL_TARGET_DISK" -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +wipefs -af /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" "###; diff --git a/src/installation_progress_page/auto_btrfs.rs b/src/installation_progress_page/auto_btrfs.rs index 6f75d27..6da41f1 100644 --- a/src/installation_progress_page/auto_btrfs.rs +++ b/src/installation_progress_page/auto_btrfs.rs @@ -6,54 +6,54 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@home # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ btrfs subvolume create /var/cache/root-mnt/@home # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -68,17 +68,17 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -93,16 +93,16 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -117,9 +117,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi 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% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ # mkdir -p /var/cache/home-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p4 /var/cache/home-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 /var/cache/home-mnt btrfs subvolume create /var/cache/home-mnt/@ # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ # mkdir -p /var/cache/home-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"4 /var/cache/home-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 /var/cache/home-mnt btrfs subvolume create /var/cache/home-mnt/@ # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi 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% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"p4 crypt_home yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_home sleep 2 @@ -240,18 +240,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"4 crypt_home yes | mkfs.btrfs -f /dev/mapper/crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_home sleep 2 @@ -270,9 +270,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -287,48 +287,48 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p /var/cache/root-mnt -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 /var/cache/root-mnt btrfs subvolume create /var/cache/root-mnt/@ # mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -343,17 +343,17 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -365,16 +365,16 @@ btrfs subvolume create /var/cache/root-mnt/@ mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root yes | mkfs.btrfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -386,8 +386,8 @@ btrfs subvolume create /var/cache/root-mnt/@ mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ -o subvol=@ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; \ No newline at end of file diff --git a/src/installation_progress_page/auto_ext4.rs b/src/installation_progress_page/auto_ext4.rs index b20bf90..2180b92 100644 --- a/src/installation_progress_page/auto_ext4.rs +++ b/src/installation_progress_page/auto_ext4.rs @@ -10,46 +10,46 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"3 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi 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% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"p4 crypt_home yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_home sleep 2 @@ -89,18 +89,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"4 crypt_home yes | mkfs.ext4 -F /dev/mapper/crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_home sleep 2 @@ -111,9 +111,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -128,40 +128,40 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -176,17 +176,17 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -194,16 +194,16 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root yes | mkfs.ext4 -F /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -211,9 +211,9 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; \ No newline at end of file diff --git a/src/installation_progress_page/auto_xfs.rs b/src/installation_progress_page/auto_xfs.rs index 7d70d9b..824dab1 100644 --- a/src/installation_progress_page/auto_xfs.rs +++ b/src/installation_progress_page/auto_xfs.rs @@ -11,46 +11,46 @@ mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p4 $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home -mount /dev/"$AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"4 $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi 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% \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"p4 crypt_home yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_home sleep 2 @@ -90,18 +90,18 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"4 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"4 crypt_home +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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_AUTO_INSTALL_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_AUTO_INSTALL_TARGET_DISK"4 crypt_home yes | mkfs.xfs -f /dev/mapper/crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_home sleep 2 @@ -112,9 +112,9 @@ mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/home mount /dev/mapper/crypt_home $PIKA_INSTALL_CHROOT_PATH/home mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -129,40 +129,40 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then # sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3 +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 +yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 sleep 2 # Begin Mounting echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH -mount /dev/"$AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; @@ -177,17 +177,17 @@ mkpart "linux-boot" 500Mib 1500Mib \ mkpart "linux-root" 1500Mib 100%Mib \ print -blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK" +blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK" # add p to partition if it's nvme -if echo "$AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" +if echo "$PIKA_AUTO_INSTALL_TARGET_DISK" | grep -i "nvme" then sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"p3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"p3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3 crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -195,16 +195,16 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1 $PIKA_INSTALL_CHROOT_PATH/boot/efi else sleep 10 # Add filesystems -yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1 -yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v --type luks2 luksFormat /dev/"$AUTO_INSTALL_TARGET_DISK"3 -printf "$PIKA_INSTALL_AUTO_LUKS_PASSWORD" | cryptsetup -q -v luksOpen /dev/"$AUTO_INSTALL_TARGET_DISK"3 crypt_root +yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 +yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_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 luksOpen /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3 crypt_root yes | mkfs.xfs -f /dev/mapper/crypt_root sleep 2 # Begin Mounting @@ -212,9 +212,9 @@ echo 'MOUNTING' | nc -U $SOCKET_PATH || true mkdir -p $PIKA_INSTALL_CHROOT_PATH mount /dev/mapper/crypt_root $PIKA_INSTALL_CHROOT_PATH/ mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot -mount /dev/"$AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2 $PIKA_INSTALL_CHROOT_PATH/boot mkdir -p $PIKA_INSTALL_CHROOT_PATH/boot/efi -mount /dev/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi +mount /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi fi "###; \ No newline at end of file diff --git a/src/installation_summary_page/mod.rs b/src/installation_summary_page/mod.rs index 51b92fd..b678e40 100644 --- a/src/installation_summary_page/mod.rs +++ b/src/installation_summary_page/mod.rs @@ -10,6 +10,7 @@ use gtk::{gio, glib}; use std::{cell::RefCell, fs, ops::Deref, path::Path, process::Command, rc::Rc}; /// DEBUG +use std::io::{self, Write}; use duct::cmd; /// DEBUG END @@ -106,22 +107,24 @@ pub fn installation_summary_page( partition_method_manual_crypttab_entry_array_refcell, move |_| { - let big_cmd = cmd!("bash", "-c", - installation_progress_page::create_installation_script( - &language_selection_text_refcell, - &keymap_selection_text_refcell, - &timezone_selection_text_refcell, - &partition_method_type_refcell, - &partition_method_automatic_target_refcell, - &partition_method_automatic_target_fs_refcell, - &partition_method_automatic_luks_enabled_refcell, - &partition_method_automatic_luks_refcell, - &partition_method_automatic_ratio_refcell, - &partition_method_automatic_seperation_refcell, - &partition_method_manual_fstab_entry_array_refcell, - &partition_method_manual_luks_enabled_refcell, - &partition_method_manual_crypttab_entry_array_refcell, - ) + std::io::stdout().flush().unwrap(); + let cmd = installation_progress_page::create_installation_script( + &language_selection_text_refcell, + &keymap_selection_text_refcell, + &timezone_selection_text_refcell, + &partition_method_type_refcell, + &partition_method_automatic_target_refcell, + &partition_method_automatic_target_fs_refcell, + &partition_method_automatic_luks_enabled_refcell, + &partition_method_automatic_luks_refcell, + &partition_method_automatic_ratio_refcell, + &partition_method_automatic_seperation_refcell, + &partition_method_manual_fstab_entry_array_refcell, + &partition_method_manual_luks_enabled_refcell, + &partition_method_manual_crypttab_entry_array_refcell,); + println!("{}", cmd); + let big_cmd = cmd!("sudo", "bash", "-c", + cmd ); assert!(big_cmd.run().is_ok()); }