summaryrefslogtreecommitdiff
path: root/data/templates/grub/grub_common.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/grub/grub_common.j2')
-rw-r--r--data/templates/grub/grub_common.j227
1 files changed, 27 insertions, 0 deletions
diff --git a/data/templates/grub/grub_common.j2 b/data/templates/grub/grub_common.j2
new file mode 100644
index 0000000..5e9b95c
--- /dev/null
+++ b/data/templates/grub/grub_common.j2
@@ -0,0 +1,27 @@
+# load EFI video modules
+if [ "${grub_platform}" == "efi" ]; then
+ insmod efi_gop
+ insmod efi_uga
+fi
+
+# create and activate serial console
+function setup_serial {
+ # initialize the first serial port by default
+ if [ "${console_type}" == "ttyS" ]; then
+ if [ "${console_num}" == "0" ]; then
+ serial --unit=0 --speed=${console_speed}
+ else
+ serial --unit=${console_num} --speed=115200
+ fi
+ else
+ serial --unit=0 --speed=${console_speed}
+ fi
+ terminal_output --append serial console
+ terminal_input --append serial console
+}
+
+setup_serial
+
+{% if search_root %}
+{{ search_root }}
+{% endif %}