[原创]BXP的WinXP系统PNP技术过程

看到这里有太多的人问这个问题.

当然了也有一部分人想拿现成的,不过我相信天上没有掉吃的说法.

今天我以我的小小经验说说BXP的PNP做法,其实PNP方法有很多种,我说的是官方的PNP做法.

第一部:从官方网站上下PCI网卡读取程序.
第二部:在BXP的客户里,将PCI程序配置到系统中,IO-DHCP服务端会自动接受PCI读出的网卡值.
第三部:呵,也没什么了.简单的要命.你应该可以做到的.
第四部:还有主板的PNP方法,其实就是接顺序将硬件设备删除了,再优化一下注册表就OK了.

朋友开了个论坛,地址是:http://www.cnsjh.com 望朋友关照一下了.

说详细一点?
大家都知道了,
谁还买呀?
关键是网卡的PNP吧.
是不是用一个象华教pnpenv.exe 的程序.?是自动生成注册表吗?

官方网站上面哪有什么PCI网卡读取程序哦?

呵呵.说说吧,
我买来一台服务器雄心装志要把有盘改无盘,
谁知只能上一台,
估计要做主板PNP才行的了.
现在服务就那么开着,
只带一台机,
没招了.

Configuring the Client Registry for NIC Variations
Modifying the registry to support minor variation in NIC PCI headers.
Problem:
Customer is reporting that identical hardware platforms won’t boot BXP properly. Certain client systems hang indefinitely during the boot up process.
Cause:
After close examination of the problem, it has been determined that the systems are NOT identical. Subtle differences in the Ethernet controller are causing the problem. These subtle differences are causing XP not to recognize the Ethernet controller and begin the process of ‘New Hardware’ installation.
Even if the chips use the same software driver, differences in the Subsystem and/or Revision can prevent XP/BXP from recognizing it properly. The Table below displays the PCI header information for the Ethernet controllers from the 2 different systems:
PCI Information
Unit A (Boots properly)
Unit B (Hangs during boot)
Vendor Id
8086
8086
Device Id
1229
1229
Subsystem
00000000
30008086
Revision
08
08
The different subsystem is the cause of the problem in this case. Additionally, if the Revision were different while all other fields remain identical, the same problem would occur.

Solution:

The solution requires modification of the registry to “trick” Xp into thinking it has seen this Ethernet controller previously.

This solution assumes the same software driver can be used to support both versions of the NIC chipset.

For the purposes of implementing this solution, I will be referring to 2 units: A and B.

Unit A will have a HD used to install XP and BXP Client.

Unit B will be our problem unit (No HD)
You will also need a previously configured BXP Server.
Disclaimer: This document assumes the reader is familiar with terminology associated with the registry (Hives, Keys, Values, GUID, …) and is comfortable making direct modifications to the registry. Improper modifications to the registry can prevent the system from booting.

Step 1 C Identify the PCI Configuration information on Unit B (our problem unit)

Within the PCI configuration header information, there are 4 pieces of information we need: Vendor Id, Device Id, Subsystem (Vendor and Id), and Revision Id.

If you do not know this information, 3rd party utilities are available on the internet. I searched for ‘Pciview” and used a DOS version from Canopus (canopus.com/US/products/free … lities.asp)

This is a partial printout of the PCI configuration header for the Ethernet Controller from Unit B.

(Notice the byte order is reversed C I’ve written it down in the format you will need later)

Offset 0x00 & 0x01 = Vendor Id = 8086

Offset 0x02 & 0x03 = Device Id = 1229

Offset 0x08 = Revision Id = 08

Offset 0x2c―0x2F = Subsystem Id = 30008086

Step 2 C Modifying the Registry

Begin with the normal steps for installing and preparing a client for BXP.

  1. Install XP on Unit A.
  2. Install BXP Client on Unit A.
  3. Enable the ‘Boot from Lan’ option in the BIOS of Unit A.
  4. On the BXP Server, configure Unit A to boot from HD First.
  5. Boot Unit A.
  6. Build the BXP Client Image using the BXP Image Builder.

