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
sanboot:debian_lenny_iscsi [2009/11/23 17:00]
garlopf
sanboot:debian_lenny_iscsi [2009/11/23 17:33] (current)
garlopf
Line 38: Line 38:
  
 While this simple distinction might seem innocent enough, it really isn't. In many cases it is impracticalt to create a new initrd or root image to change the iscsi parameters. Luckily, for most people there is a more elegant way to get the parameters. The latest lenny kernel (as of 4. November 2009) has an [[iBFT]] function compiled in that makes fetching the iSCSI parameters from [[iBFT]] really easy. From your initrd script, simply traverse the directory ''/​sys/​firmware/​ibft''​ The files in there contain all the ibft information you could ever want. While this simple distinction might seem innocent enough, it really isn't. In many cases it is impracticalt to create a new initrd or root image to change the iscsi parameters. Luckily, for most people there is a more elegant way to get the parameters. The latest lenny kernel (as of 4. November 2009) has an [[iBFT]] function compiled in that makes fetching the iSCSI parameters from [[iBFT]] really easy. From your initrd script, simply traverse the directory ''/​sys/​firmware/​ibft''​ The files in there contain all the ibft information you could ever want.
 +
 +**FIXME I didn't follow this route, but if you do, please put the initramfs script you created here. You can get access to this wiki by asking in the #etherboot IRC channel at irc.freenode.org. Se below for the route I took, and consequently the script i made instead**
 +
 +**UPDATE I found a patch that probably solves this!**
 +This patch might help: http://​bugs.debian.org/​cgi-bin/​bugreport.cgi?​bug=514924#​4
  
 ==== Extras: XEN + iSCSI + Lenny + iBFT ==== ==== Extras: XEN + iSCSI + Lenny + iBFT ====
Line 45: Line 50:
 ==== Solutions to XEN + iSCSI + Lenny + iBFT ==== ==== Solutions to XEN + iSCSI + Lenny + iBFT ====
 There are 3 solutions to the problem of aquiering iSCSI data from the iBFT with a lenny XEN kernel in initrd: There are 3 solutions to the problem of aquiering iSCSI data from the iBFT with a lenny XEN kernel in initrd:
-  * Patch the kernel or use an alternate ​kernel ​to fix the iBFT + XEN problem. This patch looks promising: http://​patchwork.kernel.org/​patch/​50838/​ . Documentation for how to proceed with that is available here: http://​wiki.debian.org/​DebianKernelCustomCompilation and you might also want to read this: http://​packages.debian.org/​lenny/​kernel-package and this: http://​www.debian.org/​doc/​FAQ/​ch-kernel.en.html +  ​* Fall back to the default behaviour in Lenny, namely to read the settings from configurations in ''/​etc/''​ and/or settings passed as kernel parameters. 
-  * Use an utility that gets hold of the iBFT data without depending on the kernel sysfs directory ''/​sys/​firmware/​ibft''​. ​One way that has been tested and that works is to do that is to fetch an older version of the Open-iSCSI sourcecode from here: http://​www.open-iscsi.org/​bits/ ​and compiling the old fwparam_ibft tool that is mentioned in the etch howto. +  ​* Patch the kernel or use an alternate ​kernle (newer than 2.6.32 or patched) ​to fix the iBFT + XEN problem. This patch looks promising: http://​patchwork.kernel.org/​patch/​50838/​ . Documentation for how to proceed with that is available here: http://​wiki.debian.org/​DebianKernelCustomCompilation and you might also want to read this: http://​packages.debian.org/​lenny/​kernel-package and this: http://​www.debian.org/​doc/​FAQ/​ch-kernel.en.html 
- +  * My favourite: ​Use an utility that gets hold of the iBFT data without depending on the kernel sysfs directory ''/​sys/​firmware/​ibft''​. ​I did this by fetching ​an older version of the Open-iSCSI sourcecode from here: http://​www.open-iscsi.org/​bits/​. I have confirmed that the version mentioned in the Etch howto works flawlessly: http://​www.open-iscsi.org/​bits/​open-iscsi-2.0-865.13.tar.gz. I used the Etch howto  as a reference when building. You only need to compile the tool called ''​fwparam_ibft''​ as the rest is allready installed in Lenny. This tool gets its iBFT data directly from memory without asking the kernel at all. After compiling the ''​fwparam_ibft'' ​tool and copying it to ''/​usr/​sbin''​, make sure to creating these two initramfs ​hook script which will be executed ​automatically to include the fwparam_ibft binary in the ramdisk image when initramfs ​is updated, and to put it to good use at boot time respectively.
-I have confirmed that the version mentioned in the Etch howto works flawlessly: http://​www.open-iscsi.org/​bits/​open-iscsi-2.0-865.13.tar.gz. This tool gets its iBFT data directly from memory without asking the kernel at all. After compiling the fwparam_ibft tool, make sure its included in the initramfs by creating these hook script which will automatically ​be executed when you rebuild your initramfs, and at boot time respectively.+
 === /​etc/​initramfs-tools/​hooks/​iscsi_tcp === === /​etc/​initramfs-tools/​hooks/​iscsi_tcp ===
 <code bash> <code bash>
Line 126: Line 130:
 </​code>​ </​code>​
 **Important:​ remember to ''​chmod +x''​ both these scripts so that the are executable before updating your initrd** **Important:​ remember to ''​chmod +x''​ both these scripts so that the are executable before updating your initrd**
-  * Fall back to the default behaviour in Lenny, ​namely to read the settings from configurations ​in ''/​etc/''​ and/or settings passed ​as kernel parameters.+ 
 +==== Conclusion ==== 
 + 
 +Configuring boot over iSCSI work in Debian Lenny can potentially be much easier than it was in Etch because of the built-in support for iSCSI boot made by Debian devs in Lenny. If you only have a few servers that you need to boot over iSCSI then using this metod is simple to set up and probably works great. 
 + 
 +However if you have a setup with many computers (cluster) or need a more elegant way to manage your boot parameters for another reason then you will need to modify ​the default behaviour in Lenny, ​and this requires about half the amount of fiddeling required with Debian Etch. 
 + 
 +However if you decide to boot XEN nodes like I showed ​in this example you need to fiddle just as much if not more than the Etch howto described :)
  

QR Code
QR Code sanboot:debian_lenny_iscsi (generated for current page)