fix scripting issues
This commit is contained in:
parent
b70fc0a3fb
commit
84d5cc58a9
@ -193,21 +193,5 @@ pub fn build_ui(app: &adw::Application) {
|
|||||||
&partition_method_manual_crypttab_entry_array_refcell,
|
&partition_method_manual_crypttab_entry_array_refcell,
|
||||||
);
|
);
|
||||||
|
|
||||||
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,
|
|
||||||
);
|
|
||||||
|
|
||||||
window.present()
|
window.present()
|
||||||
}
|
}
|
||||||
|
@ -40,13 +40,13 @@ echo "PARTING" > "/tmp/pika-installer-gtk4-status.txt"
|
|||||||
|
|
||||||
PIKA_INSTALL_AUTO_TARGET_DISK={AUTO_INSTALL_TARGET_DISK}
|
PIKA_INSTALL_AUTO_TARGET_DISK={AUTO_INSTALL_TARGET_DISK}
|
||||||
|
|
||||||
for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep ${PIKA_INSTALL_AUTO_TARGET_DISK}); do
|
for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep "$PIKA_INSTALL_AUTO_TARGET_DISK"); do
|
||||||
PARTITION="/dev/$part"
|
PARTITION="/dev/$part"
|
||||||
swapoff $PARTITION || true
|
swapoff $PARTITION || true
|
||||||
done
|
done
|
||||||
|
|
||||||
wipefs -af /dev/${AUTO_INSTALL_TARGET_DISK}
|
wipefs -af /dev/"$AUTO_INSTALL_TARGET_DISK"
|
||||||
blockdev --rereadpt ${AUTO_INSTALL_TARGET_DISK}
|
blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
|
|
||||||
@ -54,56 +54,56 @@ blockdev --rereadpt ${AUTO_INSTALL_TARGET_DISK}
|
|||||||
|
|
||||||
let automatic_home_subvol_btrfs_open_installation_prog = r###"
|
let automatic_home_subvol_btrfs_open_installation_prog = r###"
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -112,21 +112,21 @@ fi
|
|||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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
|
||||||
@ -140,16 +140,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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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
|
||||||
@ -163,9 +163,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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -174,67 +174,67 @@ fi
|
|||||||
|
|
||||||
let automatic_home_part_btrfs_open_installation_prog = r###"
|
let automatic_home_part_btrfs_open_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
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
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
yes | mkfs.btrfs -f /dev/${AUTO_INSTALL_TARGET_DISK}p4
|
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
yes | mkfs.btrfs -f /dev/${AUTO_INSTALL_TARGET_DISK}4
|
yes | mkfs.btrfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -242,9 +242,9 @@ fi
|
|||||||
let automatic_home_part_btrfs_locked_installation_prog = r###"
|
let automatic_home_part_btrfs_locked_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
||||||
@ -252,16 +252,16 @@ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
|
|||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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"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/"$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
|
||||||
@ -279,18 +279,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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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"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/"$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
|
||||||
@ -308,9 +308,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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -319,50 +319,50 @@ fi
|
|||||||
|
|
||||||
let automatic_home_none_btrfs_open_installation_prog = r###"
|
let automatic_home_none_btrfs_open_installation_prog = r###"
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -371,21 +371,21 @@ fi
|
|||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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
|
||||||
@ -396,16 +396,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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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
|
||||||
@ -416,9 +416,9 @@ 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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -427,51 +427,51 @@ fi
|
|||||||
|
|
||||||
let automatic_home_part_ext4_open_installation_prog = r###"
|
let automatic_home_part_ext4_open_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
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
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
yes | mkfs.ext4 -F /dev/${AUTO_INSTALL_TARGET_DISK}p4
|
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
yes | mkfs.ext4 -F /dev/${AUTO_INSTALL_TARGET_DISK}4
|
yes | mkfs.ext4 -F /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -479,9 +479,9 @@ fi
|
|||||||
let automatic_home_part_ext4_locked_installation_prog = r###"
|
let automatic_home_part_ext4_locked_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
||||||
@ -489,16 +489,16 @@ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
|
|||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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"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/"$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
|
||||||
@ -508,18 +508,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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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"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/"$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
|
||||||
@ -529,9 +529,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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -540,42 +540,42 @@ fi
|
|||||||
|
|
||||||
let automatic_home_none_ext4_open_installation_prog = r###"
|
let automatic_home_none_ext4_open_installation_prog = r###"
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -584,46 +584,46 @@ fi
|
|||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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
|
||||||
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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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
|
||||||
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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -632,51 +632,51 @@ fi
|
|||||||
|
|
||||||
let automatic_home_part_xfs_open_installation_prog = r###"
|
let automatic_home_part_xfs_open_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
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
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
yes | mkfs.xfs -f /dev/${AUTO_INSTALL_TARGET_DISK}p4
|
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"p4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
yes | mkfs.xfs -f /dev/${AUTO_INSTALL_TARGET_DISK}4
|
yes | mkfs.xfs -f /dev/"$AUTO_INSTALL_TARGET_DISK"4
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -684,9 +684,9 @@ fi
|
|||||||
let automatic_home_part_xfs_locked_installation_prog = r###"
|
let automatic_home_part_xfs_locked_installation_prog = r###"
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
PIKA_INSTALL_AUTO_ROOT_SIZE=$(echo "scale=2 ; {{ROOT_PART_SIZE}} / 1024 / 1024" | bc | cut -f1 -d".")
|
PIKA_INSTALL_AUTO_ROOT_SIZE={ROOT_PART_SIZE_AS_I64_MIB}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
mkpart "linux-root" 1500Mib "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib \
|
||||||
@ -694,16 +694,16 @@ mkpart "linux-home" "$PIKA_INSTALL_AUTO_ROOT_SIZE"Mib 100% \
|
|||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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"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/"$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
|
||||||
@ -713,18 +713,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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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"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/"$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
|
||||||
@ -734,9 +734,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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -745,42 +745,42 @@ fi
|
|||||||
|
|
||||||
let automatic_home_none_xfs_open_installation_prog = r###"
|
let automatic_home_none_xfs_open_installation_prog = r###"
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
if echo ${AUTO_INSTALL_TARGET_DISK} | grep -i "nvme"
|
if echo "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"p3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"3
|
||||||
sleep 2
|
sleep 2
|
||||||
# Begin Mounting
|
# Begin Mounting
|
||||||
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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -789,46 +789,46 @@ fi
|
|||||||
|
|
||||||
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
PIKA_INSTALL_AUTO_LUKS_PASSWORD={AUTO_LUKS_PASSWORD}
|
||||||
|
|
||||||
parted -s -a optimal /dev/${PIKA_INSTALL_AUTO_TARGET_DISK} mklabel gpt \
|
parted -s -a optimal /dev/"$PIKA_INSTALL_AUTO_TARGET_DISK" mklabel gpt \
|
||||||
mkpart "linux-efi" 1MiB 500Mib \
|
mkpart "linux-efi" 1MiB 500Mib \
|
||||||
mkpart "linux-boot" 500Mib 1500Mib \
|
mkpart "linux-boot" 500Mib 1500Mib \
|
||||||
mkpart "linux-root" 1500Mib 100%Mib \
|
mkpart "linux-root" 1500Mib 100%Mib \
|
||||||
print
|
print
|
||||||
|
|
||||||
# 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 "$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/"$AUTO_INSTALL_TARGET_DISK"p1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}p2
|
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"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/"$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
|
||||||
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/"$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/"$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/"$AUTO_INSTALL_TARGET_DISK"1
|
||||||
yes | mkfs -t ext4 /dev/${AUTO_INSTALL_TARGET_DISK}2
|
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"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/"$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
|
||||||
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/"$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/"$AUTO_INSTALL_TARGET_DISK"1 $PIKA_INSTALL_CHROOT_PATH/boot/efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"###;
|
"###;
|
||||||
@ -856,5 +856,21 @@ fi
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
println!("{}", script)
|
let script2 = strfmt::strfmt(
|
||||||
|
automatic_home_part_ext4_locked_installation_prog,
|
||||||
|
&std::collections::HashMap::from([
|
||||||
|
("CHROOT_PATH".to_string(), "/media/pikaos/installation"),
|
||||||
|
(
|
||||||
|
"AUTO_LUKS_PASSWORD".to_string(),
|
||||||
|
partition_method_automatic_luks_refcell.borrow().as_str(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"ROOT_PART_SIZE_AS_I64_MIB".to_string(),
|
||||||
|
(partition_method_automatic_ratio_refcell.borrow().round() as i64 / 1048576).to_string().as_str(),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
println!("{}", script2)
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ use crate::{
|
|||||||
build_ui::{BlockDevice, CrypttabEntry, FstabEntry, PikaKeymap, PikaLocale},
|
build_ui::{BlockDevice, CrypttabEntry, FstabEntry, PikaKeymap, PikaLocale},
|
||||||
config::{MINIMUM_BOOT_BYTE_SIZE, MINIMUM_EFI_BYTE_SIZE},
|
config::{MINIMUM_BOOT_BYTE_SIZE, MINIMUM_EFI_BYTE_SIZE},
|
||||||
installer_stack_page,
|
installer_stack_page,
|
||||||
|
installation_progress_page,
|
||||||
};
|
};
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use glib::{clone, closure_local};
|
use glib::{clone, closure_local};
|
||||||
@ -72,6 +73,56 @@ pub fn installation_summary_page(
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
install_confirm_button.connect_clicked(clone!(
|
||||||
|
#[strong]
|
||||||
|
language_selection_text_refcell,
|
||||||
|
#[strong]
|
||||||
|
keymap_selection_text_refcell,
|
||||||
|
#[strong]
|
||||||
|
timezone_selection_text_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_type_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_luks_enabled_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_luks_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_target_fs_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_target_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_seperation_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_automatic_ratio_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_manual_fstab_entry_array_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_manual_luks_enabled_refcell,
|
||||||
|
#[strong]
|
||||||
|
partition_method_manual_crypttab_entry_array_refcell,
|
||||||
|
move |_|
|
||||||
|
{
|
||||||
|
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,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
page_done_action.connect_activate(clone!(
|
page_done_action.connect_activate(clone!(
|
||||||
#[strong]
|
#[strong]
|
||||||
installation_summary_row_viewport_listbox,
|
installation_summary_row_viewport_listbox,
|
||||||
|
Loading…
Reference in New Issue
Block a user