Win7调试模式问题一例

BootMgr的引入,虽然增加了操作及维护的复杂度,但相应带来的好处也不少,就比如我曾做过的一次操作:将Win7系统从第一分区移动至第三分区。这样的操作在XP时代,是不太可能的,因为这就意味着盘符的改变,系统内部配置都是以盘符来确定的,而Win7始终将系统盘加载至C:上。

将Win7移动后,修改BootMgr记录中的device及osdevice项后,Win7系统便能正常启动,相应命令如下:

bcdedit /set {uuid} device=partitioin=X:
bcdedit /set {uuid} osdevice=partitioin=X:

然后将debug模式打开:

bcdedit /debug {uuid} on

然后再设置dbgsettings为1394,而不是默认的com串口:

C:\>bcdedit /dbgsettings
An error occurred while attempting to access the boot configuration data.
The system cannot find the file specified.

系统中竟没有dbgsettings,那就自己创建好了:

C:\>bcdedit /create {dbgsettings}
The entry {dbgsettings} was successfully created.
C:\>bcdedit /dbgsettings
There are no debugger settings present.
The operation completed successfully.
C:\>bcdedit /dbgsettings 1394 channel:11
The operation completed successfully.
C:\>bcdedit /dbgsettings
debugtype               1394
channel                 11
The operation completed successfully.

设置好生重启系统,但wndbg死活就是连不上。但同样的硬件,用XP启动windbg确实能正常,所以排除了线材、硬件问题,还是要从Win7系统着手。

经过详细对比正常系统的BootMgr设置后,发现是dbgsettings虽设好了,但并没有关联到Win7启动项上。那就做一下关联试试:

C:\>bcdedit /create {globalsettings}
The entry {globalsettings} was successfully created.
C:\>bcdedit /set {globalsettings}  inherit {dbgsettings}
The operation completed successfully.
C:\>bcdedit /set {current} inherit {globalsettings}
The operation completed successfully.

重启系统后,windbg便能正常连接了。

挺简单的事,非要搞得这么复杂!难怪简单的苹果产品却赢得了如此多用户的芳心!?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注