iPXE discussion forum

Full Version: Unable to use pxelinux's sanboot.c32 or gpxecmd.c32 to boot iscsi target with chap
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I compile latest undionly.kpxe from latest ipxe source. I attempt to boot a iscsi target with chap secret using:

iPXE> dhcp net0
iPXE> set username = user1
iPXE> set password = password
iPXE> sanboot iscsi:192.168.0.1::::iqn.example.com:win7

The machine boot properly from iscsi target.

Next, I try to chain load the ipxe from pxelinux:

LABEL ipxe
kernel undionly.0

and boot the following script via dhcp (using the infinite loop prevention method):

#!ipxe
dhcp net0
set 190:string user1
set 191:string password
set 209:string menu.cfg
chain pxelinux.0

And the following menu.cfg is loaded:

UI menu.c32

LABEL Windows_1
com32 gpxecmd.c32
append sanboot iscsi:192.168.0.1::::iqn.example.com:win7

LABEL Windows_2
com32 sanboot.c32
append iscsi:192.168.0.1::::iqn.example.com:win7

Executing both Windows_1 or Windows_2 doesn't boot the iscsi target and no message was prompt.

Any ideas what could be go wrong?

If I remove the chap secret from iscsi target, the iscsi target works fine both ipxe direct boot or chain load.

My PXELinux is version 4.04.
This is a remarkably complex process you use to sanboot.

You can achieve both the menus and the sanbooting without involving PXELinux at all. You didn't specify if the username/password was going to be supplied via DHCP or if the user should submit it interactively. I'm going to assume you want an interactive login.

If you want that you can just use the login command (http://ipxe.org/cmd/login) to specify username/password and use the normal sanboot command to boot your iSCSI target with CHAP authentication.

If you need menus for more choices you can use the native iPXE menu feature documented at: http://ipxe.org/cmd/menu and with an extensive example in the stickied thread named "Documentation".

Doing a lot of contortions back and forth between iPXE and PXELinux has been known to cause issues.
Reference URL's