You are not logged in.

#1 2010-06-22 08:31:44

Conker
Member
Registered: 2010-06-22
Posts: 4

iSCSI Boot

I've been looking for information/docs on iSCSI Arch booting, although there isn't much. The current setup is using gPXE to boot off an iSCSI target. At the moment it boots GRUB then continues to load the kernel and initrd and gets as far as:

Waiting 10 seconds for device /dev/sda2 ...
Root device '/dev/sda2' doesn't exist. Attempting to create it.
ERROR: Unable to determine major/minor number of root device '/dev/sda2'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
/bin/sh: can't access tty; job control turned off
[ramfs /]# _

Potentialy useful documentation
http://blog.ksplice.com/tag/iscsi/
http://wili.cc/blog/iscsi.html
http://www.open-iscsi.org/docs/README

Setup
Note: For the code block examples remember to replace things like the IP, etc, to the ones for your system

iSCSI Target (Server)
I'm using Arch for the server part as and am using iscsitarget from the AUR for the iscsi drive. You'll want to:

wget http://aur.archlinux.org/packages/iscsitarget-kernel/iscsitarget-kernel.tar.gz
wget http://aur.archlinux.org/packages/iscsitarget-usr/iscsitarget-usr.tar.gz

tar xzvf iscsitarget-kernel.tar.gz
tar xzvf iscsitarget-usr.tar.gz

cd iscsitarget-kernel
makepkg
pacman -U iscsitarget-kernel-...-pkg.tar.gz

cd ../iscsitarget-usr
makepkg
pacman -U iscsitarget-usr-...-pkg.tar.gz

echo "Target iqn.2010-06.ServerName:description" > /etc/iet/ietd.conf
echo "Lun 0 Path=/dev/sdX,Type=blockio" > /etc/iet/ietd.conf

/etc/rc.d/iscsi-target start

Note: /dev/sdX will need an seperate installation of Arch, this is what the initators will boot from.
Note: It is possible to keep the Arch inside a image file instead of using a dedicated hard drive, just change the Path=/home/user/arch.img and Type=fileio

gPXE Usb
For the moment I've got gPXE booting off a usb stick you can get it at http://rom-o-matic.net/ for usb boot get the "USB Keychain disk image (.usb)" which can then "dd" to a usb thumbdrive:

dd if=/home/user/gpxe.usb of=/dev/sdYZ

It should be bootable, but you may have to change the BIOS boot order which will usually either be "Removeable dev." or show up under the hard drives listing as "USB" this of course depends on your BIOS.

Once you get gPXE booting it will automatically try DHCP booting so before that happens you want to press "CTRL + B" which gives you a gPXE> prompt. Now you can get it to boot iSCSI using:

dhcp net0
sanboot iscsi:192.168.1.100::::iqn.2010-06.ServerName:description

So now you are essentially as far as I've gotten and this is my first kinda "howto" I hope I haven't made too many mistakes, and hopefully this helps somebody else get started so we can get Arch booting from iSCSI. Yay!

Last edited by Conker (2010-06-22 16:50:03)

Offline

#2 2010-06-22 08:48:21

Lastebil
Member
From: Suomi
Registered: 2007-01-16
Posts: 35

Re: iSCSI Boot

I'm also interested in this (we discussed this on the irc channel) -

I think we're treading new ground here, but, just checking - has anyone (TU, Developer) done this sort of booting yet?

I'm thinking we'll need a hook into the initcpio to:
1. Initialize the network
2. do the initial udev bits
3. Initialize the iscsi device and attach to the /dev chain
4. mount the root device (on iscsi)
5. do the actual init.

However, suggestions are welcome (:

Offline

#3 2010-06-22 14:20:57

crankyadmin
Member
Registered: 2009-09-27
Posts: 117
Website

Re: iSCSI Boot

It can be done. The trick is to PXE boot and mount the iSCSI from the initrd, I don't think it would take much to setup (I'm going to have a play when I get home from work and post my results)


:: Github :: My AUR :: Coreboot ::

Offline

#4 2010-06-22 20:50:56

Conker
Member
Registered: 2010-06-22
Posts: 4

Re: iSCSI Boot

crankyadmin wrote:

It can be done. The trick is to PXE boot and mount the iSCSI from the initrd, I don't think it would take much to setup (I'm going to have a play when I get home from work and post my results)

Well I've update how far I've gotten and I'm fresh out of ideas, although hehe you make it sound so easy.

Offline

#5 2010-07-26 07:00:15

david.hilton
Member
Registered: 2009-11-19
Posts: 2

Re: iSCSI Boot

I'm also looking at this atm.  (to boot from an opensolaris nas).  I'm pretty new at this (I've never done iscsi, and though it is used at work I'm not an admin).  This link looked pretty useful/informative.

http://iscsi-init.sourceforge.net/HOWTO.html

Offline

#6 2011-04-27 03:15:17

hsuanyeh
Member
From: Newton MA
Registered: 2011-04-27
Posts: 1

Re: iSCSI Boot

I am trying to setup an iSCSI target for Arch Linux and boot it using Virtualbox.  Has anyone tried that with success?

Offline

Board footer

Powered by FluxBB