TOPIC: iSCSI on boot support

iSCSI on boot support 1 year 10 months ago #1

  • e_esprit
  • e_esprit's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 171
  • Thank you received: 9
  • Karma: 1
Hi,

This is not a real request, but rather a feature proposal.

I have added iSCSI support on boot in Openelec.tv for my own use, so i can have a diskless player that boots the system/data directly from my NAS.

Using iSCSI is not really end-user oriented, so I am not sure that a lot of people will be interested in having it in Openelec.tv.

Anyway, I think the "cost" is minimal, here are some facts :
- adding the needed modules + utilities in kernel cost 230Ko (iscsi modules + dhcp config in kernel + iscsistart in initrd) :
* "standard" kernel :
-rw-r--r-- 1 esprit esprit 3779888 11 juin 15:26 OpenELEC-ION.x86_64-devel-20110611-r7201.kernel
* "iscsi-enabled" kernel :
-rw-r--r-- 1 esprit esprit 4014176 15 juin 20:12 OpenELEC-ION.x86_64-devel-20110615-r7201.kernel
- the init script need a patch, in order to call iscsistart (if iscsi has been asked by kernel boot parameters) before mounting the boot/disk devices

I made a package to have iscsistart built by the openelec building system. Then it just changes to the init script in initramfs/sysutils/busybox-initramfs/, and of course a change in the kernel config file to add the needed modules.
So except for the kernel config file, most of the additional code can be optional (ISCSI_ON_BOOT=true/false ?).

If you are interested in adding the package in the standard branch, I'll be happy to help in integrating it.
If not, I totally understand, and will continue to patch the main branch for my own need.

By the way, thanks for the good work, Openlec.tv is just a killing system !

Cheers !
The administrator has disabled public write access.

iSCSI on boot support 1 year 10 months ago #2

Nice, this would be great.

Are you using ion ?
The administrator has disabled public write access.

iSCSI on boot support 1 year 10 months ago #3

  • e_esprit
  • e_esprit's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 171
  • Thank you received: 9
  • Karma: 1
Yes, I am using ION 64bits (Zotac ND-22)

If you are interested, I can make a tarball that will add the iscsi package in the source build code, and replace some files (kernel config file, init script), so that you can apply it to the build code and build your own system.

If you also use a ION 64bits system, I can first give you access to my current KERNEL and SYSTEM so you can give it a try.
The administrator has disabled public write access.

iSCSI on boot support 1 year 9 months ago #4

  • e_esprit
  • e_esprit's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 171
  • Thank you received: 9
  • Karma: 1
Not a great success with that one :(

However, playing today with the openelec-eden branch, I found that NBD has been integrated.
So why not iSCSI ? it's the same concept, and a lot of home NAS devices are starting to purpose it out of the box.

Anyway, if anyone is interested in using iSCSI to boot Openelec from, here are the steps (you will need a little knowledge on iSCSI there) :
1) get the open-iscsi package here : eesprit.free.fr/openelec.tv/openelec-iscsi.tar.gz
(it's based on today openelec-eden branch, so if you have doubts about how it will work with another revision, just extract it in /tmp and do diffs on files. I only made the change for the linux kernels config on the ION/64bits project, if you want to try for another project type, just ask, I'll try to see what I can do)
2) extract the (1) tarball in an openelec source directory
cd /your/path/to/Openelec.tv
tar xfz /tmp/openelec-iscsi.tar.gz (or wherever you have downloaded it to)
3) Build Openelec : PROJECT=ION ARCH=x86_64 make

If you have any problem in this 3 first steps, just tell what your problem is.

Ok, so now, you should have a .system and a .kernel in the target directory... here comes the fun :evil:
4) on your iSCSI target, create a 5GB (or less, or more, as you want) volume, and give access to your "building" device and your target device (the one that will boot Openelec). I can't give a lot of help here, it's really target dependant, and if you are willing to use iSCSI to boot openelec from, you probably already know how to do that.
5) login on the iscsi target from your "building" initiator
6) You should now have a new /dev/sdX : partition it, as you would do for a USB key : create 2 paritions (System + Storage), System should be 200MB or 256MB max, no need for more.
7) format it (ext4)
8) mount it somewhere and install extlinux on the first partition : extlinux -i /mnt/somewhere
9) copy the target/ files on the first partition, as SYSTEM and KERNEL
10) create an extlinux.conf file :
2 options here :
1) you are using iPXE to boot, or a ROM that is able to transmit the iSCSI paramaters using iBFT, just use :
DEFAULT linux
PROMPT 0

LABEL linux
  KERNEL /KERNEL
  APPEND boot=LABEL=System disk=LABEL=Storage iscsi_auto vga=792 quiet
2) you are not using an iBFT capable boot code :
DEFAULT linux
PROMPT 0

LABEL linux
  KERNEL /KERNEL
  APPEND ip=dhcp boot=LABEL=System disk=LABEL=Storage iscsi_initiator=iqn.2010-04.org.ipxe:zbox iscsi_target_name=iqn.2000-01.com.synology:iscsitarget.xbmc iscsi_target_ip=192.168.X.Y iscsi_target_port=3260 iscsi_target_group=1 iscsi_username=yourusername iscsi_password=yourpassword vga=792 quiet
(Of course you have to adapt to fit your needs)

Now configure iPXE to boot from your iSCSI LUN (or whatever you are using to boot on iSCSI), and enjoy !

If some Openelec dev is willing to include it in the standard branch, like for NBD, that would be really nice. It does not make so much change, and is fully compatible with "normal" usage so...

Cheers ! :blush:
Last Edit: 1 year 4 months ago by e_esprit. Reason: mispelling
The administrator has disabled public write access.

iSCSI on boot support 1 year 9 months ago #5

  • e_esprit
  • e_esprit's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 171
  • Thank you received: 9
  • Karma: 1
By the way, if a moderator is OK to move this thread in the "Guides, Tips and Tricks" section, that would be really kind :whistle:
The administrator has disabled public write access.

Re: iSCSI on boot support 1 year 9 months ago #6

  • gilphilbert
  • gilphilbert's Avatar
  • OFFLINE
  • Moderator
  • Posts: 346
  • Thank you received: 40
  • Karma: 13
[moved to Guides, Tips and Tricks]
OpenELEC.tv - the future of XBMC...
The administrator has disabled public write access.

Our Sponsors & Partners

arctic_logo