I pushed the proposed fix for initramfs-tools to
https://code.launchpad.net/~bdrung/ubuntu/+source/initramfs-
tools/+git/initramfs-tools/+ref/ubuntu/2091904

Besides adding autopkgtest, the relevant code change is in
https://git.launchpad.net/~bdrung/ubuntu/+source/initramfs-
tools/commit/?id=0d384c77a8f9ba4e63a0746b54f03cb754339c1f:

```
diff --git a/scripts/functions b/scripts/functions
index 1a0880db..96a5e0d9 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -290,10 +290,34 @@ _update_ip_param()
        fi
 }
 
+_set_bootif_and_ip_param_from_ibft()
+{
+       local iface mac
+       for iface in /sys/firmware/ibft/ethernet*; do
+               echo "iface: $iface"
+               [ -e "$iface/mac" ] || continue
+               read -r mac < "${iface}"/mac
+               [ -n "$mac" ] || continue
+               echo "mac: $mac"
+               BOOTIF="$mac"
+               case "$(cat "$iface/ip-addr")" in
+               *:*)
+                       # IPv6 address
+                       IP=off
+                       IP6=on
+               ;;
+               esac
+       done
+}
+
 configure_networking()
 {
        local netdev_desc
 
+       if [ -z "${DEVICE-}${DEVICE6-}${BOOTIF-}" ] && [ -e /sys/firmware/ibft 
]; then
+               _set_bootif_and_ip_param_from_ibft
+       fi
+
        # The order of precedence here is:
        # 1. Device specified by ip= kernel parameter
        # 2. Device matching MAC specified by BOOTIF= kernel parameter
```

** Changed in: initramfs-tools (Ubuntu)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/2091904

Title:
  IPv6 iBFT boot runs into a timeout

Status in initramfs-tools package in Ubuntu:
  In Progress
Status in open-iscsi package in Ubuntu:
  New

Bug description:
  iSCSI Boot Firmware Table (iBFT) can provide the network configuration
  that is needed to boot over iSCSI. The iBFT can contain IPv4 or IPv6
  addresses. local-top/iscsi calls `configure_networking`. The default
  behaviour of `configure_networking` is DHCPv4 on all available
  interfaces (if ip= and ip6= are not set). If iBFT provides IPv6
  addresses and no DHCPv4 server are running, `configure_networking`
  will only try DHCPv4 and run into a timeout.

  Placing the single line "ISCSI_AUTO=true" into
  /etc/iscsi/iscsi.initramfs, or use the kernel boot line option
  "iscsi_auto" will configure the network devices based on iBFT, but the
  code in `local-top/iscsi` will assume that the addresses are IPv4.

  dracut on the other hand has the kernel boot line parameters
  `rd.iscsi.firmware=1` and `rd.iscsi.ibft` and `ibft` as option for the
  `ip` parameter. The `ibft` option is a bit under documented.
  
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/installation_guide/chap-
  anaconda-boot-options mentions `ip=ibft` and dracut.cmdline mentions
  it.

  There are multiple ways to address the timeout with IPv6 iBFT:

  1) Extend `local-top/iscsi` to differentiate between IPv4 and IPv6
  when "iscsi_auto" is used. This information needs to be passed to
  `configure_networking` to only try to bring up that device and
  protocol.

  2) Use `ip=ibft` as indicator to use ibft as source for the network
  configuration. If no ip= parameter is set, local-top/iscsi should
  default to ip=ibft when calling configure_networking.

  Both solutions require passing data to configure_networking.

  Requiring the user to set `ip=off ip6=on` is not a good user
  experience and not a solution in my opinion.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2091904/+subscriptions


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

Reply via email to