diff options
author | root <root@gocchin.haxx.dafuq> | 2021-12-25 15:44:38 -0600 |
---|---|---|
committer | root <root@gocchin.haxx.dafuq> | 2021-12-25 15:44:38 -0600 |
commit | 20e4619325825561e8a4d2d9bd8ae5414207505a (patch) | |
tree | beb0db0155b2a6d43dc62559a3513b4ff22bc404 /install.sh | |
parent | 4b08419de4d6a16fb74cafd381b496375076fa3c (diff) | |
download | gentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.tar.gz gentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.tar.bz2 gentoox-20e4619325825561e8a4d2d9bd8ae5414207505a.zip |
correct esp partition number passed to efibootmgr
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |