[Merge] ~dbungert/livecd-rootfs:ubuntu-mini-iso into livecd-rootfs:ubuntu/master

Michael Hudson-Doyle mp+436420 at code.launchpad.net
Tue Feb 28 01:25:33 UTC 2023


This looks mostly OK but I do have some comments. I started a test build at https://launchpad.net/~mwhudson/+livefs/ubuntu/lunar/test/+build/418244 fwiw.

Diff comments:

> diff --git a/live-build/auto/config b/live-build/auto/config
> index 157f8b4..8d76bb7 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -653,6 +655,9 @@ case $PROJECT in
>  	ubuntu-server)
>  		COMPONENTS='main'
>  		;;
> +	ubuntu-mini-iso)
> +		COMPONENTS='main universe'

as we discussed we should pre-promote mini-iso-tools before landing this

> +		;;
>  	kubuntu|kubuntu-dvd|kubuntu-plasma5|edubuntu|ubuntu-gnome|ubuntu-budgie|ubuntukylin|ubuntucinnamon)
>  		COMPONENTS='main restricted universe'
>  		;;
> @@ -924,6 +929,27 @@ case $PROJECT in
>  		PREINSTALL_POOL_SEEDS='server-ship'
>  		;;
>  
> +	ubuntu-mini-iso)
> +		OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
> +
> +		OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
> +		KERNEL_FLAVOURS=none
> +		BINARY_REMOVE_LINUX=false
> +
> +		PASSES_TO_LAYERS=true

Surely we don't need this? I think you have to use a different name in the add_package below though.

> +		add_package ubuntu-mini-iso mini-iso-tools openssl ca-certificates isc-dhcp-client linux-generic

I don't understand why openssl or isc-dhcp-client are here. Should they not be dependencies of something else?

> +		# keyboard-configuration plymouth
> +		case $ARCH in
> +			amd64)
> +				add_package ubuntu-mini-iso cd-boot-images-amd64
> +				;;
> +			*)
> +				echo "unexpected architecture for $PROJECT: '$ARCH'"
> +				exit 1
> +				;;
> +		esac
> +		;;
> +
>  	ubuntu-base)
>  		OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
>  		;;
> diff --git a/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary b/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary
> new file mode 100755
> index 0000000..5d4b115
> --- /dev/null
> +++ b/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary
> @@ -0,0 +1,49 @@
> +#!/bin/sh
> +
> +set -eu
> +
> +case $ARCH in
> +    amd64)
> +        ;;
> +    *)
> +        exit 0
> +        ;;
> +esac
> +
> +KERNEL=chroot/boot/vmlinuz
> +INITRD=chroot/boot/initrd.img
> +
> +mkdir -p "chroot/etc/initramfs-tools/conf.d"
> +cat > chroot/etc/initramfs-tools/conf.d/casperize.conf <<EOF
> +export CASPER_GENERATE_UUID=1
> +EOF
> +
> +chroot chroot update-initramfs -u
> +
> +case $ARCH in
> +    amd64)
> +        mkdir -p "ubuntu-mini-iso/amd64"
> +        cp -a chroot/usr/share/cd-boot-images-amd64/tree ubuntu-mini-iso/amd64/tree
> +        cp -a chroot/usr/share/cd-boot-images-amd64/images ubuntu-mini-iso/amd64/images
> +        mkdir -p "ubuntu-mini-iso/amd64/tree/casper"
> +        cp "$KERNEL" ubuntu-mini-iso/amd64/tree/casper/vmlinuz
> +        cp "$INITRD" ubuntu-mini-iso/amd64/tree/casper/initrd
> +        mkdir -p "ubuntu-mini-iso/amd64/tree/boot/grub"
> +        cat > ubuntu-mini-iso/amd64/tree/boot/grub/grub.cfg <<EOF
> +menuentry "Choose an Ubuntu version to install" {
> +        set gfxpayload=keep
> +        linux /casper/vmlinuz iso-chooser-menu ip=dhcp ---
> +        initrd /casper/initrd
> +}
> +EOF

As I mentioned in mattermost I think something needs to create /.disk/info here (so grub can find the ISO, see https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/tree/debian/build-efi-images#n54) and /.disk/casper-uuid-$something for casper (https://git.launchpad.net/casper/tree/scripts/casper#n100)

> +        ;;
> +esac
> +
> +dest="${PWD}/livecd.${PROJECT}.ubuntu-mini.iso"
> +xorriso="$(cat chroot/usr/share/cd-boot-images-amd64/xorriso-cmd.txt)"
> +
> +cd ubuntu-mini-iso/$ARCH
> +$xorriso -o $dest
> +cd ../..
> +
> +# rm -rf ubuntu-mini-iso


-- 
https://code.launchpad.net/~dbungert/livecd-rootfs/+git/livecd-rootfs/+merge/436420
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list