无忧启动论坛
标题:
wintoflash 大侠 Grub2_2.05 (2020.11.14) 全模块 .efi 怎么写GRUB.CFG
[打印本页]
作者:
2013abcdefg
时间:
2021-5-8 18:07
标题:
wintoflash 大侠 Grub2_2.05 (2020.11.14) 全模块 .efi 怎么写GRUB.CFG
本帖最后由 2013abcdefg 于 2021-5-9 10:02 编辑
wintoflash 大侠 Grub2_2.05 (2020.11.14) 全模块 .efi 怎么写GRUB.CFG
这些是做什么用的呢?
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;
#### 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;
}
menuentry "Load grubfm.cfg" {
configfile "${prefix}/grubfm.cfg";
}
作者:
365天的思念
时间:
2021-7-12 09:46
谢谢分享,楼主辛苦了
作者:
xiumu
时间:
2021-7-26 17:30
网上看了一些教程,还是好多不懂
欢迎光临 无忧启动论坛 (http://wuyou.net/)
Powered by Discuz! X3.3