Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting from iSCSI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mounty1
Guru
Guru


Joined: 06 Jul 2006
Posts: 523
Location: Queensland

PostPosted: Wed Sep 04, 2013 8:33 am    Post subject: Booting from iSCSI Reply with quote

Hello, I current boot a diskless workstation with an NFS root and wanted see if iSCSI would be faster. So I consulted http://etherboot.org/wiki/sanboot/gentoo_iscsi#method_2use_an_existingworking_gentoo_system and it all looks pretty straightforward but I can't get it working.

The server ('target') is running OmniOS, an OpenSolaris/Illumos derivative. I think that is working alright because if I follow the instructions for initiating a connection on an already-running Gentoo client ('initiator'), it all works fine.
# /etc/init.d/iscsid start:
# iscsiadm --mode discoverydb --type sendtargets --portal 192.168.1.1 --discover:
192.168.1.1:3260,1 iqn.2010-08.org.illumos:02:568f579d-7249-edb4-e9cd-983c97518870
(others similar, omitted for security)
# ls /dev/sd*:
/dev/sda   /dev/sda1  /dev/sda2  /dev/sda5  /dev/sda6
# iscsiadm --mode node --targetname iqn.2010-08.org.illumos:02:568f579d-7249-edb4-e9cd-983c97518870 -p 192.168.1.1:3260 --login:

Logging in to [iface: iface0, target: iqn.2010-08.org.illumos:02:568f579d-7249-edb4-e9cd-983c97518870, portal: 192.168.1.1,3260]
Login to [iface: iface0, target: iqn.2010-08.org.illumos:02:568f579d-7249-edb4-e9cd-983c97518870, portal: 192.168.1.1,3260] successful.
# ls /dev/sd*:
/dev/sda   /dev/sda1  /dev/sda2  /dev/sda5  /dev/sda6  /dev/sdb  /dev/sdb1
Now the only difference from the instructions referenced above is that the kernel is built with
Code:
 Device Drivers  --->
  SCSI device support  --->
    [[*]] SCSI device support
      <*> SCSI disk support
    [[*]] SCSI low-level drivers  --->
      <*>   iSCSI Initiator over TCP/IP
    SCSI Transports  --->
      {*} iSCSI Transport Attributes
 Cryptographic options  --->
   [[*]] Cryptographic API
     <*> CRC32c CRC algorithm
i.e., iSCSI options built-in, not modules as the article says, because of course this kernel is for iSCSI at boot.

Now I'm using the kernel to boot with NFS root so the networking options are all OK but nevertheless at boot, it doesn't pick up the iSCSI disk so the kernel loads then panics.
cat /boot/grub/menu.lst:
title Gentoo Linux XFCE
root (hd0,0)
kernel /vmlinuz-3.10.9-gentoo ip=192.168.1.58:192.168.1.1:192.168.1.1:255.255.255.0::eth0:none rw root=/dev/nfs nfsroot=192.168.1.1:/gentoo/xfce,nolock,v3,intr,hard,noacl quiet

title Gentoo Linux XFCE iSCSI
root (hd0,0)
kernel /vmlinuz-3.10.9-gentoo ip=192.168.1.58:192.168.1.1:192.168.1.1:255.255.255.0::eth0:none rw root=/dev/sdb1 iscsi_target=iqn.2010-08.org.illumos:02:568f579d-7249-edb4-e9cd-983c97518870 iscsi_address=192.168.1.1 iscsi_initiatorname=iqn.2005-03.org.open-iscsi:74272459ad8f
and that NFS line is the working one so static IP is working correctly.

That stuff is all on a small local boot filesystem on flash storage --- I'm not using TFTP / PXE.

The other deviation from the published instructions is that I'm not using initrd as I don't see why it should be needed or what would go in it.

I've experimented with the boot line, adding real_root=/dev/sdb1, and adding :3260 to the iscsi_address argument.

I stress that the panic occurs when it tries to mount the boot iSCSI disk. I've already prepared the disk (as the presence of /dev/sdb1 above implies) by mounting it from the running system, then copying everything from a snapshot of the NFS root filesystem, but it isn't getting as far as complaining about init not found or anything like that.

So can anyone suggest what might be going wrong ?
_________________
Michael Mounteney
Back to top
View user's profile Send private message
mounty1
Guru
Guru


Joined: 06 Jul 2006
Posts: 523
Location: Queensland

PostPosted: Sun Sep 08, 2013 7:40 pm    Post subject: Can't be done (yet) Reply with quote

The answer is that iSCSI requires certain libraries to be loaded, so an initrd with busybox and other bits is required. Run away.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
Eusaphious
n00b
n00b


Joined: 12 Dec 2006
Posts: 16

PostPosted: Sat Mar 08, 2014 7:34 am    Post subject: Re: Can't be done (yet) Reply with quote

mounty1 wrote:
The answer is that iSCSI requires certain libraries to be loaded, so an initrd with busybox and other bits is required. Run away.


Making it out to be much more difficult then it needs to be. All that is needed is to install 'genkernel' and run the following to generate the initramfs:

genkernel --install --iscsi initramfs

You will find a initramfs now in your /boot directory.
This command works even if you don't use genkernel to create the kernel.

In addition to the kernel options you listed, make sure you select the iscsi_ibft driver as well. Its located at Firmware Drivers -> iSCSI Boot Firmware Table Attributes.
Also, I found that no matter if I compile the iscsi drivers into the kernel or as modules, the initramfs was still needed - I got kernel panic on boot without it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum