set kernel parameter for decryption
This commit is contained in:
parent
1c02677a68
commit
4d3f24061f
|
|
@ -106,6 +106,8 @@ if [[ "${DISK}" == "nvme" ]]; then
|
||||||
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
||||||
# mount subvolumes
|
# mount subvolumes
|
||||||
mountallsubvol
|
mountallsubvol
|
||||||
|
# store uuid of encrypted partition for grub
|
||||||
|
echo encryped_partition_uuid=$(blkid -s UUID -o value ${DISK}p3) >> setup.conf
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "${FS}" == "btrfs" ]]; then
|
if [[ "${FS}" == "btrfs" ]]; then
|
||||||
|
|
@ -130,6 +132,8 @@ else
|
||||||
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
||||||
# mount subvolumes
|
# mount subvolumes
|
||||||
mountallsubvol
|
mountallsubvol
|
||||||
|
# store uuid of encrypted partition for grub
|
||||||
|
echo encryped_partition_uuid=$(blkid -s UUID -o value ${DISK}3) >> setup.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# checking if user selected btrfs
|
# checking if user selected btrfs
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ source /root/$SCRIPTHOME/setup.conf
|
||||||
if [[ -d "/sys/firmware/efi" ]]; then
|
if [[ -d "/sys/firmware/efi" ]]; then
|
||||||
grub-install --efi-directory=/boot ${DISK}
|
grub-install --efi-directory=/boot ${DISK}
|
||||||
fi
|
fi
|
||||||
|
# set kernel parameter for decrypting the drive
|
||||||
|
if [[ "${FS}" == "luks" ]]; then
|
||||||
|
sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=${encryped_partition_uuid}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub
|
||||||
|
fi
|
||||||
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
echo -ne "
|
echo -ne "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue