diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary index b5b7cffc..e02c6338 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary @@ -75,6 +75,11 @@ make_ext4_partition "${rootfs_dev_mapper}" mkdir mountpoint mount "${rootfs_dev_mapper}" mountpoint cp -a chroot/* mountpoint/ + +# the image has been modified from its disk-image-uefi base so the manifest and filelist should be regenerated +chroot mountpoint dpkg-query -W > binary/boot/filesystem.packages +(cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist + umount mountpoint rmdir mountpoint diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary index 781419cf..47b79673 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary @@ -431,6 +431,10 @@ EOF rm mountpoint/tmp/device.map umount mountpoint/boot/efi mount + + # create sorted filelist as the very last step before unmounting + (cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist + umount_partition mountpoint rmdir mountpoint } 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 020dd33f..3bdc2d6d 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 @@ -151,6 +151,10 @@ install_grub() { rm mountpoint/tmp/device.map umount mountpoint/boot/efi mount + + # create sorted filelist as the very last step before unmounting + (cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist + umount_partition mountpoint rmdir mountpoint }