ubuntu11.04版的grub2的两个说明

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#31

帖子 smallapple » 2011-09-13 10:12

hellok112358 写了:你好。
我这里win7的100MB分区被我删了。和另一个分区合并了。
GRUB里面ntldr 显示找不到此命令
光盘不可读
现在怎么启动WIN7呢
另用某个脚本输出如下result.txt
启动分区删了,也不先把那些启动文件移出来,真是。。。 :em20
整个硬盘就一个扩展分区,真不明白你删那个100M 分区干啥的,500G 硬盘还差那 100M :em06


有没有win7安装光盘?
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#32

帖子 hellok112358 » 2011-09-13 10:32

没有。。当时看他一个不顺眼就删了,,以为有根目录的BOOTMGR就OK。。
光驱读不了盘,,

可能拷贝别的WIN7的隐藏分区的东东过来呢,或者还有什么方法

某个方法说WINPE进去,然后bootsect修复。实在不行了就去修下光驱。。

:em06
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#33

帖子 smallapple » 2011-09-13 10:39

你这个启动分区的 boot 目录没备份,整个硬盘没一个主分区,不是bootsect 能解决的,没主分区连 bootrec 都不能用。

win7原版的iso镜像有没有?
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#34

帖子 hellok112358 » 2011-09-13 10:41

没。只有张GHOST安装盘。还不能读。。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#35

帖子 smallapple » 2011-09-13 10:45

那有没有U盘启动 WinPE :em06 :em20
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#36

帖子 hellok112358 » 2011-09-13 10:48

没。刚准备装,然后搞坏了个U盘。。2G变8MB了。。。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#37

帖子 smallapple » 2011-09-13 10:52

:em45 :em45 :em45

我没办法了

:em06 :em06 :em06

先把光驱弄好,然后到别人win7电脑上把 boot 目录拷过来再说吧
还要先刻个PE
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#38

帖子 hellok112358 » 2011-09-13 10:56

考过来了以后怎么办
:em11
我这光驱不稳定。偶尔能读一读。
另边上刚好有台WIN7.
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#39

帖子 smallapple » 2011-09-13 11:18

先把那个 win7的boot目录拷到你win7系统盘(就是sda8)的根目录下,(要在其他系统下复制,不然那个bcd可能复制不了)
再用PE启动,cd到win7系统目录的system32下,PE下的win7盘应该不是C盘,自己找找看,假设为F盘,再执行

代码: 全选

bcdedit /store F:\boot\bcd /set {bootmgr} device partition=F:
bcdedit /store F:\boot\bcd /set {default} device partition=F:
bcdedit /store F:\boot\bcd /set {default} osdevice partition=F:
以上命令是基于bcd没修改过的,如果有修改过执行时提示错误不能完成的,把
bcdedit /store F:\boot\bcd
结果贴出来看看

最后在ubuntu下执行 sudo update-grub 应该能找到 win7选项,再启动试试
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#40

帖子 hellok112358 » 2011-09-13 19:25

bcdedit /store F:\boot\bcd
回显 。没有这条命令。/STORE 貌似是VISTA以前的把

然后试了
Bcdedit /createstore c:\BCD
bcdedit /import c:\bcd
Bcdedit /create {bootmgr} /d "Boot Manager"
Bcdedit /set {bootmgr} device boot


Bcdedit /create /d "2. Windows Seven Ultimate Build 7057" -application osloader
这条命令完后会返回一个GUID值,如:
The entry {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} was successfully created.
接下来{631fdc40-1b9a-11de-aa5e-0010c6ff6db9}这个GUID值就表示是Windows 7的菜单项。
Bcdedit /set {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} osdevice partition=E:
Bcdedit /set {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} device partition=E:
Bcdedit /set {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} path \windows\system32\winload.exe
Bcdedit /set {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} systemroot \windows
Bcdedit/displayorder {631fdc40-1b9a-11de-aa5e-0010c6ff6db9} -addlast

Bcdedit /default {631fdc40-1b9a-11de-aa5e-0010c6ff6db9}
bcdedit /timeout 7

bootsect /nt60 c:


然后sudo update-grub2 , grub能找到WIN7了。但重启后WIN7依然启动不了。
应该是BCD设置错误吧
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#41

帖子 smallapple » 2011-09-13 19:38

bcdedit /store 肯定能用的,可能是你那个 bcd 没复制过成功。

你自己手动建bcd的话,最后要把 bcd 移到win7 的系统盘的boot目录下

那个 win7 系统盘引导本来就是 nt60,不用再bootsect,就算要用,也不是在C盘,要在win7的系统盘

LS还是拷一个bcd来修改,搞那么多命令干啥 :em20
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#42

帖子 hellok112358 » 2011-09-14 10:12

考了个过来改了。成这样。还是不行阿。啊啊啊啊啊啊
:em20
附件
1.txt
(1.22 KiB) 已下载 117 次
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#43

帖子 smallapple » 2011-09-14 10:55

那个bcd看起来没什么问题。
请你先确认一下:
1、win7系统盘在PE下是不是F:盘?
2、那个bcd文件是不是放在win7系统盘的 boot目录下?
3、从grub菜单选择windows 7启动时什么错误提示?
头像
hellok112358
帖子: 16
注册时间: 2011-09-13 8:54

Re: ubuntu11.04版的grub2的两个说明

#44

帖子 hellok112358 » 2011-09-14 11:15

1.2都没问题
3
进去后黑屏。什么都没。就一个空横杠在跳动。
可是BOOTSECT的问题呢?
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: ubuntu11.04版的grub2的两个说明

#45

帖子 smallapple » 2011-09-14 11:22

有用 bootsect 动过win7系统盘吗?
ubuntu是什么版本的?如果是11.04的

在 /etc/grub.d/40_custom 中加入

代码: 全选

menuentry "Windows 7 on (hd0,8)" {
   insmod part_msdos
   insmod ntfs
   set root='(hd0,msdos8)'
   ntldr /bootmgr
}
再sudo update-grub后试试后面这个能不能启动
回复