After completing the image build…

  1. Start the registry editor (regedit)

  2. Click on the HKEY_LOCAL_MACHINE key.

  3. Use File / Load Hive to load the System hive from the BXP Image you just created. The system hive is located in
    (VirtualDrive):\WINDOWS\SYSTEM32\CONFIG\SYSTEM

  4. You will be prompted to give the new Hive a name. For this example, I used ‘Client-SystemHive’

  5. All of the Keys used in the remaining steps will be from this hive only. Make sure you examine and modify the proper hive.

  6. Choose the ‘Select’ Key under the Client hive:
    Client-SystemHive\Select
    Examine the values for this key. Note the ‘Default’ value
    Client-SystemHive\Select\Default
    This indicates which ControlSet will be used when XP boots.
    In this example, Default is a 1, which indicates we will be using ControlSet001.

  7. In the appropriate ControlSetnnn Key, examine the Services\BNNS\Parameters Key
    In this example, we are using
    Client-SystemHive\ControlSet001\Services\BNNS\Parameters

  8. In the Parameters Key, write down the value for the Interface0 Value. It’ll be a GUID.
    This GUID identifies the NIC that BXP is bound to.
    In this example, it’s {18F9C371-4f81-4a49-b59c-e977917a44ba}

  9. Now open the ControlSetnnn\Control\Class\ key.
    Under this key, you will see numerous keys whose name is a GUID.
    Look for {4d36e972-e325-11ce-bfc1-08002be10318}
    Examine the Class Value C It should say ‘Net’. If it doesn’t, you’re looking at the wrong key.
    Open the key and examine the subkeys. Subkeys of this key will be 0000, 0001, 0002, …
    Examine the values in each of these subkeys until you find the one whose value for ‘NetCfgInstanceId’ matches the GUID from Step 8.
    Remember this GUID and index combination. It’ll be used later.
    In this example, it’s {4d36e972-e325-11ce-bfc1-08002be10318}\0001

  10. Open the ControlSetnnn\Enum\PCI Key
    The subkeys will have the format
    VEN_xxxx&DEV_xxxx&SUBSYS_xxxxxxxx&REV_xx
    Find the key that matches your Vendor Id and Device Id from Unit B (Step 1).
    For this example, it’s

VEN_8086&DEV_1229&SUBSYS_xxxxxxxx&REV_xx
Each of these keys will have another subkey consisting of some numbers and ‘&’ characters.
For this example, it’s “3&61aaa01&0&30”
Search each of the
VEN_8086&DEV_1229&SUBSYS_xxxxxxxx&REV_xx\x&xxxxxxx&x&xx keys.
Examine the values for each of these keys until you find one whose ‘Driver’ value matches the GUID and index combination (From Step 9).
Driver = {4d36e972-e325-11ce-bfc1-08002be10318}\0001
11. Once you’ve found the matching ‘Driver’ value. Select the VENxxxx&DEV_xxxx&SUBSYS_xxxxxxxx&REV_xx key that contained that matching ‘Driver’ entry.

In my case, it was
VEN_8086&DEV_1229&SUBSYS_00000000&REV_08
12. Export this key to a file by choosing ‘Export…’ from the File menu or right-click and choose Export from the pop-up menu.
For this example, it’s called BxpPci.reg
(Don’t close regedit C we’ll be back to it in a moment)
13. Open the exported file in NOTEPAD and VERY CAREFULLY make the following changes…
13.1 (Optional) You may change the ‘DeviceDesc’ field to use a different text string.
“DeviceDesc”=“Intel(R) 82559 Fast Ethernet LAN on Motherboard”
I appended “(Bxp)” on the end
“DeviceDesc”=“Intel(R) 82559 Fast Ethernet LAN on Motherboard (Bxp)”
13.2 Remove the following keys and their values from the file (if they are present).
LogConf
Control
In my case, they are shown as the following…
[HKEY_LOCAL_MACHINE\Client-SystemHive\ControlSet001\Enum\PCI\VEN_8086&DEV_1229&SUBSYS_00000000&REV_08\3&61aaa01&0&30\LogConf]
[HKEY_LOCAL_MACHINE\Client-SystemHive\ControlSet001\Enum\PCI\VEN_8086&DEV_1229&SUBSYS_00000000&REV_08\3&61aaa01&0&30\Control]
13.3 Remove the following values
LocationInformation
UINumber
In this example, they exist in the following Key
[HKEY_LOCAL_MACHINE\Client-SystemHive\ControlSet001\Enum\PCI\VEN_8086&DEV_1229&SUBSYS_00000000&REV_08\3&61aaa01&0&30]
13.4 Embedded in the key names are the Subsystem Id and Revision Id you need to change. These appear in several places and you will need to change all of them using the subsystem Id and Rev Id from Unit B. (You got this information back in Step 1)
Replace the SUBSYS and/or REV entries with the value from Unit B.
In this example, the key has the following name:
VEN_8086&DEV_1229&SUBSYS_00000000&REV_08
I carefully changed it (in 3 places) to
VEN_8086&DEV_1229&SUBSYS_30008086&REV_08
14. Exit notepad, saving the changes back into the file.
15. Go back to Regedit and import the modified file back into the registry by choosing ‘Import…’ from the File menu.
(If you get an error, you may need to set the permission on the Enum\PCI Key. Select the Enum\PCI key, and choose Edit\Permissions… from the menu. Grant yourself ‘Full Control’ and click OK.)
After completing the import, you should see the new key listed in the Enum\PCI Key. (You may need to press F5 to have Regedit refresh the display.)
17. Select the [HKEY_LOCAL_MACHINE\Client-SystemHive] and unload it from the registry using File \ Unload Hive… from the menu.
18. Shutdown Unit A.

  1. Enable the ‘Boot from Lan’ option in the BIOS of Unit B.

  2. Boot Unit B and configure it to use the same Vdisk image as Unit A.

