This tutorial describes a simple three-step process for getting your first iSCSI-booting operating system up and running. The three stages are:
The first stage is to prepare the operating system image for iSCSI boot. This generally involves installing an iSCSI initiator and adjusting a few configuration parameters. Instructions are available for:
The second stage is to transfer the prepared operating system image from the iSCSI boot machine to a remote iSCSI target.
If you do not have an iSCSI NAS box, you probably want to set up the Linux software iSCSI target. You can find prepackaged versions at http://sourceforge.net/project/showfiles.php?group_id=177003; you need to download and install the
There are several possible ways to perform the transfer:
rsync -ax. Note that this method will require you to manually reinstall the bootloader (LILO or grub) after the transfer; if you don't know how to do this then don't use this method.
The easiest way for a first-time user is probably to physically transfer the disk to the iSCSI target and then add this disk to the export list. If you are using the Linux software iSCSI target, then you can do this by editing
/etc/ietd.conf and adding an entry such as
Target iqn.2006-09.com.example.myhost:storage Lun 0 Path=/dev/hdb
(assuming that the hostname of the iSCSI target is
myhost.example.com and the newly attached disk is
/dev/hdb). The target name should follow the format of the example above.
The third stage is to configure the network card for iSCSI boot, and then to attempt booting.
You need a network card boot ROM that supports iSCSI boot. If your NIC vendor does not already supply such a ROM, you can build your own using
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/etherboot login cvs -z3 -d:pserver:email@example.com:/cvsroot/etherboot co -P gpxe cd gpxe/gpxe-0.5/src make bin/rtl8139.rom
which will give you a boot ROM image for a RealTek 8139-based network card. Many other cards are available; if you can't find the one you need then ask on firstname.lastname@example.org for help.
For experimentation, you may prefer to build a “boot ROM on a floppy”, which you can do by changing
This will give you a bootable floppy disk containing the boot ROM code, which may make testing easier. Once you have later verified that everything works, you can burn the code into the ROM.
You need to set up your DHCP server to request iSCSI boot. Edit /etc/dhcpd.conf and change or add the line
filename ""; option root-path "iscsi:192.168.0.1::::iqn.2006-09.com.example.myhost:storage";
192.168.0.1 is the IP address of your iSCSI target, and
iqn.2006-09.com.example.myhost:storage is the target name.
Now boot the iSCSI boot machine using the iSCSI boot ROM (or iSCSI boot floppy, if you are using a floppy disk for experimentation). You should see the usual bootloader screen (LILO, grub or NTLDR, for example) appear, and the operating system will start as normal.
Congratulations! You have successfully booted an operating system from a remote iSCSI disk. If you encounter difficulties, please feel free to ask questions on the etherboot-discuss mailing list at email@example.com. If you have an urgent question, professional support is available on a consultancy basis.