fix env var name
This commit is contained in:
parent
afad8be554
commit
d24434162d
@ -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/"$AUTO_INSTALL_TARGET_DISK"
|
wipefs -af /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
|
|
||||||
|
@ -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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
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/"$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
|
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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
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/"$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
|
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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
#
|
#
|
||||||
mkdir -p /var/cache/home-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/@
|
btrfs subvolume create /var/cache/home-mnt/@
|
||||||
#
|
#
|
||||||
mkdir -p $PIKA_INSTALL_CHROOT_PATH
|
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
|
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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
#
|
#
|
||||||
mkdir -p /var/cache/home-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/@
|
btrfs subvolume create /var/cache/home-mnt/@
|
||||||
#
|
#
|
||||||
mkdir -p $PIKA_INSTALL_CHROOT_PATH
|
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
|
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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
#
|
#
|
||||||
mkdir -p $PIKA_INSTALL_CHROOT_PATH
|
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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.btrfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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/@
|
||||||
#
|
#
|
||||||
mkdir -p $PIKA_INSTALL_CHROOT_PATH
|
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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
fi
|
||||||
"###;
|
"###;
|
@ -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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.ext4 -F /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
@ -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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_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 --type luks2 luksFormat /dev/"$PIKA_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/"$PIKA_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
|
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_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/"$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
|
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
|
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 "$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
|
then
|
||||||
#
|
#
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p2
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p3
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"2
|
||||||
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"3
|
yes | mkfs.xfs -f /dev/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
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
|
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 "$AUTO_INSTALL_TARGET_DISK"
|
blockdev --rereadpt "$PIKA_AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
# add p to partition if it's nvme
|
# 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
|
then
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"p1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"p2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"p3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
else
|
||||||
sleep 10
|
sleep 10
|
||||||
# Add filesystems
|
# Add filesystems
|
||||||
yes | mkfs -t vfat -F 32 /dev/"$AUTO_INSTALL_TARGET_DISK"1
|
yes | mkfs -t vfat -F 32 /dev/"$PIKA_AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/"$AUTO_INSTALL_TARGET_DISK"2
|
yes | mkfs -t ext4 /dev/"$PIKA_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/"$PIKA_AUTO_INSTALL_TARGET_DISK"3
|
||||||
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/"$PIKA_AUTO_INSTALL_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/"$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
|
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
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
@ -10,6 +10,7 @@ use gtk::{gio, glib};
|
|||||||
use std::{cell::RefCell, fs, ops::Deref, path::Path, process::Command, rc::Rc};
|
use std::{cell::RefCell, fs, ops::Deref, path::Path, process::Command, rc::Rc};
|
||||||
|
|
||||||
/// DEBUG
|
/// DEBUG
|
||||||
|
use std::io::{self, Write};
|
||||||
use duct::cmd;
|
use duct::cmd;
|
||||||
/// DEBUG END
|
/// DEBUG END
|
||||||
|
|
||||||
@ -106,22 +107,24 @@ pub fn installation_summary_page(
|
|||||||
partition_method_manual_crypttab_entry_array_refcell,
|
partition_method_manual_crypttab_entry_array_refcell,
|
||||||
move |_|
|
move |_|
|
||||||
{
|
{
|
||||||
let big_cmd = cmd!("bash", "-c",
|
std::io::stdout().flush().unwrap();
|
||||||
installation_progress_page::create_installation_script(
|
let cmd = installation_progress_page::create_installation_script(
|
||||||
&language_selection_text_refcell,
|
&language_selection_text_refcell,
|
||||||
&keymap_selection_text_refcell,
|
&keymap_selection_text_refcell,
|
||||||
&timezone_selection_text_refcell,
|
&timezone_selection_text_refcell,
|
||||||
&partition_method_type_refcell,
|
&partition_method_type_refcell,
|
||||||
&partition_method_automatic_target_refcell,
|
&partition_method_automatic_target_refcell,
|
||||||
&partition_method_automatic_target_fs_refcell,
|
&partition_method_automatic_target_fs_refcell,
|
||||||
&partition_method_automatic_luks_enabled_refcell,
|
&partition_method_automatic_luks_enabled_refcell,
|
||||||
&partition_method_automatic_luks_refcell,
|
&partition_method_automatic_luks_refcell,
|
||||||
&partition_method_automatic_ratio_refcell,
|
&partition_method_automatic_ratio_refcell,
|
||||||
&partition_method_automatic_seperation_refcell,
|
&partition_method_automatic_seperation_refcell,
|
||||||
&partition_method_manual_fstab_entry_array_refcell,
|
&partition_method_manual_fstab_entry_array_refcell,
|
||||||
&partition_method_manual_luks_enabled_refcell,
|
&partition_method_manual_luks_enabled_refcell,
|
||||||
&partition_method_manual_crypttab_entry_array_refcell,
|
&partition_method_manual_crypttab_entry_array_refcell,);
|
||||||
)
|
println!("{}", cmd);
|
||||||
|
let big_cmd = cmd!("sudo", "bash", "-c",
|
||||||
|
cmd
|
||||||
);
|
);
|
||||||
assert!(big_cmd.run().is_ok());
|
assert!(big_cmd.run().is_ok());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user