====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
iscsiboot [2006/09/18 04:58]
mcb30
iscsiboot [2006/12/11 06:47] (current)
mcb30
Line 6: Line 6:
   * [[#​Transferring the operating system image to an iSCSI target]]   * [[#​Transferring the operating system image to an iSCSI target]]
   * [[#Booting the operating system from the iSCSI target]]   * [[#Booting the operating system from the iSCSI target]]
 +
 +{{ iscsiboot/​fc5-iscsi.png?​360x200|Fedora Core 5 booting via iSCSI}}
  
 ===== Preparing the operating system image ===== ===== Preparing the operating system image =====
  
-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 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:
  
-  * [[#Fedora Core 5]]+  * [[iscsibootprepfc5|Fedora Core 5]] 
 +  * [[iscsibootprepw2k3|Windows Server 2003]]
  
-==== Fedora Core 5 ====+===== Transferring the operating system image to an iSCSI target =====
  
-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.+The second stage is to transfer the prepared operating system image from the iSCSI boot machine ​to a remote iSCSI target.
  
-Start by installing ​the kernel-devel ​and dkms packages:+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 ''​iscsitarget''​ and ''​dkms-iscsi_trgt''​ RPMs.
  
-  yum install kernel-devel +There are several possible ways to perform the transfer:
-  yum install dkms+
  
-The kernel-devel package must match the version of your currently running kernel, which you can check using+  * Physically move the disk containing the prepared operating system image into the iSCSI  target. 
 +  * Copy the disk image containing the prepared operating system image to a file on the iSCSI target using ''​dd''​ and ''​netcat''​. 
 +  * Create an empty filesystem on the iSCSI target and copy the contents across using ''​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.
  
-  rpm -q kernel-devel +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
-  uname -r+
  
-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+  Target iqn.2006-09.com.example.myhost:storage 
 +    Lun 0 Path=/dev/hdb
  
-Download and install ​(using ''​rpm -Uvh''​) ​the ''​dkms-ibft''​, ''​dkms-iscsi_sfnet'',​ ''​ibft'',​ ''​linux-iscsi'', ​and ''​mkinitrd-iscsi'' ​RPMs.+(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.
  
-If all has gone well, you should now be able to test loading ​the iSCSI initiator and iBFT kernel modules using+===== Booting the operating system from the iSCSI target =====
  
-  modprobe iscsi_sfnet +The third stage is to configure the network card for iSCSI boot, and then to attempt booting.
-  modprobe ibft+
  
-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+You need network ​card boot ROM that supports iSCSI boot.  ​If your NIC vendor does not already supply such a ROMyou can build your own using
  
-  ​DEVICETYPE=boot+  ​cvs -d:​pserver:​anonymous@etherboot.cvs.sourceforge.net:/​cvsroot/​etherboot login  
 +  cvs -z3 -d:​pserver:​anonymous@etherboot.cvs.sourceforge.net:/​cvsroot/​etherboot co -P gpxe 
 +  cd gpxe/​gpxe-0.5/​src 
 +  make bin/​rtl8139.rom
  
-Lastly, ​you need to rebuild ​the initrd to include the iSCSI kernel modules, using+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 <​etherboot-discuss@lists.sourceforge.net>​ for help.
  
-  /​sbin/​mkinitrd -f --force-iscsi /boot/​initrd-`uname -r`.img `uname -r`+For experimentation,​ you may prefer to build a "boot ROM on a floppy",​ which you can do by changing ''​.rom''​ to ''​.dsk'',​ e.g.
  
-You can now proceed to +  make bin/​rtl8139.dsk
  
-===== Transferring ​the operating system image to an iSCSI target =====+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.
  
-===== Booting ​the operating system from the iSCSI target ​=====+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";​ 
 + 
 +where ''​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 <​etherboot-discuss@lists.sourceforge.net>​. ​ If you have an urgent question, [[consultancy|professional support]] is available on a consultancy basis.
  

QR Code
QR Code iscsiboot (generated for current page)