Re: iSCSI diskless boot/chroot HOWTO

67 views
Skip to first unread message

Nicholas A. Bellinger

unread,
Feb 5, 2006, 7:27:00 PM2/5/06
to Core-iSCSI, Open iSCSI, iet-dev
Greetings Bryan and Karl,

Currently, the core-iscsi-tools /etc/rc.d/init.d/initiator script will
check the runlevel of the system, and forcefully umount w/ fuser the
mounted/active iSCSI LUs located in iscsi_device_maps.

In the diskless shutdown case, we need to make sure that the network
services providing active TCP communication to the iSCSI LU are not
shutdown until all of the other non-root iSCSI LUs have been umounted
and then bring down the rest of the machine. I recall there being some
special considerations along these same lines with nfsroot. Anyone have
any additional info on this?

Also, would anyone be interested in working on a auto-download script
for iscsi-diskless that can download all of the necessary bits to load
core-iSCSI via PXE, and add logic in the startup scripts to
automatically format (with proper checks for existing filesystems) iSCSI
LUs. This should get rid of needing to specify a major/minor for the
newly created LUN being provided by IET.

Thanks again! :)

--
Nicholas A. Bellinger <n...@kernel.org>

On Fri, 2006-01-27 at 10:34 -0800, karl....@gmail.com wrote:
> Hi,
>
> We should maybe put our heads together on this. Not sure if you saw in
> a thread before Christmas, I've had a system booting for a while, just
> got to overcome some issues with the shutdown path before it's a viable
> solution.
>
> Do you have MSN/ICQ/Yahoo/AOL/Skype?
>
> Thanks,
>
> Karl

Nicholas A. Bellinger

unread,
Feb 5, 2006, 7:27:00 PM2/5/06
to Core-iSCSI, Open iSCSI, iet-dev
Greetings Bryan and Karl,

Thanks again! :)

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Iscsitarget-devel mailing list
Iscsitar...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Leonid Grossman

unread,
Feb 6, 2006, 11:53:10 AM2/6/06
to open-...@googlegroups.com
Hi Nick,
A somewhat sideband question - are you aware of any opensource or
proprietary solutions for that could be deployed to boot from a NIC to
iSCSI target?
We have PXE boot ROM for our card but no iSCSI boot ROM, and I'm
investigating if we can easily add one to our portfolio. No immediate
pull from the customer side, but this will definitely come up in the
future as 10GbE moves to LOM.

Cheers, Leonid

matteve...@googlemail.com

unread,
Feb 6, 2006, 12:12:45 PM2/6/06
to open-iscsi
Hi Leonid,

for an open-source solutions that provides booting from iscsi-targets
via pxe
you may want to try openQRM ( http://www.openqrm.org ).

all the best,

Matt

googlegroups

unread,
Feb 7, 2006, 8:48:25 AM2/7/06
to open-...@googlegroups.com
Hi Bryan,

I've been working on booting diskless servers via iSCSI as well, since
last summer. Currently we're running several RHEL3 and RHEL4 servers in
our datacenter based on it.
Maybe (parts of) it could be interesting for you project as well.
The setup is using linux-iscsi instead of core-iscsi because that's
what's included in RHEL, but I'm interested in supporting open-iscsi and
core-iscsi as well.
The documentation is located here:
http://www.cryptoforge.net/iscsi/iscsi-boot-install/ (install docs), and
here http://www.cryptoforge.net/iscsi/iscsi-boot-admin/ (boot server
admin tool) and the RPMs are here:
http://www.cryptoforge.net/iscsi/RPMS/

Regards,

Bastiaan Bakker
E.Novation LifeLine Networks bv



