本帖最後由 wusun 於 2016-7-1 21:32 編輯
huhiha 發表於 2016-7-1 20:53 
請問這個是grub、grub2還是grub4dos?聽說grub2的語法跟grub4dos的語法不一樣。
我現在在虛擬機里,dos ...
How to add "Grub4Dos" to bcd: (Assume that: BCD is located in "C:\BOOT\BCD")
1.Get "GRLDR", and put "GRLDR" into "C:\"
http://dl.grub4dos.chenall.net/grub4dos-0.4.6a-2016-06-03.7z
2.Put the "AddGrub4Dos.BAT" into "C:" and Run the "AddGrub4Dos.BAT" to add "Start Grub4Dos" boot item into bcd:
AddGrub4Dos.BATset bcd_path=%~d0\BOOT\BCD
for /f "tokens=2 delims={" %%g in ('Bcdedit /store "%bcd_path%" /create /d "Start Grub4Dos" -application bootsector') do set guid=%%g
set guid={%guid:~0,37%
echo {GUID}=%guid%
bcdedit /set %guid% device boot
bcdedit /set %guid% path \GRLDR
bcdedit /displayorder %guid% /addlast
PAUSE
3.Put the "menu.lst" into "C:\"
menu.lst# 字體/背景 顏色設定
color cyan/blue white/blue
# 多國語言字型檔
# font /boot/grub/unifont.hex.gz
# 預設等待時間(秒)
timeout 5
# 預設啟動的系統(從0開始算)
default 0
title DOS7.1 Discard Changes
find --set-root /dos.vhd
map --mem /dos.vhd (hd0)
map (hd0) (hd1)
map --hook
root (hd0,0)
chainloader +1
title DOS7.1 Save Changes
find --set-root /dos.vhd
map --mem (md)0x800+4 (99)
map /dos.vhd (hd0)
map (hd0) (hd1)
map --hook
write (99) [FiraDisk]\nStartOptions=disk,vmem=find:/dos.vhd;\n\0
root (hd0,0)
chainloader +1
#重新開機
title Reboot
reboot
#關機
title Shutdown
halt
4.Reboot to BootMgr, and test It! |