verification done for bionic/hw-detect.

disk-detect found the iscsi target/lun configured in ibft.

bionic currently needed the workaround to download/install
the iscsi_ibft.ko module, because the d-i changes are not
yet in (update to kernel version that includes it in scsi-modules.udeb).

$ wget http://boot.ipxe.org/ipxe.lkrn
$ wget 
http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/20101020ubuntu543.7/images/netboot/ubuntu-installer/amd64/{linux,initrd.gz}

$ python3 -m http.server &

$ qemu-system-x86_64 \
      -nodefaults \
      -enable-kvm \
      -smp 2 -m 4096 \
      -serial stdio \
      -vga virtio \
      -display vnc=0.0.0.0:1 \
      -netdev bridge,id=bridge-world,br=virbr0 \
      -netdev bridge,id=bridge-iscsi,br=virbr-iscsi \
      -device 
virtio-net-pci,netdev=bridge-world,id=nic-world,mac=52:54:00:00:00:01 \
      -device 
virtio-net-pci,netdev=bridge-iscsi,id=nic-iscsi,mac=52:54:00:00:00:02 \
      -kernel ipxe.lkrn


workstation $ vncviewer buneary.segmaas.1ss:1

    <ctrl-b>

    iPXE>

    iPXE> ifopen net1
    iPXE> set net1/ip 10.0.0.2
    iPXE> set net1/netmask 255.255.255.0

    iPXE> sanhook iscsi:10.0.0.1:::1:iqn.2019-06.com.example:target1
    Registered SAN device 0x80

    iPXE> ifopen net0
    iPXE> kernel http://192.168.122.1:8000/linux initrd=initrd.gz 
apt-setup/proposed=true disk-detect/ibft/enable=true --- console=ttyS0
    iPXE> initrd http://192.168.122.1:8000/initrd.gz
    iPXE> boot 

...

~ # ls /lib/modules/4.15.0-45-generic/kernel/drivers/firmware/iscsi_ibft.ko
ls: /lib/modules/4.15.0-45-generic/kernel/drivers/firmware/iscsi_ibft.ko: No 
such file or directory


~ # cd /tmp
/tmp # wget 
http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-modules-4.15.0-45-generic_4.15.0-45.48_amd64.deb
/tmp # ar x linux-modules-4.15.0-45-generic_4.15.0-45.48_amd64.deb 
/tmp # xzcat data.tar.xz | tar x
/tmp # mkdir /lib/modules/4.15.0-45-generic/kernel/drivers/firmware/
/tmp # cp lib/modules/4.15.0-45-generic/kernel/drivers/firmware/iscsi_ibft.ko /l
ib/modules/4.15.0-45-generic/kernel/drivers/firmware/

/tmp # exit

...


  │ Select disk to partition:                                               │
  │                                                                         │
  │            SCSI3 (0,0,1) (sda) - 8.6 GB IET VIRTUAL-DISK                │


...

~ #  grep 'retrieving disk-detect' /var/log/syslog
Jun  6 01:01:18 anna[1610]: DEBUG: retrieving disk-detect 1.117ubuntu6.18.04.1

~ # sed -n '/scsi_ibft.ko/,/iBFT disk detection finished/p' /var/log/syslog
Jun  6 01:05:17 disk-detect: insmod 
/lib/modules/4.15.0-45-generic/kernel/drivers/firmware/iscsi_ibft.ko
Jun  6 01:05:17 kernel: [  293.676205] iBFT detected.
Jun  6 01:05:17 disk-detect: # BEGIN RECORD 2.0-874
Jun  6 01:05:17 disk-detect: iface.initiatorname = 
iqn.2010-04.org.ipxe:00000000-0000-0000-0000-000000000000
Jun  6 01:05:17 disk-detect: iface.hwaddress = 52:54:00:00:00:02
Jun  6 01:05:17 disk-detect: iface.bootproto = STATIC
Jun  6 01:05:17 disk-detect: iface.ipaddress = 10.0.0.2
Jun  6 01:05:17 disk-detect: iface.subnet_mask = 255.255.255.0
Jun  6 01:05:17 disk-detect: iface.primary_dns = 192.168.122.1
Jun  6 01:05:17 disk-detect: iface.vlan_id = 0
Jun  6 01:05:17 disk-detect: iface.net_ifacename = ens4
Jun  6 01:05:17 disk-detect: node.name = iqn.2019-06.com.example:target1
Jun  6 01:05:17 disk-detect: node.conn[0].address = 10.0.0.1
Jun  6 01:05:17 disk-detect: node.conn[0].port = 3260
Jun  6 01:05:17 disk-detect: node.boot_lun = 01000000
Jun  6 01:05:17 disk-detect: # END RECORD
Jun  6 01:05:17 disk-detect: Setting up software interface ens4
Jun  6 01:05:17 disk-detect: iscsistart: version 2.0-874
Jun  6 01:05:17 kernel: [  293.694700] Loading iSCSI transport class v2.0-870.
Jun  6 01:05:17 kernel: [  293.702842] iscsi: registered transport (tcp)
Jun  6 01:05:17 disk-detect: iscsistart:
Jun  6 01:05:17 disk-detect: Connection1:0 to [target: 
iqn.2019-06.com.example:target1, portal: 10.0.0.1,3260] through [iface: 
default] is o
perational now
Jun  6 01:05:17 disk-detect:
Jun  6 01:05:17 kernel: [  293.704410] scsi host2: iSCSI Initiator over TCP/IP
Jun  6 01:05:17 kernel: [  293.709519] scsi 2:0:0:0: RAID              IET      
Controller       0001 PQ: 0 ANSI: 5
Jun  6 01:05:17 kernel: [  293.711428] scsi 2:0:0:0: Attached scsi generic sg0 
type 12
Jun  6 01:05:17 disk-detect: iscsistart: Logging into 
iqn.2019-06.com.example:target1 10.0.0.1:3260,1
Jun  6 01:05:17 kernel: [  293.713414] scsi 2:0:0:1: Direct-Access     IET      
VIRTUAL-DISK     0001 PQ: 0 ANSI: 5
Jun  6 01:05:17 kernel: [  293.714350] sd 2:0:0:1: Attached scsi generic sg1 
type 0
Jun  6 01:05:17 kernel: [  293.714518] sd 2:0:0:1: Power-on or device reset 
occurred
Jun  6 01:05:17 kernel: [  293.716821] sd 2:0:0:1: [sda] 16777216 512-byte 
logical blocks: (8.59 GB/8.00 GiB)
Jun  6 01:05:17 kernel: [  293.716823] sd 2:0:0:1: [sda] 4096-byte physical 
blocks
Jun  6 01:05:17 kernel: [  293.717069] sd 2:0:0:1: [sda] Write Protect is off
Jun  6 01:05:17 kernel: [  293.717071] sd 2:0:0:1: [sda] Mode Sense: 69 00 10 08
Jun  6 01:05:17 kernel: [  293.717955] sd 2:0:0:1: [sda] Write cache: enabled, 
read cache: enabled, supports DPO and FUA
Jun  6 01:05:17 kernel: [  293.725328] sd 2:0:0:1: [sda] Attached SCSI disk
Jun  6 01:05:17 disk-detect: iBFT disk detection finished.


** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1817321

Title:
  installer does not support iSCSI iBFT

Status in debian-installer package in Ubuntu:
  Fix Released
Status in hw-detect package in Ubuntu:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in partman-iscsi package in Ubuntu:
  Fix Released
Status in debian-installer source package in Bionic:
  In Progress
Status in hw-detect source package in Bionic:
  Fix Committed
Status in linux source package in Bionic:
  Fix Released
Status in partman-iscsi source package in Bionic:
  In Progress
Status in debian-installer source package in Cosmic:
  In Progress
Status in hw-detect source package in Cosmic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Released
Status in partman-iscsi source package in Cosmic:
  In Progress
Status in debian-installer source package in Disco:
  In Progress
Status in hw-detect source package in Disco:
  Fix Committed
Status in linux source package in Disco:
  Fix Released
Status in partman-iscsi source package in Disco:
  In Progress
Status in debian-installer source package in Eoan:
  Fix Released
Status in hw-detect source package in Eoan:
  Fix Released
Status in linux source package in Eoan:
  Fix Released
Status in partman-iscsi source package in Eoan:
  Fix Released

Bug description:
  [Impact]

   * It's not possible to access iBFT (iSCSI Boot Firmware Table) information
     (settings for network interface, initiator, and target) in the installer
     because the 'iscsi_ibft' module is not present in udeb packages.

   * Even if it was, the installer does not handle iBFT information at all,
     thus any settings are ignored, and iSCSI-related configuration has to
     be done manually or with workarounds.

   * This impacts user-experience and automatic installation on systems and
     deployments which actually do provide the iBFT feature and information,
     but cannot use it practically.

   * With proper iBFT support in the installer (kernel module in udeb package
     and automatic iSCSI-related configuration) users will be able to rely on
     iBFT to install/deploy Ubuntu on their servers and datacenters.

   * These fixes add the 'iscsi_ibft' kernel module in the scsi-modules udeb,
     and configure network/iSCSI according to iBFT information in disk-detect.

     This is done in disk-detect so that the iSCSI LUNs are detected as disks
     (useful in case of no other disks in the system so the installer doesn't
     complain nor wait too long) and that any partman-related preseed options
     are not required and may be still available for the user.

  [Test Case]

   * linux package / kernel module in udeb:

     $ dpkg-deb -c scsi-modules_*.udeb | grep iscsi_ibft.ko

     Check the module loads in the installer environment.
     See comment with example for disco.

   * d-i/hw-detect/partman-iscsi package:
     See comments 11, 12, 13.

  [Regression Potential]

   * linux package: low, the kernel module is not loaded by default,
     and only checks whether iBFT information is present in firmware,
     then exposes that in sysfs in read-only mode.

   * d-i/hw-detect/partman-iscsi:
     - d-i: kernel version update to include iscsi_ibft module,
            based on kernel released to -updates plus one week
            monitoring bug reports -- it should be OK.
            Tested on amd64/i386/arm64/ppc64el on QEMU, plus amd64
            on baremetal -- see comment 11.
     - hw-detect: low, the changes are enabled by a preseed option.
                  see comment 12.
     - partman-iscsi: low, simple changes, plus one fix that has
                      been tested in detail, and falls back to
                      previous behavior if it fails.
                      see comment 13.

  [Other Info]

   * This has been verified both by the developer with a simple iSCSI
     iBFT environment (2 VMs: iSCSI target & initiator with UEFI+iPXE)
     and by an user with system/firmware that supports iBFT for iSCSI.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1817321/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to