|
8#
楼主 |
发表于 2023-11-14 08:02:24
|
只看该作者
- export pager=0;
- cat --set=modlist ${prefix}/insmod.lst;
- for module in ${modlist}; do
- insmod ${module};
- done;
- if [ "${grub_platform}" = "efi" ]; then
- getenv -t uint8 SecureBoot grub_secureboot;
- if [ "${grub_secureboot}" = "1" ]; then
- sbpolicy -i;
- fi;
- fi;
- loadfont ${prefix}/fonts/unicode.pf2;
- export enable_progress_indicator=0;
- export locale_dir=${prefix}/locale;
- export lang=zh_CN;
- export gfxmode=1024x768;
- export gfxpayload=keep;
- export color_normal=white/black;
- export color_highlight=black/white;
- terminal_output gfxterm;
- theme=${prefix}/themes/theme.txt
- #gfxmenu /Boot/GRUB/MESSAGE.GZ
- . $prefix/run/run.cfg
- #### FUNCTION ####
- function to_g4d_path {
- unset g4d_path;
- if regexp --set=1:num '^\(hd[0-9]+,[a-zA-Z]*([0-9]+)\).*' "${1}"; then
- # (hdx,msdosy) (hdx,gpty) (hdx,y)
- expr --set=num "${num} - 1";
- regexp --set=1:path_1 --set=2:path_2 '^(\(hd[0-9]+,)[a-zA-Z]*[0-9]+(\).*)' "${1}";
- set g4d_path="${path_1}${num}${path_2}";
- elif regexp '^\([chf]d[0-9]*\).*' "${1}"; then
- # (hd) (cd) (fd) (hdx) (cdx) (fdx)
- set g4d_path="${1}";
- fi;
- }
- set default=0
- set timeout=6
- menuentry "[1] Windows 7/8/10/11 XP" {run /EFI/Microsoft/Boot/bootmgfw.efi;}
- menuentry "[2] Win7/8/10/11 PE" {run /imgs/Win11x64_Lightning_22000.376_Network.wim;}
- menuentry "[3] Bunsenlabs Linux" {configfile $prefix/../debian/grub.cfg;}
- menuentry "[4] MacOS Ventura" {chainloader $prefix/../OC/OpenCore.efi;}
- menuentry "[5] Menu /imgs" {run /imgs;}
- menuentry "[6] 重启" --hidden --hotkey=f9 {reboot;}
- menuentry "[7] 关机" --hidden --hotkey=f10 {halt;}
复制代码
完整的菜单, 用的就是你的, 加了--hidden 后完美, 只是封装的efi 是网上下载的, 启动菜单出来前, 有个错误提示 error: can't find commend cat ...., 谁能给个完整的引导封装 bootx64.efi ? |
|