Discussion:
[ipxe-devel] HTTP ISO and Sanhook
Armin Ranjbar
2017-12-09 09:30:18 UTC
Permalink
Hello And thanks for IPXE,

goal is to attach SAN device and boot windows iso images. (using wimpe is
not possible due to architectural limitations of the project)

this is my script:
#!ipxe
dhcp
echo "Adding SCSI"
set username behrooz
set password behpass

set keep-san 1
set initiator-iqn iqn.1993-08.org.debian:01:a87a0bc571c
sanboot iscsi:10.10.0.111::::iqn.2003-01.org.linux-iscsi.vdi.x8664:sn.e5d7a4882dbf
--keep
sanboot --drive 0x81 --no-describe http://10.10.0.235/win7.iso


now problem is, windows boot manager starts and returns error 0xc0000225 (
https://neosmart.net/wiki/0xc0000225/)


Thanks :)
---
Armin ranjbar
Shao Miller
2017-12-09 16:18:17 UTC
Permalink
Which Windows ISO are you trying to boot?

Also: my memory is rusty, but I'm not sure how you're getting past your
first 'sanboot' command.  If it boots that SAN, it will never reach the
second 'sanboot' command.  If it doesn't boot that SAN, I would expect
it to cause your iPXE script to terminate, meaning it still wouldn't
reach the second 'sanboot' command.  Perhaps your SAN is not currently
empty and you are seeing the result of booting it and not the ISO. 
Trying erasing your SAN with DD, perhaps.

--
Shao Miller
Synthetel Corporation
W: https://www.synthetel.com
Armin Ranjbar
2017-12-09 22:49:54 UTC
Permalink
Thanks for the reply, I was testing with sanhook and tried sanbook - - keep
just to experiment, it was my understanding that these two are the same.

Happens both with windows 7 and 10.

Lun image is newly created and empty.
Post by Shao Miller
Which Windows ISO are you trying to boot?
Also: my memory is rusty, but I'm not sure how you're getting past your
first 'sanboot' command. If it boots that SAN, it will never reach the
second 'sanboot' command. If it doesn't boot that SAN, I would expect it
to cause your iPXE script to terminate, meaning it still wouldn't reach the
second 'sanboot' command. Perhaps your SAN is not currently empty and you
are seeing the result of booting it and not the ISO. Trying erasing your
SAN with DD, perhaps.
--
Shao Miller
Synthetel Corporation
W: https://www.synthetel.com
_______________________________________________
ipxe-devel mailing list
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
Armin Ranjbar
2017-12-13 13:08:22 UTC
Permalink
Regarding this issue, i have few updates i like to share:

this is the the script:
#!ipxe
dhcp
set username behrooz
set password behpass
set reverse-username behrooz
set reverse-password behpass
set initiator-iqn iqn.1993-08.org.debian:01:a87a0bc571c
set gateway 0.0.0.0
set keep-san 1

echo "SAN"
sanhook iscsi:10.10.0.111:
:::iqn.2003-01.org.linux-iscsi.vdi.x8664:sn.e5d7a4882dbf
echo "ISO"
sanboot --drive 0xe0 --no-describe http://10.10.0.235/Win7.iso

