|
我装的是 Win7.......想在BCD菜单处增加grub4dos 的选项,用了论坛的批处理如下。。。再把 grldr.mbr和grldr(内置菜单)复制C盘根目录。。。。。。现在一开机就真接进入 grub 的菜单,坛内的各位兄弟,能否从BCD菜单选择进入grub4dos的菜单,而不是真接进入呢?????
@echo off
rem by lianjiang
cls
echo.
echo 请以管理员身份运行。
echo.
pause
set gname=GRUB for DOS
set vid=
set timeout=5
bcdedit >bcdtemp.txt
type bcdtemp.txt | find "\grldr.mbr" >nul && echo. && echo BCD启动项中已有grub4dos的项目,无需再安装。&& pause && goto exit
bcdedit /export "Bcd_Backup" >nul
bcdedit /create /d "%gname%" /application bootsector >vid.ini
for,/f,"tokens=2 delims={",%%i,In (vid.ini) Do (
set vida=%%i
)
for,/f,"tokens=1 delims=}",%%i,In ("%vida%") Do (
set vid={%%i}
)
echo %vid%>vid.ini
bcdedit /set %vid% device partition=%systemdrive% >nul
bcdedit /set %vid% path \grldr.mbr >nul
bcdedit /displayorder %vid% /addlast >nul
bcdedit /timeout %timeout% >nul
if exist grldr.mbr copy grldr.mbr %systemdrive%\ /y && goto exit
echo.
echo 稍后请自行把grldr.mbr拷贝到%systemdrive%\根目录
echo.
pause
:exit
del bcdtemp.txt >nul
[ 本帖最后由 rj7can 于 2011-12-26 08:58 编辑 ] |
|