NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me

TOPIC: iSCSI on boot support

iSCSI on boot support 6 years 2 months ago #1

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
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 6 years 2 months ago #2

  • thelittlewitch
  • thelittlewitch's Avatar
Nice, this would be great.

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

iSCSI on boot support 6 years 2 months ago #3

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
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 6 years 1 month ago #4

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
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: 5 years 8 months ago by e_esprit. Reason: mispelling
The administrator has disabled public write access.

iSCSI on boot support 6 years 1 month ago #5

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
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 6 years 1 month ago #6

  • gilphilbert
  • gilphilbert's Avatar
  • Offline
  • Expert Boarder
  • Posts: 347
  • Thank you received: 42
  • Karma: 14
[moved to Guides, Tips and Tricks]
OpenELEC.tv - the future of XBMC...
The administrator has disabled public write access.

Re: iSCSI on boot support 6 years 1 month ago #7

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
Thanks !
The administrator has disabled public write access.

Re: iSCSI on boot support 6 years 1 month ago #8

  • thelittlewitch
  • thelittlewitch's Avatar
Great work, will test this soon. I now have a OpenIndiana target and GigE.
The administrator has disabled public write access.

Re: iSCSI on boot support 5 years 4 months ago #9

  • josh4trunks
  • josh4trunks's Avatar
  • Offline
  • Junior Boarder
  • Posts: 72
  • Thank you received: 3
  • Karma: 1
I'm really new to network booting, just reading through the wiki, and a bunch of other documentation. I had a few questions.

Would it be possible to have multiple iscsi drives on my NAS that are then accessed by multiple client(diskless) computers. I understand that iscsi should only be accessed by one computer at a time.

Basically what I want to do is have my FreeNAS box have the iscsi targets (multiple zvols). Have my PfSense Router give out the info about he iscsi targets. And have multiple computers around my house network boot.

I've posted a picture of my PfSense DHCP Server options, sadly there's only one entry for iscsi (which is yet to be documented). Maybe I can make a pxe script that boots different iscsi targets based on client ip? Anyway hope you follow what I am asking, thanks for any help.


Attachments:
Last Edit: 5 years 4 months ago by josh4trunks.
The administrator has disabled public write access.

Re: iSCSI on boot support 5 years 4 months ago #10

  • josh4trunks
  • josh4trunks's Avatar
  • Offline
  • Junior Boarder
  • Posts: 72
  • Thank you received: 3
  • Karma: 1
Well just an update, I figured out how to boot different iscsi target from different diskless clients.

1) create several openelec LUNs
2) compile undonly.kpxe with..
make EMBED='script.ipxe' NO_WERROR=1
3) where the ipxe script looks like..
#!ipxe
:retry_dhcp
dhcp || goto retry_dhcp

goto option_${net0/ip}

:option_192.168.1.5
sanboot iscsi:192.168.1.4::::iqn.2011-03.local.freenas:openelec1 || goto option_192.168.1.5

:option_192.168.1.6
sanboot iscsi:192.168.1.4::::iqn.2011-03.local.freenas:openelec2 || goto option_192.168.1.6
This assumes my 2 openelec boxes are setup as static dhcp client with ips of 192.168.1.5 and 192.168.1.6, and that my targets are openelec1 and openelec2
4)upload undionly.kpxe to the tftp server on pfsense
Last Edit: 5 years 4 months ago by josh4trunks.
The administrator has disabled public write access.

Re: iSCSI on boot support 5 years 4 months ago #11

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
josh4trunks wrote:
I'm really new to network booting, just reading through the wiki, and a bunch of other documentation. I had a few questions.

Would it be possible to have multiple iscsi drives on my NAS that are then accessed by multiple client(diskless) computers. I understand that iscsi should only be accessed by one computer at a time.

Basically what I want to do is have my FreeNAS box have the iscsi targets (multiple zvols). Have my PfSense Router give out the info about he iscsi targets. And have multiple computers around my house network boot.

I've posted a picture of my PfSense DHCP Server options, sadly there's only one entry for iscsi (which is yet to be documented). Maybe I can make a pxe script that boots different iscsi targets based on client ip? Anyway hope you follow what I am asking, thanks for any help.


You'll have to make a "two step" PXE boot from your DHCP.
First step => your Network card will do a DHCP request => your DHCP will respond with an IP + next-server asking your client to get the ipxe boot ROM.
Than the IPXE boot ROM will do a DHCP request again, but with a different user-class option, wich will allow you to configure your DHCP server to respond something else than the first time : you will tell iPXE to get your script file (targeted to your asking device), or you could even specify your iSCSI disk here.

It's explained here :
ipxe.org/howto/dhcpd#pxe_chainloading

The second exemple should help you into using your PFsense web interface to configure iscsi-boot.
Once done, access to your pfsense device, and look what the dhcpd.conf file which should have been generated looks like. That's should help you in getting all this working.
Last Edit: 5 years 4 months ago by e_esprit.
The administrator has disabled public write access.

Re: iSCSI on boot support 5 years 4 months ago #12

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
josh4trunks wrote:
Well just an update, I figured out how to boot different iscsi target from different diskless clients.

1) create several openelec LUNs
2) compile undonly.kpxe with..
make EMBED='script.ipxe' NO_WERROR=1
3) where the ipxe script looks like..
#!ipxe
:retry_dhcp
dhcp || goto retry_dhcp

goto option_${net0/ip}

:option_192.168.1.5
sanboot iscsi:192.168.1.4::::iqn.2011-03.local.freenas:openelec1 || goto option_192.168.1.5

:option_192.168.1.6
sanboot iscsi:192.168.1.4::::iqn.2011-03.local.freenas:openelec2 || goto option_192.168.1.6
This assumes my 2 openelec boxes are setup as static dhcp client with ips of 192.168.1.5 and 192.168.1.6, and that my targets are openelec1 and openelec2
4)upload undionly.kpxe to the tftp server on pfsense
That's an option too :laugh:
The administrator has disabled public write access.

Re: iSCSI on boot support 5 years 1 month ago #13

  • s3frank
  • s3frank's Avatar
Hi community,

I am running Beta5 right now booting of Synoloyg iSCSI target using iPXE the lazy way. Beta6 for some reason doesn't boot past the splashscreen but I'm seeing others reporting this issue as well so I don't think it's iSCSI related.

My question is this:
I have some modules that I want to blacklist (the ath wifi stuff as I don't need it and the blue light on the case is annoying me) from the kernel. When I boot of SSD and modify the .config/modprobe.d/blacklist.conf file it all works great.

But when I boot the same beta5 build of my iSCSI target (both boot and storage on the target) the blacklist.conf file seems to be ignored and the kernel loads the ath modules regardless.

What am I missing? I have more stuff to do in .config so I am wondering if this directory is still being used / valid when using iSCSI boot?

Appreciate any help / pointers!

Thanks,

Frank
The administrator has disabled public write access.

iSCSI on boot support 3 years 11 months ago #14

  • ADN182
  • ADN182's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi,

I have a problem Openelec won't boot.



I Fixe MBR, make my first partition as bootable.
The administrator has disabled public write access.

iSCSI on boot support 3 years 11 months ago #15

  • e_esprit
  • e_esprit's Avatar
  • Offline
  • Senior Boarder
  • Posts: 180
  • Thank you received: 9
  • Karma: 3
It seems like syslinux does not load at all. Is it correctly installed ?
The administrator has disabled public write access.