做BXP的PNP不难,但是BXP镜像启动的时候会检测启动网卡的所在的PCI总线和PCI的插槽位置,不同的话,它会提示,要按回车进入系统,这个提示才难解决。
不知道sx_wjw兄弟,这个问题你解决了吗?
关键是不是在(VirtualDrive):\WINDOWS\SYSTEM32\CONFIG\SYSTEM
4. You will be prompted to give the new Hive a name. For this example, I used ‘Client-SystemHive’
5. All of the Keys used in the remaining steps will be from this hive only. Make sure you examine and modify the proper hive.
6. Choose the ‘Select’ Key under the Client hive:
Client-SystemHive\Select
Examine the values for this key. Note the ‘Default’ value
Client-SystemHive\Select\Default
This indicates which ControlSet will be used when XP boots.
In this example, Default is a 1, which indicates we will be using ControlSet001.
7. In the appropriate ControlSetnnn Key, examine the Services\BNNS\Parameters Key
In this example, we are using
Client-SystemHive\ControlSet001\Services\BNNS\Parameters
8. In the Parameters Key, write down the value for the Interface0 Value. It’ll be a GUID.
This GUID identifies the NIC that BXP is bound to.
这一段,这个我到没有做过试验。本人英文差

不错,BXP所带的帮助文件里找到的.
我就是照这个做成功的.

对sx_wjw所发文档的简单翻译:
网卡的头信息通常包含Vendor Id,Device Id,Subsystem和Revision四种重要信息
例如:8086,1229,00000000,08和8086,1229,30008086,08,很明显Subsystem部分是不同的.而稍有不同就会使xp认为发现了新硬件进而无法启动.
解决:
1.先搞好一台.
2.获取有问题机器上的网卡的信息,我们需要Vendor Id, Device Id, Subsystem (Vendor and Id)和Revision Id.可以通过第三方工具pciview(工作于dos下):
canopus.com/US/products/free … lities.asp
以下是运行pciview后显示的部分信息:
Offset 0x00 & 0x01 = Vendor Id = 8086

Offset 0x02 & 0x03 = Device Id = 1229

Offset 0x08 = Revision Id = 08

Offset 0x2c―0x2F = Subsystem Id = 30008086
3.好四组信息全有了,可以改xp注册表了.在服务器上加载先搞好的一台xp的注册表,定位到Client-SystemHive\Select\Default,这指示xp启动时用哪个ControlSet,通常是ControlSet001,那就定位到Client-SystemHive\ControlSet001\Services\BNNS\Parameters,记录此键下Interface0的值,假定是这个{18F9C371-4f81-4a49-b59c-e977917a44ba}.
4.打开ControlSetnnn\Control\Class,此下有很多名字是GUID的键,定位到{4d36e972-e325-11ce-bfc1-08002be10318},此键下会有好几个子键如0001,0002等,搜索上一步获取的GUID:{18F9C371-4f81-4a49-b59c-e977917a44ba},记住它所在的子键,例如{4d36e972-e325-11ce-bfc1-08002be10318}\0001.
5.打开ControlSet001\Enum\PCI,其下格式形如VEN_xxxx&DEV_xxxx&SUBSYS_xxxxxxxx&REV_xx,找到符合咱Vendor Id和Device Id的项,例如VEN_8086&DEV_1229&SUBSYS_xxxxxxxx&REV_xx,此键会有一下级子键形如3&61aaa01&0&30.搜索上一步获取的{4d36e972-e325-11ce-bfc1-08002be10318}\0001,把该项所在的键导出,例如导出键VEN_8086&DEV_1229&SUBSYS_00000000&REV_08为文件bxpreg.reg,不要关掉注册表,然后修改bxpreg.reg,删去如下子键及其值:LogConf与Control,再删如下两值:LocationInformation与UINumber,最后修改替换符合你要求的Subsystem Id与 Revision Id.
6.ok,回到注册表编辑器,导入bxpreg.reg,如提示不能,先修改Enum\PCI分支的权限为"完全控制".

翻译的好象不准确呀。我在有盘的XP上,找不到注册表键:
Client-SystemHive\ControlSet001\Services\BNNS\Parameters
希望继续努力。

