- 积分
- 391
- 最后登录
- 2023-7-9
- 精华
- 0
- 阅读权限
- 30
- 主题
- 26
- UID
- 622369
- 帖子
- 978
- PB币
- 704
- 威望
- 0
- 贡献
- 0
- 技术
- 1
- 活跃
- 227
- UID
- 622369
- 帖子
- 978
- PB币
- 704
- 贡献
- 0
- 技术
- 1
- 活跃
- 227
|
发表于 2009-4-7 11:26:34
IP属地浙江
本帖最后由 forshare 于 2009-4-7 11:28 编辑
可以查看my全文weblog
使用下面方法之前需要bcdedit和bootsect两条命令,这两条命令可以到vista或者windows 7安装光盘上获得。bootsect.exe文件在vista和windows 7的安装光盘的boot目录下,而bcdedit.exe文件可以在安装了vista系统或者windows 7系统的电脑上的%windir%\system32目录下获得,当然也可以使用imagex命令挂载vista或者windows 7安装光盘里source\install.wim文件,然后到windows\system32下也能找到bcdedit命令。至于imagex命令可以到微软官方下载WAIK工具包。
1、创建BCD数据库
将安装光盘上的boot文件夹和bootmgr文件一起复制到c盘,然后删除C:\Boot\bcd文件。
配置 BCD 存储在此步骤中,使用 BCDEdit 新建名为 BCD 的启动配置文件。BCD 替换 Boot.ini。BCDEdit 是旨在管理 BCD 存储的命令行工具。Windows PE 和 Windows Vista 中都提供 BCDEdit。例如,进入bcdedit所在目录执行如下命令:
Bcdedit /createstore c:\BCD
bcdedit /import c:\bcd
Bcdedit /create {bootmgr} /d "Boot Manager"
Bcdedit /set {bootmgr} device boot
bcdedit /set {bootmgr} locale en-US //可以不设置,默认为英文 (这一段参考了WAIK帮助文档)
2、添加Windows XP启动菜单:
bcdedit /create {ntldr} /d "1. Windows XP Professional"
bcdedit /set {ntldr} path \ntldr
bcdedit /set {ntldr} device partition=c:
bcdedit /displayorder {ntldr} -addlast
3、添加Windows 7启动菜单
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
4、添加PE 1.0启动菜单
bcdedit /copy {ntldr} /d "3. Windows Preinstallation Enviroment 1.0"
//The entry {fcc0bdf0-1ba0-11de-aa5e-0010c6ff6db9} was successfully
bcdedit /set {fcc0bdf0-1ba0-11de-aa5e-0010c6ff6db9} path \LDRXPE
bcdedit /set {fcc0bdf0-1ba0-11de-aa5e-0010c6ff6db9} device partition=c:
bcdedit /displayorder {fcc0bdf0-1ba0-11de-aa5e-0010c6ff6db9} -addlast
5、设置默认的启动条目和选择时间
Bcdedit /default {631fdc40-1b9a-11de-aa5e-0010c6ff6db9}
bcdedit /timeout 7
6、修改启动参数模式
bootsect /nt60 c: |
|