The Ubuntu Jammy installer initrd is missing the /etc/dhcp/dhclient-
exit-hooks.d/rfc3442-classless-routes hook for dhclient. The
/sbin/dhclient-script included in the initrd assumes the hook is present
and if the "rfc3442_classless_static_routes" DHCP is sent by the DHCP
server it ignores the the "routers" DHCP option and defers to the
rfc3442 hook to setup the routing ...except that hook is missing so
ultimately no routing is configured if the rfc3442 option 121
("classless-static-routes" w/ ISC dhcpd) exists in the DHCP response.
This means networking doesn't function and we cannot install Ubuntu.

My colleague tested modifying the initrd by adding the
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes file and
reports that works.

--Matt

# from the initrd rescue shell
(initramfs) ls /etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
ls: cannot access /etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes: No 
such file or directory

# showing that the "routers" option is ignored if rfc3442 info is sent
(initramfs) grep -C1 classless /sbin/dhclient-script

            # if we have $new_rfc3442_classless_static_routes then we have to
            # ignore $new_routers entirely
            if [ ! "$new_rfc3442_classless_static_routes" ]; then
                    # set if_metric if IF_METRIC is set or there's more than 
one router
--
        if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}"; then
            # if we have $new_rfc3442_classless_static_routes then we have to
            # ignore $new_routers entirely
            if [ ! "$new_rfc3442_classless_static_routes" ]; then
                    if [ -n "$alias_ip_address" ] &&

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

Title:
  dhcp option 121 & 249

Status in subiquity:
  New
Status in busybox package in Ubuntu:
  Confirmed

Bug description:
  Hello,

  I'm running into issues with subiquity on a cloud provider.  The cloud
  provider is using an on-link L3 gateway.

  
  His DHCP response looks like this:

  
  OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
  OPTION:  54 (  4) Server identifier         172.31.1.1
  OPTION:  51 (  4) IP address leasetime      86400 (24h)
  OPTION:   1 (  4) Subnet mask               255.255.255.255
  OPTION:   3 (  4) Routers                   172.31.1.1
  OPTION:   6 ( 12) DNS server                ....
  OPTION: 121 ( 14) Classless Static Route    20ac1f0101000000  .......
                                            0000ac1f0101     ......
  OPTION: 249 ( 14) MSFT - Classless route    20ac1f0101000000  .......
                                            0000ac1f0101     ......

  
  Im booting the subiquity process with an patched ipxe 
(https://github.com/ipxe/ipxe/pull/104) like this:

  #!ipxe
  kernel .../vmlinuz initrd=initrd root=/dev/ram0 ramdisk_size=1500000 ip=dhcp 
url=https://cdimage.ubuntu.com/ubuntu-server/focal/daily-live/current/focal-live-server-amd64.iso
 autoinstall ds=nocloud-net;s=.../...-ad-78/ cloud-config-url=/dev/null
  initrd .../initrd
  boot

  initrd/vmlinuz is extracted right out of focal-live-server-amd64.iso

  Sadly subiquity is stuck with a broken network (because of missing
  dhcp option 121/249 support). It happens when its running the /init
  from the kernel right after kernel is booted, i guess even before the
  subiquity is started(?).

  After further debugging, it looks like the provided kernel 5.4.80 #90
  Ubuntu, is using busybox 1.30.1-4ubuntu~6.3 which includes isc-
  dhclient-4.4.1 which is lacking the given options.

  
  Would be awesome if this could be fixed.. maybe just a simple busybox compile 
option?

To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/1937110/+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