Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Q: undionly.kpxe and sanhook to iSCSI target
2016-12-02, 17:51 (This post was last modified: 2016-12-02 18:12 by Andromeda_x.)
Post: #1
Q: undionly.kpxe and sanhook to iSCSI target
Hello,

I am attempting to gain access to iSCSI target and no success as of this moment and I am confused why it does not "attach" my target.

System configuration:
1. iSCSI target located on Debian 7 machine (moon.coguar.com 192.168.64) where I can access/attach/mount iSCSI locally
(what confirms that it works properly)
(iSCSI target also added in initiators.allow file for test computer)
2. test computer (192.168.0.30) boots from network (DHCP serves undionly.kext)

iSCSI configuration (Debian 7)
Code:
/etc/iet/iet.conf
....
....
Target iqn.2016-12.com.coguar.moon:storage.lun0
        IncomingUser netadmin NetSecret
        OutgoingUser netadmin NetSecret
        Lun 0 Path=/a/lun.img,Type=fileio
        Alias LUN0
        #MaxConnections 6

/etc/iet/initiators.allow
.....
.....
iqn.2016-12.com.coguar.moon:storage.lun0 192.168.0.30

I boot test computer and get into IPXE then I issue following command

Code:
iPXE> login
iPXE> sanhook iscsi:192.168.0.64::::iqn.2016-12.com.coguar.moon:storage.lun0
Could not open SAN device: No such device (http://ipxe.org/2c0d603d)
iPXE> sanhook iscsi:192.168.0.64:::0:iqn.2016-12.com.coguar.moon:storage.lun0
Could not open SAN device: No such device (http://ipxe.org/2c0d603d)

Snooping on the network traffic by tcpdump shows that computers talk to each other and I am not sure how to troubleshoot the communication

Code:
08:17:33.203150 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [S], seq 89673541, win 8192, options [nop,nop,TS val 1067792 ecr 0,mss 1460], length 0
08:17:33.203328 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [S.], seq 3768665367, ack 89673542, win 14480, options [mss 1460,nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.203446 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1067792 ecr 260401078], length 0
08:17:33.203564 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [P.], seq 1:49, ack 1, win 8192, options [nop,nop,TS val 1067792 ecr 260401078], length 48
08:17:33.203683 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [.], ack 49, win 14480, options [nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.203834 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [P.], seq 49:178, ack 1, win 8192, options [nop,nop,TS val 1067792 ecr 260401078], length 129
08:17:33.203896 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [.], ack 178, win 15544, options [nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.204030 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [P.], seq 178:181, ack 1, win 8192, options [nop,nop,TS val 1067792 ecr 260401078], length 3
08:17:33.204095 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [.], ack 181, win 15544, options [nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.204407 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [P.], seq 1:49, ack 181, win 15544, options [nop,nop,TS val 260401078 ecr 1067792], length 48
08:17:33.204431 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [F.], seq 49, ack 181, win 15544, options [nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.204539 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [F.], seq 181, ack 49, win 8192, options [nop,nop,TS val 1067792 ecr 260401078], length 0
08:17:33.204637 IP moon.coguar.com.iscsi-target > 192.168.0.30.23941: Flags [.], ack 182, win 15544, options [nop,nop,TS val 260401078 ecr 1067792], length 0
08:17:33.216016 IP 192.168.0.30.23941 > moon.coguar.com.iscsi-target: Flags [.], ack 50, win 8192, options [nop,nop,TS val 1067793 ecr 260401078], length 0

I try to configure a system to net boot diskless test computer through DHCP into iPXE and then ipxe script kicks in to "sanhook" iSCSI target as 0x80 drive and after that to proceede with Windows installation.

Currently script is disabled and I try to find out how "sanhook" works and I am puzzled why I get the message "Can not open SAN device: No such device (http://ipxe.org/2c0d603b)

Code:
#!ipxe

login
sanhook iscsi:192.168.0.64::::iqn.2016-12.com.coguar.moon:storage.lun3

cpuid --ext 29 && set arch amd64 || set arch x86
kernel wimboot
initrd ${arch}/media/Boot/BCD          BCD
initrd ${arch}/media/Boot/boot.sdi     boot.sdi
initrd ${arch}/media/sources/boot.wim  boot.wim
boot

Where is my mistake? What am I doing wrong?

Andromeda X
Find all posts by this user
Quote this message in a reply
2016-12-02, 19:21
Post: #2
RE: Q: undionly.kpxe and sanhook to iSCSI target
Some suggestions to test and narrow down where the issue lies.

Have you tested without any auth?
does the iscsi server logs tell you anything?
you might want to capture a pcap file, and then disect it with wireshark instead.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-12-03, 08:24
Post: #3
RE: Q: undionly.kpxe and sanhook to iSCSI target
Hi,

can somebody explain tcpdump output

Code:
22:37:26.487649 IP (tos 0x0, ttl 64, id 8792, offset 0, flags [none], proto TCP (6), length 64)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [S], cksum 0xff6e (correct), seq 518423897, win 65532, options [nop,nop,TS val 434086 ecr 0,nop,nop,sackOK,nop,wscale 9,mss 1460], length 0
22:37:26.487693 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [S.], cksum 0x81dd (incorrect -> 0x3d9e), seq 682718093, ack 518423898, win 14480, options [mss 1460,sackOK,TS val 7274121 ecr 434086,nop,wscale 5], length 0
22:37:26.487797 IP (tos 0x0, ttl 64, id 9049, offset 0, flags [none], proto TCP (6), length 52)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [.], cksum 0xa2f8 (correct), seq 1, ack 1, win 512, options [nop,nop,TS val 434086 ecr 7274121], length 0
22:37:26.487827 IP (tos 0x0, ttl 64, id 9305, offset 0, flags [none], proto TCP (6), length 100)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [P.], cksum 0x8531 (correct), seq 1:49, ack 1, win 512, options [nop,nop,TS val 434086 ecr 7274121], length 48
22:37:26.487850 IP (tos 0x0, ttl 64, id 36103, offset 0, flags [DF], proto TCP (6), length 52)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [.], cksum 0x81d5 (incorrect -> 0xa303), seq 1, ack 49, win 453, options [nop,nop,TS val 7274121 ecr 434086], length 0
22:37:26.487996 IP (tos 0x0, ttl 64, id 9562, offset 0, flags [none], proto TCP (6), length 192)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [P.], cksum 0xbd86 (correct), seq 49:189, ack 1, win 512, options [nop,nop,TS val 434086 ecr 7274121], length 140
22:37:26.488012 IP (tos 0x0, ttl 64, id 36104, offset 0, flags [DF], proto TCP (6), length 52)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [.], cksum 0x81d5 (incorrect -> 0xa256), seq 1, ack 189, win 486, options [nop,nop,TS val 7274121 ecr 434086], length 0
22:37:26.488321 IP (tos 0x0, ttl 64, id 36105, offset 0, flags [DF], proto TCP (6), length 100)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [P.], cksum 0x8205 (incorrect -> 0xa398), seq 1:49, ack 189, win 486, options [nop,nop,TS val 7274121 ecr 434086], length 48
22:37:26.488361 IP (tos 0x0, ttl 64, id 36106, offset 0, flags [DF], proto TCP (6), length 52)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [F.], cksum 0x81d5 (incorrect -> 0xa225), seq 49, ack 189, win 486, options [nop,nop,TS val 7274121 ecr 434086], length 0
22:37:26.488599 IP (tos 0x0, ttl 64, id 9820, offset 0, flags [none], proto TCP (6), length 52)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [F.], cksum 0xa20b (correct), seq 189, ack 49, win 512, options [nop,nop,TS val 434086 ecr 7274121], length 0
22:37:26.488623 IP (tos 0x0, ttl 64, id 36107, offset 0, flags [DF], proto TCP (6), length 52)
    moon.coguar.com.iscsi-target > ipxe.coguar.com.25653: Flags [.], cksum 0x81d5 (incorrect -> 0xa224), seq 50, ack 190, win 486, options [nop,nop,TS val 7274121 ecr 434086], length 0
22:37:26.565475 IP (tos 0x0, ttl 64, id 10078, offset 0, flags [none], proto TCP (6), length 52)
    ipxe.coguar.com.25653 > moon.coguar.com.iscsi-target: Flags [.], cksum 0xa208 (correct), seq 190, ack 50, win 512, options [nop,nop,TS val 434088 ecr 7274121], length 0

What is meaning of "(incorrect -> 0xa224)" in tcpdump output? Does it a symptom of a problem I have with ipxe+sanhook?

It is very interesting situation as on other test computer iSCSI target can be attached without any issue (Authentication set to None)...

Code:
root@vega:~/iscsi# iscsiadm -m session
tcp: [38] 192.168.0.64:3260,1 iqn.2016-12.com.coguar.moon:storage.lun0
root@vega:~/iscsi#

Checking tcpdump in wireshark I see next "conversation" beween the computers

iPXE test computer to iSCSI server (iSCSI protocol :: Login Command)
Code:
Key/Value Pairs
    KeyValue: InitiatorName=iqn.2010-10.org.ipxe.dophin.client1
    KeyValue: TargetName=iqn.2016-12.com.coguar.moon:storage.lun0
    KeyValue: SessiionType=Normal
    KeyValue: AuthMethod=None
  Padding: 0000

iSCSI server replies to iPXE test computer (iSCSI protocol:: Login Response)
Code:
Status: Target not found (0x0203)

NOTE: tcpdump -i eth0 host ipxe -w /tmp/tcpdump.cap

Any thought on what is going on between iPXE test computer and iSCSI server? Why do the computers not agree to work together?

Question: I was looking how to add an attachment (tcpdump capture of iSCSI negotiation) to this post and forum system gave me next message

Code:
Please correct the following errors before continuing:

The type of file that you attached is not allowed. Please remove the attachment or choose a different type.

What is proper procedure to add a file of any type?

Andromeda X
Find all posts by this user
Quote this message in a reply
2016-12-03, 23:35
Post: #4
RE: Q: undionly.kpxe and sanhook to iSCSI target
Hello,

ok, it seems that the problem is resolved and Windows 7 was successfully installed in combination of

PXE->udnionly.kpxe->iSCSI->0x80->Windows 7 install -> Windows 7 boot

So far it was found that Windows 7 runs reliably on following hardware

MB: P5GCMX/1333
CPU: E8500
RAM: 2GB

NOTE 1: Stock Windows 7 installation without any alternation of installation media with assistance of wimboot
NOTE 2: Network utilization is between 5%-10% immediately after boot and latter goes to 85%-95% on 100Mbit network

I did an attempt to install:
Windows 10 -- installation gave a warning that it can not finish after "updates" step
Windows 8.1 -- installation rebooted the computer and at following boot gave error (0xc00021a)

NOTE 3: Windows 8.1 -- an attempt to boot without driver signature and safe boot both failed

Andromeda X
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)