From 8dafb8a0a82356e75efd3ef1aabf8b3191352324 Mon Sep 17 00:00:00 2001 From: simono41 Date: Mon, 16 Jul 2018 04:33:44 +0200 Subject: [PATCH] partuuid --- arch-install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch-install b/arch-install index dcf69ff..2016fb1 100755 --- a/arch-install +++ b/arch-install @@ -516,13 +516,13 @@ function grubinstall() { if [ "${swap}" != "n" ]; then swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer}) if [ "${usbkey}" == "y" ]; then - sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub + sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' cryptkey=PARTUUID='$usbkeypartuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub else sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub fi else if [ "${usbkey}" == "y" ]; then - sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub + sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 cryptkey=PARTUUID='$usbkeypartuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub else sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub fi @@ -732,7 +732,7 @@ function systemdboot() { tobootdevice=${deviceluks} parameter="${parameter}cryptdevice=PARTUUID=${tobootdeviceuuid}:luks0 " if [ "${usbkey}" == "y" ]; then - parameter="${parameter}cryptkey=UUID=${usbkeyuuid}:${usbkeydateisystem}:/archkey " + parameter="${parameter}cryptkey=PARTUUID=${usbkeypartuuid}:${usbkeydateisystem}:/archkey " fi else tobootdevice="PARTUUID=${tobootdeviceuuid}" @@ -895,6 +895,7 @@ function abfrage() { [[ -z "${usbkeydevice}" ]] && usbkeydevice=/dev/sdb1 usbkeydateisystem=$(blkid -s TYPE -o value ${usbkeydevice}) usbkeyuuid=$(blkid -s UUID -o value ${usbkeydevice}) + usbkeypartuuid=$(blkid -s PARTUUID -o value ${usbkeydevice}) fi fi fi