[Merge] ~gjolly/livecd-rootfs:ubuntu-cpc/mount_esp_on_boot into livecd-rootfs:ubuntu/master

Gauthier Jolly mp+433639 at code.launchpad.net
Thu Feb 2 12:30:51 UTC 2023



Diff comments:

> diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary
> index 8ef4fca..a653b7c 100755
> --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary
> +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary
> @@ -51,7 +57,7 @@ create_partitions() {
>          arm64|armhf)
>              if [ "${SUBARCH:-}" = "generic" ]; then
>                  sgdisk "${disk_image}" \
> -                       --new=15:0:204800 \
> +                       --new=15:0:+1G \

I totally agree. 1G comes from pure guess. I will check with the server team to know what the installer does.

>                         --typecode=15:ef00 \
>                         --attributes=15:set:2 \
>                         --new=14::+4M \
> @@ -458,16 +475,34 @@ EOF
>  
>  disk_image=binary/boot/disk-uefi.ext4
>  
> +# create the disk
>  create_empty_disk_image "${disk_image}"
>  create_partitions "${disk_image}"
>  mount_image "${disk_image}" 1
>  
> -# Copy the chroot in to the disk
> +# create and mount the rootfs partition
>  make_ext4_partition "${rootfs_dev_mapper}"
>  mkdir mountpoint
>  mount "${rootfs_dev_mapper}" mountpoint
> -cp -a chroot/* mountpoint/
> -umount mountpoint
> +
> +# create and mount the ESP
> +create_and_mount_uefi_partition mountpoint
> +
> +# Copy the chroot in to the disk
> +# ...first copy the boot folder, this
> +# will return a non-0 exit code because boot
> +# contains symlinks that cannot be copied on
> +# the vfat partition
> +cp -a chroot/boot/* mountpoint/boot/ || true

This hook is only related to UEFI images. The symlinks are generated in the chroot hooks that are common for all binary images. Changing the chroot hooks will increase the impact of this MP. I am not against it but it means that to increase the ESP size on UEFI images, we will modify all images (including the non-UEFI ones). In exchange we would keep the consistency across all cloud-images (no more symlinks in /boot).
Do you want me to change the chroot then?

> +
> +# ...then copy everything else, we don't
> +# expect any error here
> +cp -a chroot/!(boot) mountpoint/
> +
> +configure_chroot mountpoint
> +
> +# cleanup the mount
> +umount -R mountpoint
>  rmdir mountpoint
>  
>  install_grub


-- 
https://code.launchpad.net/~gjolly/livecd-rootfs/+git/livecd-rootfs/+merge/433639
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~gjolly/livecd-rootfs:ubuntu-cpc/mount_esp_on_boot into livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list