China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 15:14
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » How to add a GRUB boot entry in the BOOTMGR of the WIN7 system View 11,171 Replies 5
Original Poster Posted 2010-11-17 22:48 ·  中国 浙江 杭州 联通
银牌会员
★★★
Credits 1,582
Posts 603
Joined 2006-02-20 20:26
20-year member
UID 50690
Status Offline
Just like in the XP system's "boot.ini" file, adding "C:\GRLDR=\"Start GRUB\"" to simply load the GRUB boot item, how to achieve this in the WIN7 system? Please give guidance from the experts, thanks!
非凡财富Q群:62667973
@投资研讨,共享财富@
Floor 2 Posted 2010-11-17 23:26 ·  中国 广西 南宁 电信
初级用户
Credits 122
Posts 7
Joined 2003-08-07 00:00
22-year member
UID 8187
Gender Male
Status Offline
bcdedit /create /d "GRUB" /application bootsector
At this time, a {id} is generated
bcdedit /set {id} device partition=C:
bcdedit /set {id} path \gdldr.mbr
bcdedit /displayorder {id} /addlast

The root directory of drive C needs to have gdldr.mbr and grldr
Floor 3 Posted 2010-11-17 23:52 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 1,582
Posts 603
Joined 2006-02-20 20:26
20-year member
UID 50690
Status Offline
Originally posted by fengxi at 2010-11-17 23:26:
bcdedit /create /d "GRUB" /application bootsector
At this time, a {id} is generated
bcdedit /set {id} device partition=C:
bcdedit /set {id} path \gdldr.mbr
bcdedit /displayorder {id} /addlast

...


Thank you for the advice. This method can be completed without relying on third-party tools.
非凡财富Q群:62667973
@投资研讨,共享财富@
Floor 4 Posted 2010-11-17 23:54 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 1,582
Posts 603
Joined 2006-02-20 20:26
20-year member
UID 50690
Status Offline
Just now I tested it myself. It turns out that in the installed WIN7 system, there is also a BCD file under the system disk C:\boot, but the file size is different from that in the ISO. Then copy BcdTool (or easybcd) to the BOOT file, and you can also modify this BCD file. So I set up the real-mode boot of GRUB, then copied grldr.mbr, grldr, menu.lst and the self-made DOS image file to the C:\ root directory. Restarted WIN7, the optional menu appeared, and the application was successful!

[ Last edited by martin325 on 2010-11-18 at 00:17 ]
非凡财富Q群:62667973
@投资研讨,共享财富@
Floor 5 Posted 2011-01-20 18:03 ·  中国 辽宁 葫芦岛 联通
中级用户
★★
Credits 247
Posts 147
Joined 2009-04-09 20:52
17-year member
UID 142531
Gender Male
Status Offline
Need the two files grldr.mbr /grldr, and edit the following content into a cmd script and run it.

@ECHO OFF
for /f "tokens=2" %%c in ('BCDEDIT /CREATE /D "BOOT FROM GRUB" /application bootsector ') do set id=%%c
bcdedit /set %id% device partition=c:
bcdedit /set %id% path \grldr.mbr
bcdedit /displayorder %id% /addlast
COPY GRLDR C:\ /Y >NUL
COPY GRLDR.MBR C:\ /Y >NUL
PAUSE
Floor 6 Posted 2024-01-26 18:43 ·  中国 广东 东莞 电信
初级用户
Credits 27
Posts 14
Joined 2023-12-31 12:54
2-year member
UID 185519
Gender Male
Status Offline
Ask a master, how to make a boot?
Forum Jump: