This document explains how to install and boot Linux on an iSCSI target LU using
the opensource
linux-iSCSI initiator.
The example shows how to perform this process for SUSE* Linux Enterprise Server 9-SP3.
If you have SLES 10 installed,
read the iSCSI Boot instructions in SLES 10 RELEASE NOTES.
The Red Hat* Enterprise Linux 4 process can be found here.
![]() |
NOTE: Some newer network device drivers are not included in either SLES9 or RHEL4. To enable these devices, the user will need to get the correct driver and load the driver before discovery is attempted when following the preinstall instructions. |
This is the recommended method for creating the driver disk.
![]() |
NOTES: Configure the initiatorname.iscsi and
iscsi.conf files according to your target configuration. To do so you
should read the README provided by the linux-iscsi source code.
You must at least configure the DiscoveryAddress in the iscsi.conf. If your target supports advanced features such as CHAP, you will need to make sure that the iscsi.conf and initiatorname.iscsi match your target configuration at this point. These files will be used throughout the install and boot process. Alternatively, you may create the driver disk using a different host machine other than SUSE Linux Enterprise Server 9-SP3. You will need to compile the iscsi.ko and iscsid using the 2.6.5-7.244-default kernel. You can learn to do this by reading the README provided with the linux-iscsi source code. |
![]() |
NOTE: You need an Intel® iSCSI Boot capable adapter to connect to your target and boot the OS from the iSCSI Target Disk. |
DiscoveryAddress=<IP of target> InitiatorName=<initiator iqn> netsetup=1
Ctrl-Alt-F4 will display something such as:
"iSCSI target bus 0 target 0 = iqn.XYZ"
"Attached scsi disk ..."
![]() |
NOTE: When partitioning the iSCSI LUs, ensure that your boot partition is not distributed across physical partitions on different iSCSI LUs. The Intel iSCSI Option ROM will only expose one iSCSI LU and if /boot is distributed across multiple LUs it will not be visible during the boot process. |
Example: INITRD_MODULES="... e1000 iscsi".
echo Username=<CHAP username> >> /etc/iscsi.conf
echo Password=<CHAP password> >> /etc/iscsi.conf
NOTE: After this first reboot, YaST may ask you to configure your network devices. Skip this step as it will reset the network interface that the iSCSI traffic is on.
test "$a" = ethX && continue;
immediately after line number 169 where ethX is the ethernet interface used for iSCSI communication.
![]() |
NOTE: After the system has booted, iscsid will be running. The user may want to add something like "kill `pidof iscsid`" to an init script. iscsid is only needed for discovery and can be killed in this way without problems. |
This process has two phases.
![]() |
NOTE: The system used to connect to the iSCSI target during the installation process must not have any local disks installed. It should also not have any USB storage devices attached when the install starts. The intention is to get anaconda (the Red Hat installer) to see no disks in the system and stop. This will allow us to install the initiator and discover the iSCSI LUs. If there is any media installed anaconda will continue and attempt to install to the locally connected device. |
COMMAND | LOCATION | OUTPUT |
rpm -ivh iscsi-initiator-utils-4.0.3.0-3.src.rpm | Red Hat Enterprise Linux 4 U3 Source CD3 | /usr/src/redhat/SPECS/iscsi-initiator-utils.spec |
rpm -ivh kernel-2.6.9-34.EL.src.rpm | Red Hat Enterprise Linux 4 U3 Source CD4 | /usr/src/redhat/SPECS/kernel-2.6.spec |
rpm -ivh kernel-devel-2.6.9-34.EL.i686.rpm | Red Hat Enterprise Linux 4 U3 CD3 | /usr/src/kernels/2.6.9-34.EL-i686/ |
rpm -ivh kernel-smp-devel-2.6.9-34.EL.i686.rpm | Red Hat Enterprise Linux 4 U3 CD3 | /usr/src/kernels/2.6.9-34.EL-smp-i686/ |
rpm -ivh kernel-hugemem-devel-2.6.9-34.EL.i686.rpm | Red Hat Enterprise Linux 4 U3 CD3 | /usr/src/kernels/2.6.9-34.EL-hugemem-i686 |
rpmbuild -bp --target `uname -m` kernel-2.6.spec | /usr/src/redhat/SPECS | /usr/src/redhat/BUILD/kernel-2.6.9/ |
rpmbuild -bp --target `uname -m` iscsi-initiator-utils.spec | /usr/src/redhat/SPECS | /usr/src/redhat/BUILD/iscsi-initiator-utils-4.0.3.0 |
- cp iscsiboot.tar.gz /home
- cd /home
- tar -xvf iscsiboot.tar.gz
/usr/src/redhat/BUILD/iscsi-initiator-utils-4.0.3.0/linux-iscsi-4.0.3.0
-v 2.6.9-34.EL
This process uses dd to write the Driver Update Disk. You may specify the device node with the -t option or the script will prompt you. Keep in mind that you must use the device node and not a mounted partition.
![]() |
NOTE: This assumes you have flashed and configured your iSCSI firmware to connect to your target and iscsi firmware was able to connect to the iscsi target. |
Floppy
mkdir /mnt/floppy
mount /dev/fd0 /mnt/floppy.
USB Floppy Drive
dmesg
Examine the output of dmesg and determine what /dev node is reserved for your USB drive (i.e. /dev/sdX)
mkdir /mnt/usb
mknod /dev/sdX b 8 0
mount /dev/sdX /mnt/usb
- Copy files to a temporary location
mkdir /tmp/iscsi
cp -fr /mnt/usb/* /tmp/iscsi/
umount /mnt/usb
- Run the "preinstall/iscsipreinstall" script from the mount point.
/tmp/iscsi/preinstall/iscsipreinstall
- Type "dmesg" to verify that discovery occurred correctly. It should show that drives were recently discovered.
- Press Ctrl+Alt+F1 and select "Done".
- Continue with the installation.
NOTE: When partitioning the iSCSI LUs, ensure that your boot partition is not distributed across physical partitions on different iSCSI LUs. The Intel iSCSI Option ROM will only expose one iSCSI LU and if /boot is distributed across multiple LUs it will not be visible during the boot process.
/tmp/iscsi/postinstall/iscsipostinstall
- Edit the /mnt/sysimage/etc/init.d/halt and scroll to the bottom.
- Change the line stating HALTARGS="-i -d" to HALTARGS="-d"
- Press Ctl+Alt+F7 and then select "Reboot".
![]() |
NOTES: After the system has booted, iscsid will be
running. The user may want to add something like "kill `pidof iscsid`"
to an init script. iscsid is only needed for discovery and can be killed
in this way without problems. Though rare, during system reboot if kernel panics (while mounting root file system), here are the steps need to be followed:
|