如果你的网吧不是超过10种以上的配置的话,就根本不用考虑pnp,直接每个配置搞个最小化的系统,用iscsi做个服务端就可以,何必一定要pnp,,麻烦的很而且又不算稳定,

感谢YOSHIMITSU兄对此技术文档进行了全面的翻泽,本来我想翻出来的,但自我感觉英文水平太烂,误导了大家。

在BXP官方的NIC错误解决方法里,的确很详细的描述了解决网卡PNP问题,可能有些朋友看不懂,理解不了其中的过程。我呢因为是做世纪虹XP系统的,总不能把自己的东西全搞出来吧,呵,我是靠这个吃饭的,你们仍心饿死我呀:)好,我将我的方法公布如下;

1、安装有盘XP-Clinet。
2、网卡PNP思路,通过官方提供的pciview.exe程序,在XP启动时运行,并输出PCI网卡的值,通过写入程序,写到系统里。
说明1、在C盘建立一个网卡驱动目录,以便在写入网卡值的同时将驱动拷贝进去。 这样做的好处是每次客户端启动都会导入新的驱动和注册表值,那么系统的启动率100%有保证。同时支持任何网卡的启动。
3、有人一定在问XP如何在启动时运行DOS程序呢,(BXP即然提出使用pciview.exe程序,那么就一定能在XP下运行了)将pciview.exe程序入写入程序添加在autoexec.bat文件中,在gpedit.msc里指定autoexec.bat的执行权即可。
4、pciview.exe程序下载请到http://sxsjh.vicp.net/bbs/里查找。

最后要说的是“华英雄”在问Client-SystemHive\ControlSet001\Services\BNNS\Parameters 这句是什么意思,意思是说请你在的客户端打开注册表,并找到第一硬件配置信息。

对了,还有哑巴兄所提到的启动按任意键的解决办法,我目前的解决办法是“通过在不同的网卡值的情况下启动系统两次以上,那么以后就不会再提示”当然这是个笨办法,我正在找更好的办法,以我的分析是这样的;“在BXP客户端上传服务器端时已经记录了PCI的值(只记录了当前上传时的网卡值),只要将PNP的所有网卡值同时加入到一个母盘上传里,应该可以完全解决”,不过这只是我的分析,更实际的说,通过对BXP生成的SCSI设备和网卡的设备注册表对照,你会发现有很多相同的值,如驱动值"Driver"=“{4D36E972-E325-11CE-BFC1-08002BE10318}\0001”

就说这么多吧,如有机会一起交流一下了。

请哑巴兄QQ联系我,交流一下了。YOSHIMITSU也一起来吧,很高兴认识你。

我的QQ是30828566,验证请输入BXP及来处!

好贴!好贴!最近没搞这个了,从北京回来之后一定试试!到时请大家多指点!

我的意思是说找不到哪个所谓的注册表键值,
当然我是在有盘的XP上找的.
没找着.Client-SystemHive\ControlSet001
能不能贴个完整的路径?

Use File / Load Hive to load the System hive from the BXP Image you just created. The system hive is located in

(VirtualDrive):\WINDOWS\SYSTEM32\CONFIG\SYSTEM

You will be prompted to give the new Hive a name. For this example, I used ‘Client-SystemHive’

使用”File/Load Hive”从刚建立的BXP镜像载入系统的hive文件,它位于 (VirtualDrive):\WINDOWS\SYSTEM32\CONFIG\SYSTEM

这时会提示要求为这个hive文件命名,在这个例子中,我命名为Client-SystemHive’
这是我的理解,有错误的话请指教

先点击HKEY_LOCAL_MACHINE,然后选择文件->加载配置单元,浏览到X:\windows\system32\config\system,点击打开,
这时会要求你输入一个名称,你就填Client-SystemHive,
完成后在HKEY_LOCAL_MACHINE下就会多一个Client-SystemHive键,
它就是无盘注册表中HKEY_LOCAL_MACHINE\SYSTEM的值,
这样加载是为了方便修改而已,
修改后再卸载配置单元,
这样就把修改保存到客户机的注册表中了.
这是我的实际操作.
已成功了的.

至于pciview这个,感觉输出值没什么用,
在我的机上是一大堆乱码,
我的经验是把硬盘挂到无盘机上,
然后看看注册表中网卡相应的键值,
记录下来再修改回母盘去.

我进GPEDIT.MSC找了,
没找到在哪里修改可以让autoexec.bat运行,请高手指点.

在Windows设置里面的“脚本”里面设置

WindowsXP的PNP按照BXP的帮助文档安装是可行的(亲自试验过),至于sx_wjw兄的方法我没有试过,但是从原理上分析,是绝对没有问题的。也就说也应该是行得通的