![]() |
![]() ![]() |
Feb 3 2008, 01:33 AM
Post
#461
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-January 08 From: Sydney, Australia Member No.: 34,303 |
About a month ago I wrote a (very quick and dirty) script called MSDPatch. This is designed to run in PE, detect any loaded mass storage drivers and inject them directly into an offline Windows, thus preventing a BSOD on boot. OfflineSysPrep and fix_hdc currently have this covered, too. The way to get mass storage drivers into anything other than VistaPE is to use the DriverPacks mass storage pack. Hence all these methods are dependent essentially upon the DriverPacks. OfflineSysPrep has the advantage, since it doesn't rely on the currently loaded driver, to inject into the offline system all the DriverPacks mass storage drivers that are offered with their BartPE plugin. Hi Galapo, Sorry - just noticed the two advanced options that do this - haven't got to analysing the advanced functions yet. So am I right that the limitation we are trying to bridge is for 'user selection' of individual drivers? I will try and squeeze in another 'module' on the new OSP GUI called 'MSD Injection', where we allow : 1) integration of all (or selected?) Driverpacks drivers (for 'universal' images as you say) - using your already existing advanced options (though I think they were greyed out in my version) 2) loaded PE drivers 3) user selected individual drivers I will provide you my alpha code for the inf parsing, if you want to have a stab at improving the parsing routine. thecharliec |
|
|
|
Feb 3 2008, 03:15 AM
Post
#462
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
So am I right that the limitation we are trying to bridge is for 'user selection' of individual drivers? Yes, that's right. But also extending this to drivers which may happen to be not included in the driverpack. So 1) default to using driverpack; and 2) user provides driver and location etc. QUOTE I will try and squeeze in another 'module' on the new OSP GUI called 'MSD Injection', where we allow : 1) integration of all (or selected?) Driverpacks drivers (for 'universal' images as you say) - using your already existing advanced options (though I think they were greyed out in my version) 2) loaded PE drivers 3) user selected individual drivers I will provide you my alpha code for the inf parsing, if you want to have a stab at improving the parsing routine. All sounds good to me. The options are greyed out if you haven't included devcon.exe as to gain the hwid for the appropriate driver to inject devcon is needed. Regards, Galapo. |
|
|
|
Feb 3 2008, 03:40 AM
Post
#463
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-January 08 From: Sydney, Australia Member No.: 34,303 |
Aha, thanks for pointing that out - I will include devcon and test.
I have sent you over a copy of the code for MSDPatch. See what you can make of the .inf parsing code, and whether it can form the basis for option 3) above Anyway I am nearly through the core front end GUI / drive detection logic in the OSP update, so I will next turn my attention to integrating the Advanced options and analyse the existing MSD injection functions then. This is rapidly evolving into a potentially one stop 'P2P' utility - can't wait till it's done! regards thecharliec This post has been edited by Ed_P: Feb 3 2008, 12:45 PM
Reason for edit: Removed needless quote. Please use the ADD REPLY button.
|
|
|
|
Feb 3 2008, 03:53 AM
Post
#464
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
Aha, thanks for pointing that out - I will include devcon and test. Either that or you haven't run 'CreateMassStorageData.exe' to generate the necessary files for the DP data that OSP will use. QUOTE I have sent you over a copy of the code for MSDPatch. See what you can make of the .inf parsing code, and whether it can form the basis for option 3) above Anyway I am nearly through the core front end GUI / drive detection logic in the OSP update, so I will next turn my attention to integrating the Advanced options and analyse the existing MSD injection functions then. Thanks, about to check it out now. Regards, Galapo. |
|
|
|
Feb 3 2008, 09:38 PM
Post
#465
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
My tests of devcon injecting a driver into an offline system failed. We need an alternative to MS msdinst.exe. I've been testing msdinst.exe and find it not to be perfect, either. Problems: 1) For any driver that is to be injected into the offline system, it must exist firstly under %SystemRoot%\system32\drivers, whether that be PE or whatever (incidentially, the tool can be run under 'normal' windows by adding 'HKLM\SYSTEM\CurrentControlSet\Control\MiniNT' to the registry while it is run). 2) If the driver file does not exist there, then no service entry is added to the offline system and the hwid in 'CriticalDeviceDatabase' is not matched to any service. 3) In order to add the service to the offline system, msdinst.exe seems to create the service firstly on the running system before copying this to the offline system. This is annoying if wanting to run the tool outside PE. Whether all this behaviour is possible to redirect with altered system variables and runscanner I do not know yet. Regards, Galapo. |
|
|
|
Feb 4 2008, 12:34 AM
Post
#466
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
peimg.exe from WAIK works well in adding drivers to a WinPE image. I wonder if it's possible to 'trick' it into injecting drivers into an offline xp system? I wonder what files and/or registry entries are necessary for it to work? I wonder if it is totally incompatible, though?
Regards, Galapo. |
|
|
|
Feb 4 2008, 12:50 AM
Post
#467
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
Interesting. Changing xp's 'Documents and Settings' to 'users' allows peimg.exe to run for a while before it aborts with an error saying that the operation failed to complete. However, hwids are correctly entered into 'CriticalDeviceDatabase' and matched to a service entry which is itself correctly entered under 'services'. Driver files are correctly copied to their respective locations, too. Interesting...
Regards, Galapo. |
|
|
|
Feb 4 2008, 05:24 PM
Post
#468
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-January 08 From: Sydney, Australia Member No.: 34,303 |
Interesting. Changing xp's 'Documents and Settings' to 'users' allows peimg.exe to run for a while before it aborts with an error saying that the operation failed to complete. However, hwids are correctly entered into 'CriticalDeviceDatabase' and matched to a service entry which is itself correctly entered under 'services'. Driver files are correctly copied to their respective locations, too. Interesting... Regards, Galapo. Hey Galapo, Interesting work! Note, I found another toy for you to play with: drvload.exe It is part of the WinPE image in the WAIK (it was in the OPK at least), and according to this article: http://technet2.microsoft.com/WindowsVista...3.mspx?mfr=true 'The Drvload tool adds out-of-box drivers to a booted Windows PE image. It takes one or more driver .inf files as inputs. To add a driver to an offline Windows PE image, use the peimg tool. If the driver .inf file requires a reboot, Windows PE will ignore the request. If the driver .sys file requires a reboot, then the driver cannot be added with Drvload.' Don't know if it will prove useful, but maybe it's worth testing this with runscanner. Think it may be a bit 'cleaner' in requirements than MSDInst regards thecharliec |
|
|
|
Feb 4 2008, 10:56 PM
Post
#469
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-January 08 From: Sydney, Australia Member No.: 34,303 |
Just realised that drvload will likely just install drivers into %systemroot% (sorry got a bit excited) which makes it pretty useless for our purposes....
peimg.exe looks very promising (very inspired find Galapo I wonder also how it handles D+S (Users) on another partition? maybe we need to create a temporary users on the target %Systemdrive% regards thecharliec This post has been edited by Ed_P: Feb 4 2008, 11:18 PM
Reason for edit: Removed needless quote. Please use the ADD REPLY button.
|
|
|
|
Feb 4 2008, 11:09 PM
Post
#470
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
|
|
|
|
Feb 4 2008, 11:30 PM
Post
#471
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
OK, did some quick tests. All that is required for 'peimg.exe' to conduct driver injection into an offline xp system is to create a dummy folder called 'users' in the root of the drive if such a folder by that name does not already exist.
Regards, Galapo. |
|
|
|
Feb 5 2008, 03:59 AM
Post
#472
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
As some may be following the progress of this, I thought I might repeat a little of what I have just written in an email to thecharliec.
peimg can successfully inject drivers which are dependent and reference inclusion from another driver file. One such example is the ich8ide.inf which references mshdc.inf. Steps I took to inject this driver into an offline xp system: 1) Created a directory in root called 'drivers' 2) Extracted 'driver.cab' from 'WINDOWS\Driver Cache\i386\' to 'drivers' folder 3) Extracted 'sp2.cab' from 'WINDOWS\Driver Cache\i386\' to 'drivers' folder 4) Copied '*.inf' from 'WINDOWS\inf' to 'drivers' folder 5) Copied ich8ide.inf and ich8ide.cat to 'drivers' folder 6) Created a dummy folder 'users' in root 7) Ran command 'peimg.exe /inf=p:\drivers\ich8ide.inf p:\windows' 'PCIIde' service is correctly created from the successful inclusion of 'mshdc.inf' as it wasn't correct before peimg run. Note: only entries for ich8ide.inf are created, ie hwids from mshdc.inf are not entered, only if peimg is run on it directly. So peimg can be used knowing its 'limitations' and a few 'tricks'! Regards, Galapo EDIT: if the 'windows' directory is not named 'windows', then it must be temporarily named that for driver injection with peimg. This post has been edited by Galapo: Feb 18 2008, 09:35 PM |
|
|
|
Feb 6 2008, 09:36 AM
Post
#473
|
|
|
Member ![]() ![]() Group: Members Posts: 85 Joined: 13-November 07 Member No.: 33,187 |
I am just trying to follow the test this thread has taken. So you guys are working with peimg.exe to be able to inject drivers into a system booted in bartpe?
*test = twist* This post has been edited by justusiv: Feb 6 2008, 02:17 PM |
|
|
|
Feb 6 2008, 12:09 PM
Post
#474
|
|
|
Member ![]() ![]() Group: Members Posts: 85 Joined: 13-November 07 Member No.: 33,187 |
@justusiv Doesn't sound like a HAL issue. Could be a HD controller driver problem and the appropriate driver needs to be installed. Possibly the intel service if present requires disabling. Regards, Galapo. Seems like the advanced option to install storage drivers did the trick. Thank you Currently i am also having an issue, where the new machine has the processors under device manager with exclamations, i just click on uninstall, it asks me to reboot and then they reinstall fine. Anyone else experiencing this? Thanks JustusIV |
|
|
|
Feb 6 2008, 12:42 PM
Post
#475
|
|
|
Member ![]() ![]() Group: Members Posts: 37 Joined: 15-November 07 Member No.: 33,220 |
I am just trying to follow the test this thread has taken. So you guys are working with peimg.exe to be able to inject drivers into a system booted in bartpe? When trying to integrate them into a system booted in BartPE, I get - "The image directory specified is not a valid Windows PE image." "PEIMG failed to complete the operation with status code 0x8007000d." This post has been edited by VASKO: Feb 6 2008, 12:45 PM |
|
|
|
Feb 6 2008, 02:06 PM
Post
#476
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
"The image directory specified is not a valid Windows PE image." "PEIMG failed to complete the operation with status code 0x8007000d." That error appears when you don't have a folder named 'users' in the root of the drive. The "PEIMG failed to complete..." error is always there I have found, even though drivers have been successfully injected. I don't know why it is complaining when the task was successful in terms of it's registry and file injection. Regards, Galapo. |
|
|
|
Feb 6 2008, 02:08 PM
Post
#477
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
|
|
|
|
Feb 7 2008, 02:16 AM
Post
#478
|
|
|
Member ![]() ![]() Group: Members Posts: 37 Joined: 15-November 07 Member No.: 33,220 |
|
|
|
|
Feb 7 2008, 04:58 AM
Post
#479
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
|
|
|
|
Feb 7 2008, 04:27 PM
Post
#480
|
|
|
Gold Member ![]() ![]() ![]() ![]() Group: Members Posts: 811 Joined: 5-June 06 From: Sydney, Australia Member No.: 19,704 |
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 9th September 2010 - 01:53 AM |