and this is result of debug:
iPXE 1.0.0+ (b5e0b) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT
Configuring (net0 52:54:00:53:b7:d8)...... ok
http://10.10.0.235/script... ok
Configuring (net0 52:54:00:53:b7:d8)...... ok
"SAN"
iSCSI 0x21ef4 initiator iqn.1993-08.org.debian:01:a87a0bc571c
iSCSI 0x21ef4 target 10.10.0.111
iqn.2003-01.org.linux-iscsi.vdi.x8664:sn.e5d7a4882dbf
iSCSI 0x21ef4 entering security negotiation
SCSI 0x22054 created for LUN 0000-0000-0000-0000
iSCSI 0x21ef4 handling AuthMethod=CHAP
iSCSI 0x21ef4 initiating CHAP authentication
iSCSI 0x21ef4 ignoring TargetAlias=LIO Target
iSCSI 0x21ef4 ignoring TargetPortalGroupTag=1
iSCSI 0x21ef4 entering security negotiation
iSCSI 0x21ef4 handling CHAP_A=5
iSCSI 0x21ef4 handling CHAP_I=1
iSCSI 0x21ef4 handling CHAP_C=0x11d05e679cc0fd623e7d515b59fd6e66
iSCSI 0x21ef4 sending CHAP response
iSCSI 0x21ef4 entering security negotiation
iSCSI 0x21ef4 handling CHAP_N=behrooz
iSCSI 0x21ef4 handling CHAP_R=0x1a8a1debb5060698914604606b0dd45e
iSCSI 0x21ef4 entering operational negotiation
iSCSI 0x21ef4 ignoring HeaderDigest=None
iSCSI 0x21ef4 ignoring DataDigest=None
iSCSI 0x21ef4 ignoring MaxConnections=1
iSCSI 0x21ef4 ignoring MaxRecvDataSegmentLength=262144
iSCSI 0x21ef4 ignoring MaxBurstLength=262144
iSCSI 0x21ef4 ignoring FirstBurstLength=65536
iSCSI 0x21ef4 ignoring DefaultTime2Wait=2
iSCSI 0x21ef4 ignoring DefaultTime2Retain=0
iSCSI 0x21ef4 ignoring MaxOutstandingR2T=1
iSCSI 0x21ef4 ignoring ErrorRecoveryLevel=0
iSCSI 0x21ef4 entering full feature phase
SCSI 0x22054 waiting for unit to become ready
SCSI 0x22054 unit is ready
INT13 drive 80 has signature 00000000
INT13 drive 80 (naturally 80) registered with C/H/S geometry 1024/255/63
INT13 drive 80 added to drive count: 1 HDDs, 0 FDDs
Registered SAN device 0x80
INT13 installed iBFT:
99341a60 : 69 42 46 54 84 02 00 00-01 86 46 45 4e 53 59 53 :
iBFT......FENSYS
99341a70 : 69 50 58 45 00 00 00 00-00 00 00 00 00 00 00 00 :
iPXE............
99341a80 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341a90 : 01 01 12 00 00 00 00 00-50 00 a0 00 80 01 00 00 :
........P.......
99341aa0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341ab0 : 02 01 4a 00 00 03 00 00-00 00 00 00 00 00 00 00 :
..J.............
99341ac0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341ad0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341ae0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341af0 : 00 00 00 00 00 00 25 00-00 02 00 00 00 00 00 00 :
......%.........
99341b00 : 03 01 66 00 00 03 00 00-00 00 00 00 00 00 00 00 :
..f.............
99341b10 : ff ff 0a 0a 00 da 14 03-00 00 00 00 00 00 00 00 :
................
99341b20 : 00 00 ff ff 0a 0a 01 01-00 00 00 00 00 00 00 00 :
................
99341b30 : 00 00 ff ff 0a 0a 01 01-00 00 00 00 00 00 00 00 :
................
99341b40 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341b50 : 00 00 ff ff 0a 0a 01 01-00 00 52 54 00 53 b7 d8 :
..........RT.S..
99341b60 : 18 00 07 00 26 02 00 00-00 00 00 00 00 00 00 00 :
....&...........
99341b70 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341b80 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341b90 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341ba0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341bb0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341bc0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341bd0 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341be0 : 04 01 36 00 00 03 00 00-00 00 00 00 00 00 00 00 :
..6.............
99341bf0 : ff ff 0a 0a 00 6f bc 0c-00 00 00 00 00 00 00 00 :
.....o..........
99341c00 : 02 00 35 00 2e 02 07 00-64 02 07 00 6c 02 07 00 :
..5.....d...l...
99341c10 : 74 02 07 00 7c 02 00 00-00 00 00 00 00 00 00 00 :
t...|...........
99341c20 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341c30 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341c40 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341c50 : 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 :
................
99341c60 : 69 71 6e 2e 31 39 39 33-2d 30 38 2e 6f 72 67 2e : iqn.1993-08.org
.
99341c70 : 64 65 62 69 61 6e 3a 30-31 3a 61 38 37 61 30 62 :
debian:01:a87a0b
99341c80 : 63 35 37 31 63 00 64 69-61 6e 6f 6d 69 00 69 71 :
c571c.dianomi.iq
99341c90 : 6e 2e 32 30 30 33 2d 30-31 2e 6f 72 67 2e 6c 69 :
n.2003-01.org.li
99341ca0 : 6e 75 78 2d 69 73 63 73-69 2e 76 64 69 2e 78 38 :
nux-iscsi.vdi.x8
99341cb0 : 36 36 34 3a 73 6e 2e 65-35 64 37 61 34 38 38 32 :
664:sn.e5d7a4882
99341cc0 : 64 62 66 00 62 65 68 72-6f 6f 7a 00 62 65 68 70 :
dbf.behrooz.behp
99341cd0 : 61 73 73 00 62 65 68 72-6f 6f 7a 00 62 65 68 70 :
ass.behrooz.behp
99341ce0 : 61 73 73 00 : ass.

"ISO"
INT13 drive e0 has an El Torito boot catalog at LBA 00000016
INT13 drive e0 (naturally 81) registered with C/H/S geometry 0/0/0
INT13 drive e0 added to drive count: 97 HDDs, 0 FDDs
Registered SAN device 0xe0
Booting from SAN device 0xe0

INT 13 drive e0 invalid blocksize (2048) for non-extended read/write
INT13,02 (e0) failed with status 01
INT13 drive e0 could not read MBR (status 0101)
INT13 drive e0 El Torito boot image at LBA 000002de (count 8)
INT13 drive e0 El Torito boot image loads at 07c0:0000
INT13 drive 80 cannot identify hardware device
INT13 drive 80 could not provide device path information: No such device (
http://ipxe.org/2c85203b)
INT 13 drive 80 described using extended parameters:
30040000 : 1a 00 01 00 00 04 00 00-ff 00 00 00 3f 00 00 00 :
............?...
30040010 : 00 00 80 0c 00 00 00 00-00 02 ff ff ff ff :
..............

I think the issue here is the address of CDrom device, odd thing is it
works perfectly fine without the first sanhook to iscsi line, tried 0x81
and 0xa0 as well.



---
Armin ranjbar
Post by Armin Ranjbar
Hello And thanks for IPXE,
goal is to attach SAN device and boot windows iso images. (using wimpe is
not possible due to architectural limitations of the project)
#!ipxe
dhcp
echo "Adding SCSI"
set username behrooz
set password behpass
set keep-san 1
set initiator-iqn iqn.1993-08.org.debian:01:a87a0bc571c
sanboot iscsi:10.10.0.111::::iqn.2003-01.org.linux-iscsi.vdi.x8664:sn.e5d7a4882dbf
--keep
sanboot --drive 0x81 --no-describe http://10.10.0.235/win7.iso
now problem is, windows boot manager starts and returns error 0xc0000225 (
https://neosmart.net/wiki/0xc0000225/)
Thanks :)
---
Armin ranjbar
Loading...