summarylogtreecommitdiffstats
path: root/memtest86-efi
diff options
context:
space:
mode:
Diffstat (limited to 'memtest86-efi')
-rw-r--r--memtest86-efi8
1 files changed, 8 insertions, 0 deletions
diff --git a/memtest86-efi b/memtest86-efi
index 45a7fb7b4ac6..31233da3061a 100644
--- a/memtest86-efi
+++ b/memtest86-efi
@@ -211,6 +211,14 @@ update() {
;;
2|3|4) # Update files in $esp/EFI/memtest86/
+ ## Check if efi partition is mounted, if not mount it
+ if ! mount | grep "$partition" | grep -q "$esp"; then
+ echo -e "ESP ${CB}$partition${CR} is not mounted, mounting..."
+ if ! mount "$partition" "$esp"; then
+ echo -e "${CE}Fail to mount $partition on $esp. Aborted.${CR}" > /dev/stderr
+ exit $CODE_FATAL
+ fi
+ fi
_common_install "$esp/EFI/memtest86" "memtest$ARCH.efi"
;;
esac