[ipxe-devel] help pushing iscsi targets with DHCP

Robin Smidsrød robin at smidsrod.no
Thu Jul 25 11:17:59 UTC 2013

On 25.07.2013 04:02, Gruher, Joseph R wrote:
> I have DHCP services and iSCSI targets running on a CentOS 6.4
> installation.  So far so good.  I would like to set up my clients to
> receive iSCSI target information via DHCP so I don’t have to configure
> them all manually. 

That is a fairly common request. Be aware, though, that unless all your
machines have identical hardware, you'll need to install a specific
image for each type of hardware configuration. This has nothing to do
with iSCSI, however, just normal Windows behavior.

> This is touched on here:
> http://etherboot.org/wiki/sanboot/iscsi_boot

That article only talks about how to "connect" your iSCSI target to your
client and boot it. But if you don't already have an OS on that iSCSI
volume it will just refuse to boot.

> The part I’m not following is this seems to specify a single iSCSI
> target that is going to be passed to every client.  I would like each
> client to receive a unique target, for example, 10.0.01 gets target01,
> and gets target02, and so on.  Each client needs its own target
> for boot, unless I’m missing something.

I usually use the hostname, MAC, uuid or some other uniquely identifying
variable to specify in an iPXE script which target is assigned to which
client. And yes, you do need one target for each client (at least if
you're running Windows on them, or any common non-cluster OS).

> Is this possible and could anyone point me to some guidance on how to
> implement it?

The installation can be done fairly straight-forward using wimboot +
sanhook. You can see the script part I'm using here:

Once your OS is installed, booting it is just a matter of using a script
like this: https://gist.github.com/robinsmidsrod/2234639#file-menu-ipxe-L103

As you can see, that script does a lot of other things as well, but you
only need these two pieces to netboot Windows.

If you want a bit more information on the installation part, read also
this wiki article: http://ipxe.org/howto/winpe

-- Robin

More information about the ipxe-devel mailing list