Extending the BARTPE FIX-VMSCSI plugin

Today while doing a V2P today, I ran into a BSOD. Very typical for V2Ps so I booted up BartPE to fix my BSOD as I usually do. Unfortunately my destination hardware was a HP G5 with a newer P400 Smart Array Controller on it. No good for me since the FIX-VMSCSI plugin only supports HP Smart Array 5i/6i controllers or Dell PERC controllers.

Time to extend the plugin to support the P400s! J

Step 1 : Download the P400 Drivers here.

Step 2 : Lotsa Hacking Around! J

Step 3: Boot to new BartPE and Choose the new P400 option!

Here’s what I can reconstruct from my hacking around to get this to work.

Looking through the plugin folder for FIXVMSCSI I was able to tell that the files needed for importing the drivers were : Driver.sys, Driver.inf and 2 REG files containing various settings. There is also a FIX.CMD file copies over the driver files and imports the registry.

For my ‘hack’ I used the 5i/6i files as my guide.

The first thing I did was copy in the HPCISSS2.SYS and HPCISSS2.INF files into the /plugin/fixvmscsi/files directory. I then made a copy of fix5i6i.cmd and called it fixp400.cmd.

I changed all references from the 5i to the P400.

I also did a bunch of change and replaces on the items in red.

Once this was done, I copied smart5i6i1 & 2 over to hpcisss1 & 2.

These files would be my new registry files that would be have the information windows needs to load up the driver.

It’s my rough understanding that when windows boots up, it looks at all the hardware and reads unique PCI vendor numbers from them and then matches them up to a database it holds in the registry. From that registry entry, windows is instructed which driver in the file system to use. The FIX-VMSCSI plug in uses these reg files to populate that critical database.

Fortunately, I discovered that in the INF file from the driver was all of the PCI vendor numbers we would need. The INF file can be loaded in notepad as a normal text file and deciphered.

It doesn’t appear that all INF files have this information so neatly displayed so I consider myself lucky today! J

Here is a peek inside the INF file :

And a look inside the FIX-VMSCSI reg files :

So basically, for each pci#VEN number I found in the .INF file, I created a HKLM entry in the REG file. Since the one driver file can be good for multiple controllers, there will be more than one pci#VEN number. The hpCISSs2 driver for instance supports not only the P400 but the P400i, P800, P600, p700m, e500, e200 and b400i. Each I assume has its own pci#VEN number. After looking at various sample reg files, it looks like the ClassGUID is ALWAYS 4D36E97B-E325-11CE-BFC1-08002BE10318 which I guess Microsoft translates as the Mass Storage Controller.

Each entry points to a Service which is now labeled hpCISSs2 which brings us to the second reg file.

This creates a Services key called hpcisss2 that holds information that points down to the ACTUAL file path to the driver itself.

I am assuming that as Windows boots up and reads the PCI Vendor ids, it then goes to the CriticalDeviceDatabase to look them up and find out which Service to use. It then looks up the Service in the CurrentControlSet and finds out where the actual driver exists allowing Windows to boot up to the OS. No more Blue Screen of Death!

From here, I modified the menu system to launch my new FixP400.CMD file, Built a new BartPE.iso and burned a new CD. Booted it up on the broken machine and fixed all my troubles! J

Hopefully there is enough coherent information in this post to help others extend the great work of the Ultimate-P2V CD team at RTFM-ED to extend functionality to hardware not currently supported.

Download the package of files here.

TAGS