1 Star 0 Fork 98

余诗/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
grub2-SUSE-Add-the-t-hotkey.patch 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
zhangqiumiao 提交于 2024-03-04 03:17 . update to 2.12
From f6be3d41e24e685846dfc90ac1ca447501813687 Mon Sep 17 00:00:00 2001
From: Alexander Graf <[email protected]>
Date: Tue, 26 Apr 2016 15:59:03 +0200
Subject: [PATCH] SUSE: Add the "t" hotkey
While graphical output is fancy and nice, in some environments (EFI) we can
only have fancy graphical on frame buffer _or_ ugly serial on any output.
To give the user a nicely graphical screen in the default case, but still
allow them to get their boot menu on the serial console, let's add a new
hidden option "t" that switches the output device back to the firmware default.
Signed-off-by: Alexander Graf <[email protected]>
---
v1 -> v2
- use hiddenentry instead of --hidden
v2 -> v3 (by [email protected])
- make it a runtime decision (bsc#1164385)
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -552,6 +552,12 @@
installdir = grubconf;
};
+script = {
+ name = '95_textmode';
+ common = util/grub.d/95_textmode.in;
+ installdir = grubconf;
+};
+
program = {
mansection = 1;
name = grub-mkrescue;
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -247,6 +247,10 @@
fi
cat << EOF
+ if [ "\${grub_platform}" = "efi" ]; then
+ echo "Please press 't' to show the boot menu on this console"
+ fi
+
set gfxmode=${GRUB_GFXMODE}
load_video
insmod gfxterm
--- /dev/null
+++ b/util/grub.d/95_textmode.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cat <<EOF
+if [ "\${grub_platform}" = "efi" ]; then
+ # On EFI systems we can only have graphics *or* serial, so allow the user
+ # to switch between the two
+ hiddenentry 'Text mode' --hotkey 't' {
+ set textmode=true
+ terminal_output console
+ }
+fi
+EOF
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yushi-Icy/grub2.git
[email protected]:yushi-Icy/grub2.git
yushi-Icy
grub2
grub2
master

搜索帮助