From bb035a0f974e895c7483a6a81b388a745cd3ac10 Mon Sep 17 00:00:00 2001
From: valentin <valentinb@fsmpi.rwth-aachen.de>
Date: Wed, 20 Oct 2021 21:38:49 +0200
Subject: [PATCH] grub template: added UEFI shells and UEFI firmware settings

---
 grub_template.cfg | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/grub_template.cfg b/grub_template.cfg
index ffe1e90..74afa51 100644
--- a/grub_template.cfg
+++ b/grub_template.cfg
@@ -65,3 +65,23 @@ menuentry "Show bootflags" {
     cat "/bootflags.txt"
     read
 }
+
+if [ ${grub_platform} == "efi" ]; then
+    menuentry "UEFI Shell v2" {
+        insmod fat
+        insmod chain
+        search --no-floppy --set=root --file /efi/shell/Shell_Full_v2.efi
+        chainloader /efi/shell/Shell_Full_v2.efi
+    }
+
+    menuentry "UEFI Shell v1" {
+        insmod fat
+        insmod chain
+        search --no-floppy --set=root --file /efi/shell/Shell_Full_v1.efi
+        chainloader /efi/shell/Shell_Full_v1.efi
+    }
+
+    menuentry "UEFI Firmware Settings" --id "uefi-firmware" {
+        fwsetup
+    }
+fi
-- 
GitLab