On Thu, 2006-01-26 at 21:30 -0500, Bryan Black wrote:
> Hobbyists; I am very pleased to provide a complete proof of concept
> for iSCSI diskless booting/chroot.
>
> As this is an evolving project, please provide feedback or any
> questions.
>
> Enjoy!
>
> Bryan D. Black
>
> **Also externally attached in html format.
>
>
> iSCSI diskless boot/chroot howto
> bryan.d...@gmail.com < Last updated: Jan 26, 2006 > version
> 0.2
>
>
> Proof of concept includes:
> server: HP Athlon 64bit 3500+ | (running ietd,ISC
> dhcp,pxelinux,tftp-hpa)
> client: DELL Latitude | D610 | (running iSCSI initiator Core)
> kernel ver 2.6.14.5 , both server & client machines
>
> Server Tasks:
> Setup ISC DHCP
> Setup Syslinux (for PXELinux) & TFTP-HPA
> Setup iSCSI Target (ietd enterprise target)
>
> Client Tasks:
> Setup iSCSI initiator (iSCSI initiator Core)
> Boot time
>
>
>
> Setup ISC DHCP
> edit /etc/dhcp/dhcpd.conf
> allow booting;
> allow bootp;
> option routers 192.168.1.6;
> option subnet-mask 255.255.255.0;
> ddns-update-style ad-hoc;
> subnet 192.168.1.0 netmask 255.255.255.0 {
> range 192.168.1.111 192.168.55.115;
> }
> group {
> next-server 192.168.1.6;
> filename "pxelinux.0";
> host laptop-eth0 {
> hardware ethernet 00:00:00:00:00:00; (replace with your mac-address)
> }
> Setup PXELinux
> untar syslinux, make && make install
> untar tftp-hpa, make && make install
> mkdir -p /tftproot/pxelinux.cfg
> cp pxelinux.0 /tftproot
> build a kernel for your client and cp to /tftproot/
> ** make an initrd and cp to /tftproot
> note on above: (i will be releasing a very small (25MB) yet complete
> universal initrd very soon!!)
> edit /tftproot/pxelinux.cfg/default
> TIMEOUT 50
> PROMPT 1
> LABEL iscsiboot
> KERNEL vmlinuzLaptop
> APPEND root=/dev/ram initrd=bblinux25M
> IPAPPEND 1
> LABEL disk
> LOCALBOOT 0
> Start tftpd: /sbin/in.tftpd -l -v -s /tftproot
>
>
> Setup iSCSI Target
> download ietd (svn export svn://svn.berlios.de/iscsitarget/trunk)
> cd trunk && make KERNELSRC=/usr/src/linux && make
> KERNELSRC=/usr/src/linux install
> make some test disk. ie: dd if=/dev/zero of=/iscsi-diska bs=4096k
> count=1024
> configure your new LUN in /etc/ietd.conf
> Target laptop:diska
> Lun 0 Path=/iscsi-diska,Type=fileio
> Alias dell
> DataPDUInOrder Yes
> DataSequenceInOrder Yes
> start ietd
>
> *Your server/target should be ready, provided ietd,dhcp,in.tftpd is
> running
>
>
> Setup iSCSI initiator Core
> (client side installation notes)
>
>
> download core-iscsi-tools (pub/linux/utils/storage/iscsi/)
> untar core-iscsi, make initiator KERNEL_DIR=/usr/src/linux && make
> install
> untar core-iscsi-tools, make install
> iSCSI core stack is then loadable via iscsi_initiator_mod.ko,
>
> core tools rely upon /etc/sysconfig/initiator
>
> CHANNEL="0 2 eth0 192.168.55.6 3260 0"
> and /etc/sysconfig/iscsi_device_maps
> DEVICE="0 0 1 diska"
> Boot time
> Change bios on client to pxeboot before HD
> at the pxelinux prompt, type iscsiboot (referring to label in
> pxelinux.cfg/default)
>
> after successfully booting, do something like this:
>
> /bin/mount / -o rw,remount
> /bin/mount -t proc none /proc
> /bin/mount -o sysfs /sys
> /sbin/ifconfig eth0 192.168.1.92 255.255.255.0
>
> cd /dev && /bin/mknod sdb1 b 8 17
> NAME=$(/sbin/initiator-iname)
>
> echo "InitiatorName=$NAME" > /etc/initiatorname.iscsi
> /etc/rc.d/init.d/initiator start
> /bin/fdisk /dev/sdb # (create partition)
> /bin/mke2fs /dev/sdb1
> /bin/mount /dev/sdb1 /laptop:diska
>
> cp -dpRav /bin /sbin /dev /etc /var /lib /usr /tmp /laptop:diska
> cd /laptop:diska && mkdir proc && mkdir sys
> /bin/chroot /laptop:diska /bin/bash
>
>
>
>
>
>

Leonid Grossman

unread,
Feb 8, 2006, 1:30:51 PM2/8/06
to open-...@googlegroups.com
Thanks Matt!
I'll have a look.

Best, Leonid

> -----Original Message-----
> From: open-...@googlegroups.com
> [mailto:open-...@googlegroups.com] On Behalf Of
> matteve...@googlemail.com
> Sent: Monday, February 06, 2006 9:13 AM
> To: open-iscsi
> Subject: Re: iSCSI diskless boot/chroot HOWTO
>
>

Steve Marfisi

unread,
Feb 8, 2006, 1:34:47 PM2/8/06
to open-iscsi
Hi Leonid,

emBoot offers a proprietary solution for boot from a NIC to iSCSI
target. It can do this with PXE boot ROM or as a custom optionROM on
NIC or embedded in BIOS, supporting diskless boot of Windows OS or
RHEL.

Cheers,
Steve Marfisi

Ming Zhang

unread,
Feb 8, 2006, 1:44:38 PM2/8/06
to open-...@googlegroups.com
so this one can do windows. interesting.

thx for the info,

ming

Alex K

unread,
Feb 8, 2006, 2:00:41 PM2/8/06
to open-...@googlegroups.com
Sorry to jump in, this discussion is also what I was looking for. I
just called emBoot and they said their emBoot server can only run on
Windows :( . Also licensing costs are 500 dollars for a 5 pack. Do you
know of any similar solutions that can run on Linux and are sub 200
dollars to boot 2 machines? When it gets too expensive it defeats the
purpose of getting a real iSCSI controller.
Reply all
Reply to author
Forward
0 new messages