I have a lot of data migration to do at work to move everything to our new iSCSI based SAN (LeftHand P4000). This week I have dedicated my time to figuring out a way to mount iSCSI targets under our custom WinPE v3.0 (Windows 7 Based) environment. I have not found any resources referring to WinPE v3.0 and only a handful of resources referring to WinPE v2.0 & v2.1. So I’ll post it here to hopefully help others find it.
Here are the steps I took to get the iSCSI Initiator working. I am assuming you have some sort of experience with customizing WinPE.
Setup a VM with Windows 7 32-bit running because we need the files to be compatible with WinPE 3.0 which is Win7 based.
You need to install WAIK (The Windows 7 version). After installing WAIK and running copype.cmd mount the WinPE boot.wim file using ImageX (or DISM, which I’ve had problems with). The boot.wim file is located in the sources directory. (Note: Installing WAIK and the copype command are not within the scope of this post.)
Copy the following files from Windows 7 to the mounted image while keeping their paths relative. (ie. C:\Windows\System32 = MountLocation\Windows\System32)
Using Regedit load the WinPE registry hives directly under HKEY_LOCAL_MACHINE using the names below. This is important in order to import the registry files in the next step. The registry hives can be found at MountLocation\Windows\System32\config.
SYSTEM -> HKLM\PE_Sys
SOFTARE -> HLKM\PE_Soft
The REG.EXE commands to do this would be:
Copy and paste the information below into a .REG file using notepad. Save it. Then import the registry file.
Using Regedit, find the PE_Soft and PE_Sys hives under HKEY_LOCAL_MACHINE and unload them.
Unmount the WIM (Don’t forget to /commit)
It’s now modified and you can use OSCDIMG to make your CD image or copy the ISO folder to your bootable USB drive.
Once you have booted into your custom WinPE 3.0 environment you need to start the msiscsi service:
Now run the iSCSI Initiator tool:
You’re all set. You can now use iSCSI just as you can in an actual Windows installation. Since Disk Manager is not in WinPE you can use Diskpart to setup your disks after you’ve connected to them via. iSCSI.