Preparing Fedora Core 5 for iSCSI boot

These instructions assume that you have an installation of Fedora Core 5 on a local hard disk. We will make this installation iSCSI-boot-capable, then copy it to a remote iSCSI target and boot from it.

Start by installing the gcc, kernel-devel, sysfsutils, and dkms packages:

yum install gcc
yum install kernel-devel-`uname -r`
yum install sysfsutils
yum install dkms

You will need to install the iSCSI initiator, the iSCSI Boot Firmware Table utilities, and the iSCSI-capable mkinitrd, which you can find at http://sourceforge.net/project/showfiles.php?group_id=177003&package_id=203976&release_id=447506. Download and install (using rpm -Uvh) the dkms-ibft, dkms-iscsi_sfnet, ibft, linux-iscsi, and mkinitrd-iscsi RPMs.

If all has gone well, you should now be able to test loading the iSCSI initiator kernel module using

modprobe iscsi_sfnet

You need to mark the network device that you will be using for boot. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 (assuming that eth0 is your boot network device), and append the line

DEVICETYPE=boot

If you want the hostname to be assigned via DHCP when booting from iSCSI, you must edit /etc/sysconfig/network and delete the line beginning HOSTNAME=.

Lastly, you need to rebuild the initrd to include the iSCSI kernel modules, using

/sbin/mkinitrd -f --force-iscsi /boot/initrd-`uname -r`.img `uname -r`

If you use LILO as your bootloader (rather than grub), then you will need to run lilo after this step.

Reboot and check that the system comes up without difficulties. You will see an error message saying

insmod: error inserting '/lib/ibft.ko': -1 No such device

during the boot process; this is harmless and simply indicates that the system is not actually booting from an iSCSI disk. You will also find that your boot network interface has not been configured with an IP address; again, this is expected at this stage.

You can now proceed to Transferring the operating system image to an iSCSI target.