diff options
Diffstat (limited to 'memtest86-efi')
-rw-r--r-- | memtest86-efi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/memtest86-efi b/memtest86-efi index 8d1836521874..7889ce39f0b8 100644 --- a/memtest86-efi +++ b/memtest86-efi @@ -51,7 +51,8 @@ install() { echo -en "else enter device path manually (like ${CB}/dev/sdXY${CR}): " read choice [[ -n $choice ]] && partition=$choice - partnumber=${partition//[^0-9]/} + partnumber=$(echo $partition | grep -Eo '[0-9]+$') + [[ $partition == "/dev/nvme"* ]] && device=$(echo $partition | cut -dp -f1) || device=${partition//$partnumber} # Find ESP mount point esp=$(mount | grep $partition | awk '{print $3}' | tail -n1) @@ -96,7 +97,7 @@ install() { checkcommand efibootmgr _common_install echo -e "\nAdd a new EFI boot entry..." - efibootmgr -c -d ${partition//$partnumber} -p ${partnumber} -w -L "MemTest86" -l "\EFI\memtest86\memtest$ARCH.efi" # Manage efi entry + efibootmgr -c -d ${device} -p ${partnumber} -w -L "MemTest86" -l "\EFI\memtest86\memtest$ARCH.efi" # Manage efi entry ;; 3) # Install MemTest86 in $esp/EFI/memtest86/ & add a file for GRUB2 |