Jump to content











Photo
- - - - -

'Force' Load SD Card Reader Drivers In WinPE

winpe drivers

  • Please log in to reply
18 replies to this topic

#1 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 30 January 2017 - 05:23 PM

Hi All,

 

Help required, I have a Windows 10 Pro Tablet device that has a Micro SD Card slot, I need to be able to access the SD Card when in WinPE, at the moment it doesn't even show up under DISKPART.

 

I'm pretty sure it is a driver issue, where WinPE hasn't loaded the driver for the reader, so far I have tried two different ways of forcing WinPE to load the relevant driver -

 

1. Mount the BOOT.WIM image from the WinPE USB and used DISM Add driver to incorporate the driver.

2. After WinPE has completed booting execute a DRVLOAD.exe command pointing to the SD Card driver

 

neither have worked.

 

According to Device Manger the driver required for the SD Card is called disk.sys that and the associated files can be found in the driver repository at C:\Windows\System32\DriverStore\FileRepository with the folder name of disk.inf_amd64_879a35d65b2a8a7d.

 

On another device that uses the Realtek SD card driver using DRVLOAD works everytime, while on yet another device (all different) the SD Card is recognized after WinPE has completed booting without any 'tweaks' from me .. the only difference on this device from the problem one is that it does not use UEFI.

 

I'm getting frustrated, so any help would be greatly appreciated.

 

PS. If this is in the wrong forum then please accept my apologies and move it to the correct place.



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 February 2017 - 11:04 AM

disk.sys  is (nomen est omen) a "generic" disk driver, what you miss is an "earlier" and "specific" driver.

 

Boot your "normal" Windows 10, and check in device manager the "whole chain" of drivers in use.

Most (but not necessarily "all") SD card readers use the USB bus, select to show devices by connection, find your device in that tree and you will likely find that the USBSTOR and the USBEHCI, USBPORT (etc.) drivers are into the chain ...

 

:duff:

Wonko



#3 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 03 February 2017 - 11:51 AM

disk.sys  is (nomen est omen) a "generic" disk driver, what you miss is an "earlier" and "specific" driver.

 

Boot your "normal" Windows 10, and check in device manager the "whole chain" of drivers in use.

Most (but not necessarily "all") SD card readers use the USB bus, select to show devices by connection, find your device in that tree and you will likely find that the USBSTOR and the USBEHCI, USBPORT (etc.) drivers are into the chain ...

 

:duff:

Wonko

 

Hi and thanks for the help, I've done as you suggested and the chain of drivers sets out like this;

 

INTEL SD HOST CONTROLLER - DUMPSD.SYSY & SDBUS.SYS

        SD STORAGE CLASS CONTROLLER - SDSTOR.SYS

                 GENERIC SA32G SD CARD - DISK.SYS, EHSTORCLASS.SYS & PARTMGR.SYS

 

So if I load all of the above the SD card should be accessible when running in WinPE?



#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 February 2017 - 01:02 PM

It depends. :unsure:

Most probably you need to load only DUMPSD.SYSY & SDBUS.SYS (and the rest of the drivers are automatically loaded), but it is possible that (being them "main bus" drivers a reboot is needed, and then you will need to "integrate" the drivers in the PE image).

You can try checking (it depends again on the PE build, I believe) if you can find a device with a question mark in device manager and then use the .inf file to install the driver(s). :dubbio:

 

:duff:

Wonko



#5 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 03 February 2017 - 02:35 PM

It depends. :unsure:

Most probably you need to load only DUMPSD.SYSY & SDBUS.SYS (and the rest of the drivers are automatically loaded), but it is possible that (being them "main bus" drivers a reboot is needed, and then you will need to "integrate" the drivers in the PE image).

You can try checking (it depends again on the PE build, I believe) if you can find a device with a question mark in device manager and then use the .inf file to install the driver(s). :dubbio:

 

:duff:

Wonko

 

Cheers, I'll give it a go integrating the required drivers into the WinPE image and see what happens.

 

Regards

 

Fug



#6 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 08 February 2017 - 10:49 AM

It depends. :unsure:

Most probably you need to load only DUMPSD.SYSY & SDBUS.SYS (and the rest of the drivers are automatically loaded), but it is possible that (being them "main bus" drivers a reboot is needed, and then you will need to "integrate" the drivers in the PE image).

You can try checking (it depends again on the PE build, I believe) if you can find a device with a question mark in device manager and then use the .inf file to install the driver(s). :dubbio:

 

:duff:

Wonko

 

Well I've tried integrating the required drivers into the WinPE image and still no go on accessing the SD Card from WinPE



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 February 2017 - 02:54 PM

Maybe some other subsystem is missing.

 

But you are going too fast to the (expected) result.

 

How (EXACTLY) did you integrate the drivers in the PE? (and WHICH drivers did you integrate?) 

The "normal running system" uses per your report six drivers of which the only "common" ones (with other storage devices)  that are surely already in the PE are disk.sys and partmgr.sys (i.e. the "generic" ones), the other four all need to be present, the question was (is) whether they all need to be integrated or part of them need to be integrated and the rest can be normally installed via .inf or via drvload..exe or similar.

 

What is different (with and without the driver integration) in Device Manager?

Any device with question mark in device manager?

If you have a PE without Device Manager, you can try using devcon.exe to check devices (though it is not a particularly user friendly tool).

 

:duff:

Wonko



#8 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 09 February 2017 - 12:21 PM

Maybe some other subsystem is missing.

 

But you are going too fast to the (expected) result.

 

How (EXACTLY) did you integrate the drivers in the PE? (and WHICH drivers did you integrate?) 

The "normal running system" uses per your report six drivers of which the only "common" ones (with other storage devices)  that are surely already in the PE are disk.sys and partmgr.sys (i.e. the "generic" ones), the other four all need to be present, the question was (is) whether they all need to be integrated or part of them need to be integrated and the rest can be normally installed via .inf or via drvload..exe or similar.

 

What is different (with and without the driver integration) in Device Manager?

Any device with question mark in device manager?

If you have a PE without Device Manager, you can try using devcon.exe to check devices (though it is not a particularly user friendly tool).

 

:duff:

Wonko

 

Ok, found the missing file .. it is the EhStorClass.sys that is missing .. no idea how to add it to the WinPE image though. All the other driver files are present in the WinPE drivers folder.

 

The drivers were integrated by mounting the BOOT.WIM of the WinPE and using DISM /ADD-DRIVER option.

 

I also tried using the DRVLOAD command after WinPE had booted.


Edited by Fugazi, 09 February 2017 - 12:28 PM.


#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 February 2017 - 02:19 PM

Ok, found the missing file .. it is the EhStorClass.sys that is missing .. no idea how to add it to the WinPE image though. All the other driver files are present in the WinPE drivers folder.

 

The drivers were integrated by mounting the BOOT.WIM of the WinPE and using DISM /ADD-DRIVER option.

 

I also tried using the DRVLOAD command after WinPE had booted.

Sure you used DISM /Add-driver :), but with which exact full commands? (or if you prefer with which .inf files as argument?)

Maybe you missed a needed .inf and/or you need, after you have added the driver to configure it's start (like - say - "boot") :unsure:

 

:duff:

Wonko



#10 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 09 February 2017 - 02:20 PM

Maybe some other subsystem is missing.

 

But you are going too fast to the (expected) result.

 

How (EXACTLY) did you integrate the drivers in the PE? (and WHICH drivers did you integrate?) 

The "normal running system" uses per your report six drivers of which the only "common" ones (with other storage devices)  that are surely already in the PE are disk.sys and partmgr.sys (i.e. the "generic" ones), the other four all need to be present, the question was (is) whether they all need to be integrated or part of them need to be integrated and the rest can be normally installed via .inf or via drvload..exe or similar.

 

What is different (with and without the driver integration) in Device Manager?

Any device with question mark in device manager?

If you have a PE without Device Manager, you can try using devcon.exe to check devices (though it is not a particularly user friendly tool).

 

:duff:

Wonko

 

This is the DEVCON results when booted into Windows

SD\VID_02D0&PID_4324&FN_1\3&18BDEB84&0&0                                  : Broadcom 802.11abgn Wireless SDIO Adapter
SD\VID_02&OID_544D&PID_SA32G&REV_2.0\3&2017C2D0&0&0           : SD Storage Class Controller
SD\DISK&GENERIC&SA32G&2.0\4&2EE200F&0&3B031C79&0                : Generic SA32G SD Card
SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&E143BC68&0           : Samsung CGND3R
SD\VID_15&OID_0000&PID_CGND3R&REV_0.1\3&7A47DD1&0&0           : SD Storage Class Controller
SD\VID_02D0&PID_4324&FN_2\3&18BDEB84&0&0                                   : bcmfn2 Device
SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&47E8418F&0            : Samsung CGND3R
7 matching device(s) found.

 

and DEVCON when booted into WinPE

 

SD\VID_15&OID_0000&PID_CGND3R&REV_0.1\3&7A47DD1&0&0         : SD Storage Class Controller
SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&47E8418F&0           : Samsung CGND3R
2 matching device(s) found.
 



#11 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 09 February 2017 - 02:26 PM

Sure you used DISM /Add-driver :), but with which exact full commands? (or if you prefer with which .inf files as argument?)

Maybe you missed a needed .inf and/or you need, after you have added the driver to configure it's start (like - say - "boot") :unsure:

 

:duff:

Wonko

This is the sequence of commands I used to add drivers to the WinPE BOOT.WIM
Dism /Mount-Image /ImageFile:E:\sources\boot.wim /index:1 /MountDir:D:\mount (where e: is the WinPE USB)
Dism /Image:D:\mount /Add-Driver /Driver:e:\drivers /recurse

Drivers folder contains sdbus.inf, disk.inf, sdstor.inf and related files


Edited by Fugazi, 09 February 2017 - 02:28 PM.


#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 February 2017 - 06:17 PM

I am not sure to understand the "problem" (adding a file to a .wim)

 

You mount the boot.wim image file:

Dism /Mount-Image /ImageFile:E:\sources\boot.wim /index:1 /MountDir:D:\mount

 

Then you copy the EhStorClass.sys file from a source "normally", to the \Windows\System32\drivers\ folder under D:\mount\ (using explorer or other file manager is fine)

 

Then you commit the changes when you unmount the boot.wim file.

Dism /Unmount-Image /MountDir:D:\mount /commit

 

The real problem (once you will have added it to the PE boot.wim image) seems to me:

Will the presence of the file be enough to make it work? :unsure:

 

I am also perplexed on the reason why the EhStorClass.sys file is not already present in the PE's boot.wim, I mean it is present in the "standard" boot.wim of a Windows 10 install media (which is a PE), isn't it? :dubbio:

Maybe there is an issue in the way the PE was built originally? (if this is the case then some Registry entries may also be missing...)

 

:duff:

Wonko



#13 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 10 February 2017 - 09:23 AM

I am not sure to understand the "problem" (adding a file to a .wim)

 

You mount the boot.wim image file:

Dism /Mount-Image /ImageFile:E:\sources\boot.wim /index:1 /MountDir:D:\mount

 

Then you copy the EhStorClass.sys file from a source "normally", to the \Windows\System32\drivers\ folder under D:\mount\ (using explorer or other file manager is fine)

 

Then you commit the changes when you unmount the boot.wim file.

Dism /Unmount-Image /MountDir:D:\mount /commit

 

The real problem (once you will have added it to the PE boot.wim image) seems to me:

Will the presence of the file be enough to make it work? :unsure:

 

I am also perplexed on the reason why the EhStorClass.sys file is not already present in the PE's boot.wim, I mean it is present in the "standard" boot.wim of a Windows 10 install media (which is a PE), isn't it? :dubbio:

Maybe there is an issue in the way the PE was built originally? (if this is the case then some Registry entries may also be missing...)

 

:duff:

Wonko

 

I also run the command

Dism /Image:D:\mount /Add-Driver /Driver:e:\drivers /recurse
after mounting the boot.wim image - which should add all the required files, registry entries etc.

The WinPE was created as follows;

 

copype.cmd amd64 c:\WinPE_x64 using Windows ADK kit for Windows 10 Version 1607


Edited by Fugazi, 10 February 2017 - 09:23 AM.


#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2017 - 10:30 AM

And you confirm that (before or after) you have run the Dism /Add-Driverthe EhStorClass.sys file is not in the \Windows\System32\drivers\ folder inside the boot.wim?

 

And what happens if you add it manually ?

 

I don't know. :unsure:

 

From what I understand the EhStorClass.sys file has not a corresponding .inf file, because is (or should be) already in the "base" PE (i.e. in the boot.wim), and the Dism command /Add-Driver processes the .inf files it finds.

 

Let's see if any of the other peeps more familiar with Windows 10 have some other ideas.

 

:duff:

Wonko



#15 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 10 February 2017 - 10:51 AM

And you confirm that (before or after) you have run the Dism /Add-Driverthe EhStorClass.sys file is not in the \Windows\System32\drivers\ folder inside the boot.wim?

 

And what happens if you add it manually ?

 

I don't know. :unsure:

 

From what I understand the EhStorClass.sys file has not a corresponding .inf file, because is (or should be) already in the "base" PE (i.e. in the boot.wim), and the Dism command /Add-Driver processes the .inf files it finds.

 

Let's see if any of the other peeps more familiar with Windows 10 have some other ideas.

 

:duff:

Wonko

 

The EHStorClass.sys has to be added manually to the System32\Drivers folder which I have done (I used the file present in the System32\drivers folder on the "normal" Windows 10 OS)

 

The only thing I can think of is that the SD Slot is not initialized during POST.



#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2017 - 11:25 AM

The EHStorClass.sys has to be added manually to the System32\Drivers folder which I have done (I used the file present in the System32\drivers folder on the "normal" Windows 10 OS)

 

The only thing I can think of is that the SD Slot is not initialized during POST.

Well, but you are not booting from the SD card, obviously, so, even if it is not initialized at POST time, there must be a way to start the device later, and after all the devcon output shows that the device (let's call it the "reader") is found alright, only it seems like there is no card in it.

 

You should be able to have the same output you have in the PE of devcon in the "normal" Windows 10 without a SD card inserted :unsure: , i.e. this:

SD\DISK&GENERIC&SA32G&2.0\4&2EE200F&0&3B031C79&0 : Generic SA32G SD Card

should be the actual card :dubbio:

 

If this is not the case, then it must be *something* missing in the Registry. 

 

:duff:

Wonko



#17 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 10 February 2017 - 11:39 AM

Well, but you are not booting from the SD card, obviously, so, even if it is not initialized at POST time, there must be a way to start the device later, and after all the devcon output shows that the device (let's call it the "reader") is found alright, only it seems like there is no card in it.

 

You should be able to have the same output you have in the PE of devcon in the "normal" Windows 10 without a SD card inserted :unsure: , i.e. this:

SD\DISK&GENERIC&SA32G&2.0\4&2EE200F&0&3B031C79&0 : Generic SA32G SD Card

should be the actual card :dubbio:

 

If this is not the case, then it must be *something* missing in the Registry. 

 

:duff:

Wonko

 

And herein lies the problem ... getting that reader recognized in WinPE. There is a formatted card in the reader at all times, but the DEVCON

readout doesn't even see the reader or card in WinPE.

As to the registry I have no idea even where to start to look for reader entries.



#18 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2017 - 01:26 PM

And herein lies the problem ... getting that reader recognized in WinPE. There is a formatted card in the reader at all times, but the DEVCON

readout doesn't even see the reader or card in WinPE.

As to the registry I have no idea even where to start to look for reader entries.

What seemingly results from the devcon you posted (hence the idea to test in "full" Windows 10 WITHOUT the SD card inserted, as I see it (not necessarily correct), numbering the entries in::

 

This is the DEVCON results when booted into Windows

1) SD\VID_02D0&PID_4324&FN_1\3&18BDEB84&0&0                                  : Broadcom 802.11abgn Wireless SDIO Adapter
2) SD\VID_02&OID_544D&PID_SA32G&REV_2.0\3&2017C2D0&0&0           : SD Storage Class Controller
3) SD\DISK&GENERIC&SA32G&2.0\4&2EE200F&0&3B031C79&0                : Generic SA32G SD Card
4) SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&E143BC68&0           : Samsung CGND3R
5) SD\VID_15&OID_0000&PID_CGND3R&REV_0.1\3&7A47DD1&0&0           : SD Storage Class Controller
6) SD\VID_02D0&PID_4324&FN_2\3&18BDEB84&0&0                                   : bcmfn2 Device
7) SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&47E8418F&0            : Samsung CGND3R
7 matching device(s) found.

 

and DEVCON when booted into WinPE

 

5) SD\VID_15&OID_0000&PID_CGND3R&REV_0.1\3&7A47DD1&0&0         : SD Storage Class Controller
7) SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&47E8418F&0           : Samsung CGND3R
2 matching device(s) found.
 

The 5) and the 7) should be the "reader" and the 3) (missing in the PE) should be the actual card. :dubbio:

 

 

:duff:

Wonko 



#19 Fugazi

Fugazi

    Newbie

  • Members
  • 11 posts
  •  
    United Kingdom

Posted 10 February 2017 - 01:29 PM

What seemingly results from the devcon you posted (hence the idea to test in "full" Windows 10 WITHOUT the SD card inserted, as I see it (not necessarily correct), numbering the entries in::

 

The 5) and the 7) should be the "reader" and the 3) (missing in the PE) should be the actual card. :dubbio:

 

 

:duff:

Wonko 

 5 & 7 are the fixed SSD drive 2 & 3 are the reader ... the devcon I posted it one with the SD Card inserted.

 

The DEVCON in Windows without the SD Card inserted is as follows;

 

SD\VID_02D0&PID_4324&FN_1\3&18BDEB84&0&0                                  : Broadcom 802.11abgn Wireless SDIO Adapter
SD\VID_02&OID_544D&PID_SA32G&REV_2.0\3&2017C2D0&0&0           : SD Storage Class Controller
SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&E143BC68&0           : Samsung CGND3R
SD\VID_15&OID_0000&PID_CGND3R&REV_0.1\3&7A47DD1&0&0          : SD Storage Class Controller
SD\VID_02D0&PID_4324&FN_2\3&18BDEB84&0&0                                   : bcmfn2 Device
SD\DISK&SAMSUNG&CGND3R&0.1\4&8064D8D&0&47E8418F&0           : Samsung CGND3R
6 matching device(s) found.

 

If insert the SD Card then the DEVCON changes to the first one I posted, and remains as that even if I remove the SD CArd, under device manager the SD Card become a hidden device.


Edited by Fugazi, 10 February 2017 - 01:37 PM.






Also tagged with one or more of these keywords: winpe, drivers

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users