grub2调用grub4dos,同时调用指定菜单,失效?
本帖最后由 wengzhenquan 于 2020-9-29 13:12 编辑第一种方式: 失败!(只会调用根路径下的menu.lst)
menuentry " grub4dos 菜单" --hotkey=f{
search --file --set=root /grub.exe
linux16 ($root)/grub.exe --config-file=/boot/grub4dos/2_menu.lst
}
第二种方式:失败!(只会调用根路径下的menu.lst)
编辑grldr文件,放到2_menu.lst相同目录下
pxe detect
configfile
default 0
timeout 0
title find /2_menu.lst
errorcheck off
configfile /boot/grub4dos/2_menu.lst
configfile /boot/grub4dos/menu.lst
configfile /2_menu.lst
if "%@root%"=="(ud)" && calc *0x82A0=*0x82b9&0xff
if "%@root:~1,1%"=="f" && find --set-root --devices=f /boot/grub4dos/2_menu.lst && configfile /boot/grub4dos/2_menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub4dos/2_menu.lst && configfile /boot/grub4dos/2_menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub4dos/menu.lst && configfile /boot/grub4dos/menu.lst
find --set-root --ignore-floppies --ignore-cd /2_menu.lst && configfile /2_menu.lst
configfile http://b.chenall.net/menu.lst
errorcheck on
commandline
title commandline
commandline
title reboot
reboot
title halt
halt
然后在grub2menuentry " GRUB4DOS 菜单" --hotkey=f {
search --file --no-floppy --set=root /boot/grub4dos/grldr
insmod ntldr
ntldr ($root)/boot/grub4dos/grldr
}
依旧失效
只会加载跟目录的menu.lst文件,不会加载 /boot/grub4dos/2_menu.lst
已解决 6楼↓
把菜单写到内部,一个菜单 弄一个 gruldr (文件又不大)
要进阶 处理的话 爬贴子:
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=414504
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=421410&extra= xbmc 发表于 2020-9-29 12:25
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=209309
他那种是引导镜像的写法,我改造之后还是失败
menuentry " GRUB4DOS 菜单" --hotkey=f {
search --file --no-floppy --set=root /grub.exe
set cfgfile="find --set-root /boot/grub4dos/2_menu.lst chainloader /boot/grub4dos/2_menu.lst;boot"
linux /grub.exe --config-file=$cfgfile
} xbmc 发表于 2020-9-29 12:47
chainloader -> configfile
可用,谢谢
menuentry " GRUB4DOS 菜单" --hotkey=f {
search --file --no-floppy --set=root /grub.exe
set cfgfile="find --set-root /boot/grub4dos/2_menu.lstconfigfile /boot/grub4dos/2_menu.lst;boot"
linux /grub.exe --config-file=$cfgfile
} 是这样吗?
menuentry " GRUB4DOS 菜单" --hotkey=f {
search --file --no-floppy --set=root /grub.exe
set cfgfile="find --set-root /boot/grub4dos/2_menu.lstchainloader /boot/grub4dos/2_menu.lst;boot"
linux /grub.exe --config-file=$cfgfile 张建军1861 发表于 2020-9-29 13:33
是这样吗?
menuentry " GRUB4DOS 菜单" --hotkey=f {
...
menuentry " GRUB4DOS 菜单" --hotkey=f {
search --file --no-floppy --set=root /grub.exe
set cfgfile="find --set-root /boot/grub4dos/2_menu.lstconfigfile /boot/grub4dos/2_menu.lst;boot"
linux /grub.exe --config-file=$cfgfile
}
configfile !!!
页:
[1]