mbouchard Posted October 29, 2008 Share Posted October 29, 2008 Recently we have started seeing an issue on Systems (Dell Optiplex and Precision) that have the Intel Matrix Storage Manager HD Controller installed. Basically, the drives are swapped in PE from what they should be.In the Bios, Vista, XP, and WinPE 1.6Drive0 = WD 250GB C:\Drive1 = ST 80GB D:\In WinPE 2.1Drive0 = ST 80GB C:\Drive1 = WD 250GB D:\Not sure why the drives are getting swapped. When this happens, my Windows setup attempts to install the OS to the 80GB drive. When the PC reboots after the PE portion is completed, it hangs as the 250GB drive is drive 0 once again.If I disconnect the 80GB drive then there are no issues as the 250GB drive is once again Drive 0I have tried changing the SATA operation in the BIOS but none have worked. The default is Raid Autodetect / ACHI.Anyone have any ideas what I could try?Thanks. Link to comment Share on other sites More sharing options...
Jazkal Posted October 30, 2008 Share Posted October 30, 2008 You could run a hardware detection scan, and when on that hardware, have your script dismount the unwanted drive using mountvol.exe or some such.Not sure that will work, but I don't see why not. Link to comment Share on other sites More sharing options...
mbouchard Posted October 30, 2008 Author Share Posted October 30, 2008 Thank you for the reply. Any suggestions on the best way to programatically get the correct drive 0? So far the only thing I have seen that gives me the correct drive0 is WMI.This will give me the correct info. But, I need to find out how to compare what I get in Diskpart to what I get in the script to make sure that I am unmounting the correct drive.Additionally, once I used Mountvol to unmount the wrong Drive0 I get bluescreens. not sure what it is yet but I am trying to track that one down. Luckily this is a test system. While this may be a workaround it doesn't address he underlying issue of the wrong drive being reported as being Drive0.On Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_DiskPartition",,48)For Each objItem in colItems Wscript.Echo "Bootable: " & objItem.Bootable Wscript.Echo "BootPartition: " & objItem.BootPartition Wscript.Echo "DeviceID: " & objItem.DeviceID Wscript.Echo "DiskIndex: " & objItem.DiskIndex Wscript.Echo "Index: " & objItem.Index Wscript.Echo "Name: " & objItem.Name Wscript.Echo "PrimaryPartition: " & objItem.PrimaryPartition Wscript.Echo "Size: " & ConvertSize(objItem.Size)Next Link to comment Share on other sites More sharing options...
mbouchard Posted October 31, 2008 Author Share Posted October 31, 2008 I just thought I would update this with a reason on why this is happening on WinPE. Per Microsoft:-Windows does not assure disk order. When booting to an Installed OS, we maintain the order through symbios.sys. This assures that the OS drive will always be first. -in WinPe, we list the disk in the order it is presented from the BIOS.Not sure why this only happens on WinPE 2.1 and not 1.6. They are researching a way to script this so will post that if I ever get it. Link to comment Share on other sites More sharing options...
mbouchard Posted November 7, 2008 Author Share Posted November 7, 2008 Welp, Microsoft gave me a script to determine if Drive C is on Disk 0. Option Explicit Dim sDrive Dim iDisk : iDisk = 0'Disk 0 Dim iPart : iPart = 0'Partition 0 sDrive = lookForC(iDisk, iPart) WScript.Echo "Drive" & iDisk & "/Partition" & iPart & " is mapped to drive " & sDrivefunction lookForC(Disk, Part) Dim sWQL, objWMIService, Partitions, oPartition, colDrives, oDrive lookForC = "<none>" sWQL = "SELECT * FROM Win32_DiskPartition where " & _ "DiskIndex=" & Disk & " and " & _ "Index=" & Part Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set Partitions = objWMIService.ExecQuery(sWQL) For Each oPartition In Partitions Set colDrives = objWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _ oPartition.DeviceID & """} WHERE AssocClass = " & _ "Win32_LogicalDiskToPartition") For Each oDrive In colDrives lookForC = oDrive.DeviceID Next Nextend function Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now