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 18:26
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Can GRUB directly boot a logical partition Windows 7? View 3,598 Replies 6
Original Poster Posted 2010-02-09 21:18 ·  中国 北京 电信
初级用户
Credits 38
Posts 15
Joined 2010-02-03 14:10
16-year member
UID 160034
Gender Male
Status Offline
The first primary active partition (hd0,1) has XP installed. If Win7 is installed in a logical partition, to directly boot into Win7 using GRUB2, that is, to boot Win7 in (hd0,5), move the bootmgr and boot folder of (hd0,1) to the Win7 partition (hd0,5),
then
set root=(hd0,5)
chainloader +1
I wonder if this can boot into Win7?
Actually, I just want to know if the boot sector boot code of the logical partition can boot the bootmgr in this partition to enter the system.
Floor 2 Posted 2010-02-10 21:12 ·  中国 广东 广州 中移铁通
初级用户
★★
Credits 66
Posts 53
Joined 2009-10-09 20:51
16-year member
UID 152852
Gender Male
Status Offline
Only the first sector of the primary partition can be booted. The code above that boots the first sector of the extended partition will cause an error.

Directly boot bootmgr is available:

chainloader (hd0,1)/bootmgr
Floor 3 Posted 2010-02-10 21:46 ·  中国 北京 电信
初级用户
Credits 38
Posts 15
Joined 2010-02-03 14:10
16-year member
UID 160034
Gender Male
Status Offline
Originally posted by wewebb at 2010-2-10 21:12:
Only the first sector of the primary partition can be booted. The above code is for booting the first sector of the extended partition, which will cause an error.

Directly booting bootmgr is available:

chainloader (hd0,1)/bootmgr


No way! How can (hd0,5) be an extended partition? In grub2, the extended partition can only be 1-4. It should be a logical partition...
Floor 4 Posted 2010-02-10 22:09 ·  中国 广东 广州 中移铁通
初级用户
★★
Credits 66
Posts 53
Joined 2009-10-09 20:51
16-year member
UID 152852
Gender Male
Status Offline
Originally posted by zohan at 2010-2-10 21:46:


No way! How can (hd0,5) be an extended partition? In grub2, extended partitions can only be 1-4. It should be a logical partition...


Yes, it's a logical partition. I made a mistake, sorry. Hehe.

Just tried it, Grub2 can't directly load the boot file.

You can try using the win7 command
bootsect /nt60 C:

Write the win7 boot into the DBR of partition C. Then use Grub2

chainloader (hd0,1)+1
Floor 5 Posted 2010-02-10 22:20 ·  中国 北京 电信
初级用户
Credits 38
Posts 15
Joined 2010-02-03 14:10
16-year member
UID 160034
Gender Male
Status Offline
Originally posted by wewebb at 2010-2-10 22:09:


Yes, it's a logical partition. I made a mistake, sorry. Hehe.

Just tried it, Grub2 can't directly load the boot file.

You can try the win7 command
bootsect /nt60 C:

...


Hehe, you may not have read my question carefully. I don't want to boot win7 from the primary partition, but want to directly boot win7 from a logical partition.
That is, if my win7 is installed in (hd0,5), I move the win7 boot file bootmgr, boot folder to this partition, then
chainloader (hd0,5)+1
I wonder if it works

This is just an idea of mine. In my computer, win7 is not installed in a logical partition
Floor 6 Posted 2010-02-10 23:43 ·  中国 广东 广州 中移铁通
初级用户
★★
Credits 66
Posts 53
Joined 2009-10-09 20:51
16-year member
UID 152852
Gender Male
Status Offline
Originally posted by zohan at 2010-2-10 22:20:


Hehe, you may not have read my question clearly. I don't want to boot Win7 from the primary partition, but want to boot Win7 directly from a logical partition.
That is, if my Win7 is installed in (hd0,5), I want to boot ...



First, you can use the command to write the Win7 boot to (hd0,5):
bootsect /nt60 D:

Then copy the bootmgr and other boot files to drive D. Then use Grub2 to boot
chainloader (hd0,5)+1




I don't have Win7 on hand, but I tested it with XP and it works.

I copied the NTldr and other few boot files of XP to drive D, then used
bootsect /nt52 D:
to write the NT boot to the D drive DBR.


Then use Grub2 to boot
chainloader (hd0,5)+1

The result is that it can boot NTldr normally and see the boot menu, and entering the system is also normal.

[ Last edited by wewebb on 2010-2-10 at 23:46 ]
Floor 7 Posted 2010-02-11 12:50 ·  中国 上海 浦东新区 电信
金牌会员
★★★★
Credits 3,467
Posts 1,616
Joined 2004-06-21 00:00
22-year member
UID 27148
Status Offline
It is completely okay, but you need to use bcdedit to change the device and osdevice in {bootmgr} to boot.
Forum Jump: