|
zohan
初级用户
 
积分 38
发帖 15
注册 2010-2-3
状态 离线
|
『楼 主』:
GRUB直接引导逻辑分区win7能否实现?
使用 LLM 解释/回答一下
第一主活动分区(hd0,1)装有xp,假如win7装在逻辑分区,要使用GRUB2直接引导进入win7,也就是引导(hd0,5)的win7,将(hd0,1)的bootmgr,boot文件夹移动到win7分区(hd0,5),
然后
set root=(hd0,5)
chainloader +1
不知这样能否引导进入win7?
实际上我就是想知道逻辑分区的引导扇区引导代码能否引导本分区下的bootmgr从而进入系统。
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.
|
|
2010-2-9 21:18 |
|
|
wewebb
初级用户
 
积分 66
发帖 53
注册 2009-10-9
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
只有主分区的第一扇区才可引导,上面的代码是引导扩展分区的第一个扇区,会出错的。
直接引导 bootmgr 可用:
chainloader (hd0,1)/bootmgr
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
|
|
2010-2-10 21:12 |
|
|
zohan
初级用户
 
积分 38
发帖 15
注册 2010-2-3
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by wewebb at 2010-2-10 21:12:
只有主分区的第一扇区才可引导,上面的代码是引导扩展分区的第一个扇区,会出错的。
直接引导 bootmgr 可用:
chainloader (hd0,1)/bootmgr
不是吧!(hd0,5)怎么会是扩展分区?扩展分区在grub2里只可能是1-4吧,应该是逻辑分区………………
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...
|
|
2010-2-10 21:46 |
|
|
wewebb
初级用户
 
积分 66
发帖 53
注册 2009-10-9
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Originally posted by zohan at 2010-2-10 21:46:
不是吧!(hd0,5)怎么会是扩展分区?扩展分区在grub2里只可能是1-4吧,应该是逻辑分区………………
对,是逻辑分区。说错了,不好意思。呵呵。
刚才试了一下, Grub2也不能直接载入引导文件。
可以试试用win7的命令
bootsect /nt60 C:
将win7的引导写入C分区的DBR中。然后用Grub2
chainloader (hd0,1)+1
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
|
|
2010-2-10 22:09 |
|
|
zohan
初级用户
 
积分 38
发帖 15
注册 2010-2-3
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
Originally posted by wewebb at 2010-2-10 22:09:
对,是逻辑分区。说错了,不好意思。呵呵。
刚才试了一下, Grub2也不能直接载入引导文件。
可以试试用win7的命令
bootsect /nt60 C:
将win7的 ...
呵呵,你可能没有看清楚我的问题,我不是想要从主分区引导win7,而是想从逻辑分区直接引导win7,
也就是假如我的win7装在了(hd0,5)中,我把win7引导文件bootmgr,boot文件夹也移到此分区中,然后
chainloader (hd0,5)+1
不知行否
这只是我的一个想法,我的电脑里win7并没有装在逻辑分区里
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
|
|
2010-2-10 22:20 |
|
|
wewebb
初级用户
 
积分 66
发帖 53
注册 2009-10-9
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by zohan at 2010-2-10 22:20:
呵呵,你可能没有看清楚我的问题,我不是想要从主分区引导win7,而是想从逻辑分区直接引导win7,
也就是假如我的win7装在了(hd0,5)中,我把win7引 ...
可以先用命令将 win7 的引导写入到 (hd0,5) 中:
bootsect /nt60 D:
然后复制 bootmgr 等引导文件到 D 盘。再用Grub2引导
chainloader (hd0,5)+1
我手头上没有 win7 ,但用XP测试了一下可以的。
我把XP的 ntldr 等几个 引导文件复制到D盘,再用
bootsect /nt52 D:
将 NT引导写入D 盘DBR中。
然后用Grub2引导
chainloader (hd0,5)+1
结果是可以正常引导 ntldr 并看到启动菜单,进入系统也正常。
Last edited by wewebb on 2010-2-10 at 23:46 ]
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 ]
|
|
2010-2-10 23:43 |
|
|
fujianabc
金牌会员
     
积分 3467
发帖 1616
注册 2004-6-21
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
完全可以,但你要用bcdedit把{bootmgr}中的device和osdevice改成boot
It is completely okay, but you need to use bcdedit to change the device and osdevice in {bootmgr} to boot.
|
|
2010-2-11 12:50 |
|
|