summarylogtreecommitdiffstats
path: root/memtest86-efi
diff options
context:
space:
mode:
authorXorg2015-09-01 10:30:25 +0200
committerXorg2015-09-01 10:30:25 +0200
commit68ef1fa76b9c92ff03bccd49d894018b6521cfdf (patch)
treea417499c4c3f70b42571472e7f1754d85f0460e0 /memtest86-efi
parent5a12e678ceb919d1da895499cb43b69932a2cbfa (diff)
downloadaur-68ef1fa76b9c92ff03bccd49d894018b6521cfdf.tar.gz
Fix GRUB script (pkgrel 4)
Diffstat (limited to 'memtest86-efi')
-rw-r--r--memtest86-efi12
1 files changed, 8 insertions, 4 deletions
diff --git a/memtest86-efi b/memtest86-efi
index a672d81343fa..e8faae7e6089 100644
--- a/memtest86-efi
+++ b/memtest86-efi
@@ -25,7 +25,7 @@ install() {
echo "Please, how do you want to use $0 ?"
echo -e "\033[1m1\033[0m: From \033[1mLaunch EFI Shell\033[0m (in UEFI Setup), e.g. as shellx64.efi on ESP's root (bit safe)"
echo -e "\033[1m2\033[0m: Add a new boot entry (more safe)"
- echo -e "\033[1m3\033[0m: Add a file for GRUB2 (untested)"
+ echo -e "\033[1m3\033[0m: Add a file for GRUB2"
echo -e "\033[1m4: Cancel\033[0m"
choice=0; while [[ $choice < 1 ]] || [[ $choice > 4 ]]; do
read choice
@@ -57,9 +57,13 @@ install() {
cp -v "$MEMTEST86_PATH/"* "$esp/EFI/memtest86/" # Move files in memtest ESP directory
mv -v "$esp/EFI/memtest86/boot$ARCH.efi" "$esp/EFI/memtest86/memtest$ARCH.efi" # Rename .efi file
echo -e "\nAdd a new configuration file for GRUB..."
- echo "menuentry \"Memtest86\" {
- search --set=root --no-floppy --fs-uuid $(blkid $partition -s UUID -o value)
- chainloader /EFI/memtest86/memtest$ARCH.efi" > "/etc/grub.d/86_memtest"
+ echo -e "if [ \"\${grub_platform}\" == \"efi\" ]; then
+ \tmenuentry \"Memtest86\" {
+ \tsearch --set=root --no-floppy --fs-uuid $(blkid $partition -s UUID -o value)
+ \tchainloader /EFI/memtest86/memtest$ARCH.efi
+ \t}
+ fi" > "/etc/grub.d/86_memtest"
+ chmod +x "/etc/grub.d/86_memtest"
grub-mkconfig -o "/boot/grub/grub.cfg"
elif [[ $choice == 4 ]]; then
# Do nothing and quit