[Merge] ~mwhudson/livecd-rootfs/+git/livecd-rootfs:netboot-tarball into livecd-rootfs:ubuntu/master
Ćukasz Zemczak
mp+423209 at code.launchpad.net
Wed May 25 12:43:25 UTC 2022
Review: Approve
This looks sane - although I didn't run a test build of a netboot tarball yet (but I assume you did anyway!). I left like two not-really-relevant comments inline (like regarding the other kernel-flavor support).
I like the idea of doing the tarball bits here, in livecd-rootfs, instead of the earlier debian-cd idea. Both have pros and cons, possibly debian-cd's is that it's just easier to do changes there (as it's not a package we need to push to the archive). But then again this means it's less accessible and debian-cd is not quite the best place to put new logic to - it would fit less as well.
So yeah, this feels okay.
Diff comments:
> diff --git a/live-build/ubuntu-server/hooks/05-netboot-tarball.binary b/live-build/ubuntu-server/hooks/05-netboot-tarball.binary
> new file mode 100755
> index 0000000..5eafdcf
> --- /dev/null
> +++ b/live-build/ubuntu-server/hooks/05-netboot-tarball.binary
> @@ -0,0 +1,118 @@
> +#!/bin/sh
> +
> +case $PASS in
> + ubuntu-server-minimal.ubuntu-server.installer.generic.netboot)
> + ;;
> + *)
> + exit 0
> + ;;
> +esac
> +
> +set -eux
> +
> +flavor=generic
This might be a stupid question, but what do we plan to do for other flavors like hwe (for the next LTS for instance)? Do we want to use a separate set of netboot tarballs? Or will they end up in the same one? Does it actually matter?
I think for now it's fine to just go with 'generic' though.
> +
> +KERNEL=${PWD}/livecd.${PROJECT}.kernel-$flavor
> +INITRD=${PWD}/livecd.${PROJECT}.initrd-$flavor
> +
> +mkdir tarball
> +mkdir tarball/$ARCH
Maybe simply `mkdir -p tarball/$ARCH`?
> +
> +case $ARCH in
> + s390x)
> + cp $INITRD tarball/$ARCH/initrd.ubuntu
> + cp $KERNEL tarball/$ARCH/kernel.ubuntu
> + ;;
> +
> + *)
> + cp $INITRD tarball/$ARCH/initrd
> + cp $KERNEL tarball/$ARCH/kernel
> + ;;
> +esac
> +
> +case $ARCH in
> + amd64)
> + mv chroot/usr/lib/PXELINUX/pxelinux.0 tarball/pxelinux.0
> + mv chroot/usr/lib/syslinux/modules/bios/ldlinux.c32 tarball/ldlinux.c32
> + mv chroot/usr/lib/shim/shimx64.efi tarball/bootx64.efi
> + mv chroot/usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed tarball/grubx64.efi
> +
> + mkdir tarball/x86_64-efi tarball/pxelinux.cfg
> + cat > tarball/x86_64-efi/grub.cfg.in <<EOF
> +menuentry "Install Ubuntu Server" {
> + set gfxpayload=keep
> + linux amd64/linux url=#ISOURL# ip=dhcp ---
> + initrd amd64/initrd
> +}
> +EOF
> + cat > tarball/pxelinux.cfg/default.in <<EOF
> +DEFAULT install
> +LABEL install
> + KERNEL amd64/linux
> + INITRD amd64/initrd
> + APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=#ISOURL# ---
> +EOF
> + ;;
> +
> + arm64)
> + mv chroot/usr/lib/shim/shimaa64.efi tarball/bootaa64.efi
> + mv chroot/usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed tarball/grubaa64.efi
> +
> + mkdir tarball/arm64-efi
> + cat > tarball/arm64-efi/grub.cfg.in <<EOF
> +menuentry "Install Ubuntu Server" {
> + set gfxpayload=keep
> + linux arm64/linux url=#ISOURL# ip=dhcp ---
> + initrd arm64/initrd
> +}
> +EOF
> + ;;
> +
> + s390x)
> + cat > tarball/s390x/ubuntu.exec <<EOF
> +/* REXX EXEC TO IPL Ubuntu for */
> +/* z Systems FROM THE VM READER. */
> +/* */
> +'CP CLOSE RDR'
> +'PURGE RDR ALL'
> +'SPOOL PUNCH * RDR'
> +'PUNCH KERNEL UBUNTU * (NOHEADER'
> +'PUNCH PARMFILE UBUNTU * (NOHEADER'
> +'PUNCH INITRD UBUNTU * (NOHEADER'
> +'CHANGE RDR ALL KEEP NOHOLD'
> +'CP IPL 000C CLEAR'
> +EOF
> + cat > tarball/s390x/ubuntu.ins <<EOF
> +* Ubuntu for IBM Z (default kernel)
> +kernel.ubuntu 0x00000000
> +initrd.off 0x0001040c
> +initrd.siz 0x00010414
> +parmfile.ubuntu 0x00010480
> +initrd.ubuntu 0x01000000
> +EOF
> + cat > tarball/s390x/parmfile.ubuntu.in <<EOF
> +url=#ISOURL# ---
> +EOF
> + perl -e "print pack('N', 0x1000000)" > tarball/s390x/initrd.off
> + perl -e "print pack('N', -s 'tarball/s390x/initrd.ubuntu')" > tarball/s390x/initrd.siz
> + cat > tarball/s390x-kvm.cfg.in <<EOF
> +DEFAULT install
> +LABEL install
> + KERNEL amd64/linux.ubuntu
> + INITRD amd64/initrd.ubuntu
> + APPEND ip=dhcp url=#ISOURL# ---
> +EOF
> + cat > tarball/dpm.cfg.in <<EOF
> +PROMPT 1
> +DEFAULT install
> +TIMEOUT 1
> +LABEL install
> + kernel=amd64/linux.ubuntu
> + initrd=amd64/initrd.ubuntu
> + append=ip=dhcp url=#ISOURL# ---
> +EOF
> + ;;
> +esac
> +
> +tar -C tarball -czf livecd.${PROJECT}.netboot.tar.gz .
> +rm -rf tarball
--
https://code.launchpad.net/~mwhudson/livecd-rootfs/+git/livecd-rootfs/+merge/423209
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.
More information about the Ubuntu-reviews
mailing list