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

Gauthier Jolly mp+433639 at code.launchpad.net
Wed Apr 26 08:01:09 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 \

@vorlon @xnox This is the last undecided piece. What would you like to see here? 1.75? 2? I don't mind but we will have to also increase the image size to accommodate this (which is not a big)

>                         --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

So we cannot mount the ESP on /boot on s390x? It's annoying because it will make the disk layout different on s390x and will require a specific logic in the binary hook.

> +
> +# ...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