iPXE discussion forum

Full Version: winpe hangs with sanhook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to install Windows 7 on diskless workstation with iSCSI.
My boot.ipxe looks like:

set keep-san 1
sanhook --drive 0x80 iscsi:
cpuid --ext 29 && set arch amd64 || set arch x86
kernel wimboot
initrd ${arch}/iso/bootmgr bootmgr
initrd ${arch}/iso/boot/bcd BCD
initrd ${arch}/iso/boot/boot.sdi boot.sdi
initrd ${arch}/winpe.wim boot.wim
During the boot it shows that disk 0x80 is connected, and than winpe hangs. In safe mode (with F8) it proceeds loading modules till disk.sys, and after 2-3 minutes goes black screen. If I change disk number to 0x81, I get error with \Boot\BCD status 0xc000000e.
If I comment out sanhook, winpe boots OK with network functional.
Are you really sure it has hung? Windows PE can take forever to initialize when you have the iBFT set. Have you also paid close attention to the notes about the gateway in this post? http://forum.ipxe.org/showthread.php?tid...49#pid8849 (in post #12 I mention also how I fixed it on my system).

If you have a very slow Ethernet interface on your router, you might actually have something that works, but it just takes forever to load up.

So my suggestion is to add this before the sanhook if you don't need internet access during your WinPE session:
set netX/gateway # your iSCSI target server
The LAN is just configured for this case: SLES 11 is Apache, TFTP and DHCP server and iSCSI target with address Both it and the laptop with disabled SATA controller have 1Gb net interfaces and are connected with 1Gb hub.
Anyway I added netX/gateway to boot.ipxe, but nothing changed. I was waiting 2.5 hours - nothing happened.
The boot process is following:
ipxe starts and hooks the iSCSI target. On SLES box, while winpe.wim is extracting, I can see:
test-iscsi:~/Desktop # cat /proc/net/iet/session
tid:1 name:iqn.2013-03.local.galend:win7
        sid:554270414274624 initiator:iqn.2010-04.org.ipxe:4c4c4544-0050-4710-8037-b3c04f4d5131
                cid:0 ip: state:active hd:none dd:none
And the LED on the hub is green (1Gb connection).
After winpe starts, it creates another iSCSI session:
test-iscsi:~/Desktop # cat /proc/net/iet/session
tid:1 name:iqn.2013-03.local.galend:win7
        sid:600621701333056 initiator:iqn.2010-04.org.ipxe:4c4c4544-0050-4710-8037-b3c04f4d5131
                cid:0 ip: state:active hd:none dd:none
        sid:554270414274624 initiator:iqn.2010-04.org.ipxe:4c4c4544-0050-4710-8037-b3c04f4d5131
                cid:0 ip: state:active hd:none dd:none
Then afer few minutes it goes to black backlit screen, and the LED on the hub is blinking yellow (100Mb or less connection) every 5-7 seconds. And it lasts for 2.5 hours (I just couldn't wait longer) with both iSCSI sessions active on the target.
That seems to indicate that your connection is no longer operating at gigabit speed. That is indeed puzzling. I think you should try to capture a packet trace and see what is going on. You might also want to investigate if WinPE operates at gigabit speed when you boot it without the iSCSI volume hooked. It also seems very odd that you have two sessions running for more than 2.5h. One of them should be iPXE and the other should be WinPE. But once WinPE takes over the iPXE one should timeout, because iPXE is no longer able to respond to it. It could be that your IET is not allowing concurrent access to the same volume (which is generally a good thing, because it avoids corruption of the volume), but for this handover to work, you might actually need it. See if there is some form of session limit specified in IET that you can tweak.
WinPE operates at 1Gb speed if I don't hook the iSCSI volume.
There is no limit on number of sessions on the target, it limits only 1 connection per session. Wth keep-san option the sessions are kept until the target is restarted, so when I restored the windows 7 image on this iSCSI volume, I could boot windows 7 from iSCSI with old sessions being still active.
So it looks like the problem is inside WinPE. Maybe it's Broadcom network adapter and Windows iSCSI, because when I made WinPE image with integrated iSCSI support and booted it (without hooking), I got no network in WinPE.
Yeah, I've heard mentions about other people having problems with WinPE and Broadcom NICs. This post on the mailing-list might be useful: http://permalink.gmane.org/gmane.network...devel/2074
Reference URL's