verified resolute-proposed successfully 1. Set the test variables
cd /bak/work/open-iscsi [email protected] ROOT=/mnt/lp2147499-resolute-sru LV=/dev/cinder-volumes/lp2147499-resolute-sru SNAP=/dev/cinder-volumes/lp2147499-resolute-run TARGET=iqn.2026-09.local.lp2147499:resolute INITIATOR=iqn.2026-09.local.lp2147499:resolute-vm ROOT_UUID=cf947291-fdbd-41f7-ad22-6661a5a7786d 2. Download the native Resolute root filesystem ssh "$HOST" 'set -eu cd /tmp curl -fL --retry 3 \ -o resolute-server-cloudimg-amd64-root.tar.xz \ https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-amd64-root.tar.xz 3. Create and populate an isolated 30 GiB root LV ssh "$HOST" 'set -eu ROOT=/mnt/lp2147499-resolute-sru LV=/dev/cinder-volumes/lp2147499-resolute-sru sudo lvcreate -L 30G -n lp2147499-resolute-sru cinder-volumes sudo mkfs.ext4 -L resolute-sru "$LV" sudo mkdir -p "$ROOT" sudo mount "$LV" "$ROOT" sudo tar --numeric-owner --xattrs --xattrs-include="*" \ -xJpf /tmp/resolute-server-cloudimg-amd64-root.tar.xz \ -C "$ROOT" printf "%s\n" lp2147499-resolute-sru \ | sudo tee "$ROOT/etc/hostname" >/dev/null UUID=$(sudo blkid -s UUID -o value "$LV") printf "UUID=%s / ext4 defaults 0 1\n" "$UUID" \ | sudo tee "$ROOT/etc/fstab" >/dev/null sudo grep -E "^(PRETTY_NAME|VERSION_ID|VERSION_CODENAME)=" \ "$ROOT/etc/os-release" sudo blkid "$LV" ' The UUID used during this test was: cf947291-fdbd-41f7-ad22-6661a5a7786d 4. Enable resolute-proposed cat > /tmp/resolute-proposed.sources <<'EOF' Types: deb URIs: http://archive.ubuntu.com/ubuntu/ Suites: resolute-proposed Components: main Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg EOF scp /tmp/resolute-proposed.sources "$HOST":/tmp/ 5. Install the complete proposed package and build a native initramfs- tools initrd ssh "$HOST" 'sudo bash -s' <<'EOF' set -euo pipefail ROOT=/mnt/lp2147499-resolute-sru cleanup() { rm -f "$ROOT/usr/sbin/policy-rc.d" for path in run dev proc sys; do if mountpoint -q "$ROOT/$path"; then mount --make-rslave "$ROOT/$path" 2>/dev/null || true umount -R -l "$ROOT/$path" || true fi done } trap cleanup EXIT install -m 0644 /tmp/resolute-proposed.sources \ "$ROOT/etc/apt/sources.list.d/resolute-proposed.sources" install -m 0644 /tmp/open-iscsi_2.1.11-3ubuntu3.1_amd64.deb \ "$ROOT/tmp/" printf '#!/bin/sh\nexit 101\n' > "$ROOT/usr/sbin/policy-rc.d" chmod 0755 "$ROOT/usr/sbin/policy-rc.d" mount --rbind /dev "$ROOT/dev" mount --make-rslave "$ROOT/dev" mount -t proc proc "$ROOT/proc" mount -t sysfs sys "$ROOT/sys" mount --rbind /run "$ROOT/run" mount --make-rslave "$ROOT/run" chroot "$ROOT" apt-get update chroot "$ROOT" sh -c \ 'cd /tmp && apt-get download libopeniscsiusr=2.1.11-3ubuntu3.1' DEBIAN_FRONTEND=noninteractive chroot "$ROOT" apt-get install -y \ linux-generic \ /tmp/libopeniscsiusr_2.1.11-3ubuntu3.1_amd64.deb \ /tmp/open-iscsi_2.1.11-3ubuntu3.1_amd64.deb DEBIAN_FRONTEND=noninteractive chroot "$ROOT" \ apt-get install -y initramfs-tools rm -f "$ROOT/boot/initrd.img-7.0.0-34-generic" chroot "$ROOT" update-initramfs -c -k 7.0.0-34-generic chroot "$ROOT" dpkg-query -W \ -f='${db:Status-Abbrev} ${Package} ${Version} ${Architecture}\n' \ initramfs-tools libopeniscsiusr linux-generic open-iscsi if [ -n "$(chroot "$ROOT" dpkg --audit)" ]; then echo DPKG_AUDIT=FAIL exit 1 fi echo DPKG_AUDIT=PASS EOF Expected package state: ii initramfs-tools 0.151ubuntu1 all ii libopeniscsiusr 2.1.11-3ubuntu3.1 amd64 ii linux-generic 7.0.0-34.34 amd64 ii open-iscsi 2.1.11-3ubuntu3.1 amd64 DPKG_AUDIT=PASS 6. Verify the script embedded in the initrd ssh "$HOST" 'set -eu ROOT=/mnt/lp2147499-resolute-sru sudo rm -rf /tmp/lp2147499-resolute-initrd sudo mkdir /tmp/lp2147499-resolute-initrd sudo unmkinitramfs \ "$ROOT/boot/initrd.img-7.0.0-34-generic" \ /tmp/lp2147499-resolute-initrd SCRIPT=$(sudo find /tmp/lp2147499-resolute-initrd \ -path "*/scripts/local-top/iscsi" -print -quit) test -n "$SCRIPT" sudo sha256sum \ "$ROOT/usr/share/initramfs-tools/scripts/local-top/iscsi" \ "$SCRIPT" sudo cmp -s \ "$ROOT/usr/share/initramfs-tools/scripts/local-top/iscsi" \ "$SCRIPT" echo SCRIPT_MATCH=yes sudo grep -n -A5 -B2 "STATIC)" "$SCRIPT" | head -n 14 ' Expected mapping: STATIC) PROTO="none" IPV4PROTO="static" 7. Create the iPXE script and stage the kernel and initrd cat > /tmp/resolute-native.ipxe <<'EOF' #!ipxe kernel http://172.16.1.1:8083/resolute-native-vmlinuz ip=none iscsi_auto root=UUID=cf947291-fdbd-41f7-ad22-6661a5a7786d ro rootwait rootdelay=20 console=ttyS0,115200n8 break=init cloud-init=disabled initrd http://172.16.1.1:8083/resolute-native-initrd.img boot EOF scp /tmp/resolute-native.ipxe "$HOST":/tmp/ ssh "$HOST" 'set -eu ROOT=/mnt/lp2147499-resolute-sru SERVE=/tmp/lp2147499-resolute-http mkdir -p "$SERVE" sudo cp "$ROOT/boot/vmlinuz-7.0.0-34-generic" \ "$SERVE/resolute-native-vmlinuz" sudo cp "$ROOT/boot/initrd.img-7.0.0-34-generic" \ "$SERVE/resolute-native-initrd.img" cp /tmp/resolute-native.ipxe "$SERVE/resolute-native.ipxe" sudo chown hua:hua "$SERVE"/* sudo umount "$ROOT" ' 8, Create the writable snapshot and isolated LIO target ssh "$HOST" 'set -eu SRC=/dev/cinder-volumes/lp2147499-resolute-sru SNAP=/dev/cinder-volumes/lp2147499-resolute-run TARGET=iqn.2026-09.local.lp2147499:resolute INITIATOR=iqn.2026-09.local.lp2147499:resolute-vm sudo lvcreate --snapshot --size 4G \ --name lp2147499-resolute-run "$SRC" sudo e2fsck -f -y "$SNAP" sudo targetcli /backstores/block create \ name=lp2147499-resolute-run dev="$SNAP" sudo targetcli /iscsi create wwn="$TARGET" sudo targetcli /iscsi/$TARGET/tpg1/luns create \ /backstores/block/lp2147499-resolute-run sudo targetcli /iscsi/$TARGET/tpg1/acls create wwn="$INITIATOR" sudo targetcli saveconfig sudo targetcli /iscsi/$TARGET ls ' 9. Start the HTTP server ssh -tt "$HOST" \ 'cd /tmp/lp2147499-resolute-http && \ exec python3 -m http.server 8083 --bind 172.16.1.1' 10. Define the disposable diskless VM ssh "$HOST" 'set -eu virt-install \ --connect qemu:///system \ --name lp2147499-resolute-sru \ --memory 4096 \ --vcpus 2 \ --osinfo detect=off,name=ubuntu24.04 \ --import \ --disk none \ --boot kernel=/usr/lib/ipxe/ipxe.lkrn,kernel_args="ifclose net0 && ifclose net1 && set initiator-iqn iqn.2026-09.local.lp2147499:resolute-vm && set net1/ip 172.16.1.203 && set net1/netmask 255.255.255.0 && set net1/gateway 172.16.1.1 && ifopen net1 && sanhook iscsi:172.16.1.1:::0:iqn.2026-09.local.lp2147499:resolute && chain http://172.16.1.1:8083/resolute-native.ipxe || shell" \ --network bridge=vsw0,model=virtio,mac=52:54:00:21:48:01 \ --network bridge=vsw1,model=virtio,mac=52:54:00:21:48:02 \ --network bridge=vsw2,model=virtio,mac=52:54:00:21:48:03 \ --network bridge=vsw3,model=virtio,mac=52:54:00:21:48:04 \ --graphics none \ --console pty,target_type=serial \ --noautoconsole \ --print-xml \ | sudo virsh define /dev/stdin ' 11. Boot to the initramfs shell ssh -tt "$HOST" \ 'sudo virsh start lp2147499-resolute-sru --console' 12. Commands and actual output in initramfs (initramfs) echo __RESOLUTE_NATIVE_BEGIN__; uname -r; cat /proc/cmdline; iscsistart -f > /tmp/ibft.txt; grep -E 'bootproto|ipaddress|subnet_mask|gateway|net_ifacename|targetname' /tmp/ibft.txt __RESOLUTE_NATIVE_BEGIN__ 7.0.0-34-generic ip=none iscsi_auto root=UUID=cf947291-fdbd-41f7-ad22-6661a5a7786d ro rootwait rootdelay=20 console=ttyS0,115200n8 break=init cloud-init=disabled iface.bootproto = STATIC iface.ipaddress = 172.16.1.203 iface.subnet_mask = 255.255.255.0 iface.gateway = 172.16.1.1 iface.net_ifacename = enp2s0 (initramfs) mkdir -p /run/initramfs /run/netplan; /scripts/local-top/iscsi >/tmp/script.log 2>&1; echo script_rc=$?; cat /run/net-enp2s0.conf script_rc=0 DEVICE='enp2s0' PROTO='none' IPV4PROTO='static' IPV4ADDR='172.16.1.203' IPV4BROADCAST='' IPV4NETMASK='255.255.255.0' IPV4GATEWAY='172.16.1.1' IPV4DNS0='' IPV4DNS1='' HOSTNAME='' DNSDOMAIN='' NISDOMAIN='' ROOTSERVER='' ROOTPATH='' UPTIME='0' DHCPLEASETIME='0' DOMAINSEARCH='' (initramfs) . /scripts/functions; netinfo_to_netplan /run/netplan /run/net-enp2s0.conf; echo netplan_rc=$?; cat /run/netplan/enp2s0.yaml netplan_rc=0 network: version: 2 ethernets: enp2s0: addresses: - "172.16.1.203/24" routes: - to: default via: "172.16.1.1" (initramfs) grep -q "^PROTO='none'$" /run/net-enp2s0.conf && grep -q "^IPV4PROTO='static'$" /run/net-enp2s0.conf && grep -q '172.16.1.203/24' /run/netplan/enp2s0.yaml && echo RESULT=PASS || echo RESULT=FAIL RESULT=PASS (initramfs) chroot /root dpkg-query -W -f='${Package} ${Version} ${Architecture}\n' open-iscsi libopeniscsiusr initramfs-tools linux-generic initramfs-tools 0.151ubuntu1 all libopeniscsiusr 2.1.11-3ubuntu3.1 amd64 linux-generic 7.0.0-34.34 amd64 open-iscsi 2.1.11-3ubuntu3.1 amd64 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2147499 Title: [SRU] open-iscsi initramfs: preserve static iBFT semantics while fixing netplan rendering for MAAS boot To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/2147499/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
