summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@gocchin.haxx.dafuq>2021-12-25 15:44:38 -0600
committerroot <root@gocchin.haxx.dafuq>2021-12-25 15:44:38 -0600
commit20e4619325825561e8a4d2d9bd8ae5414207505a (patch)
treebeb0db0155b2a6d43dc62559a3513b4ff22bc404
parent4b08419de4d6a16fb74cafd381b496375076fa3c (diff)
downloadgentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.tar.gz
gentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.tar.bz2
gentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.zip
correct esp partition number passed to efibootmgr
-rwxr-xr-xinstall.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/install.sh b/install.sh
index 311d195..64000f4 100755
--- a/install.sh
+++ b/install.sh
@@ -217,15 +217,15 @@ yes $userpassword | passwd $username
if [[ ! -z "$UEFI_MODE" ]]; then
if [[ \$(mokutil --sb-state) == "SecureBoot enabled" ]]; then
- esp=\$(lsblk -no pkname \$(findmnt --noheadings -o source /boot/efi))
- esp_with_partum=\$(basename \$(findmnt --noheadings -o source /boot/efi))
- esp_partnum=\$(echo \${esp_with_partum#\$esp} | tr -d 'p')
+ espdev=\$(lsblk -p -no pkname \$(findmnt --noheadings -o source /boot/efi))
+ esppar=\$(findmnt --noheadings -o source /boot/efi)
+ esp_partnum=\$(echo \${esppar#\$espdev} | tr -d 'p')
grub-install --target=x86_64-efi --efi-directory=/boot/efi --modules="tpm" --no-nvram
sbsign --key /usr/src/uefi/MOK.priv --cert /usr/src/uefi/MOK.pem /boot/efi/EFI/gentoo/grubx64.efi --output grubx64.efi.signed
mv grubx64.efi.signed /boot/efi/EFI/gentoo/grubx64.efi
cp /usr/share/shim/* /boot/efi/EFI/gentoo/
mv /boot/efi/EFI/gentoo/BOOTX64.EFI /boot/efi/EFI/gentoo/shimx64.efi
- efibootmgr -c -d \$esp -p \$esp_partnum -L "GentooX" -l "\EFI\gentoo\shimx64.efi"
+ efibootmgr -c -d \$espdev -p \$esp_partnum -L "GentooX" -l "\EFI\gentoo\shimx64.efi"
else
grub-install --target=x86_64-efi
fi