diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index ee254d4b..3c8c7853 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -52,12 +52,8 @@ mount_image() { exit 1 fi - # don't assume we know the separator between device number and partition - # number in the partition name, as this has changed over time. - partsep=$(echo "$loop_p1" | sed -e's/^loop[0-9]\+\(.*\)[0-9]\+/\1/') - # Find the rootfs location - rootfs_dev_mapper="/dev/mapper/${loop_device}${partsep}${rootpart}" + rootfs_dev_mapper="/dev/mapper/${loop_p1%%[0-9]}${rootpart}" if [ ! -b "${rootfs_dev_mapper}" ]; then echo "${rootfs_dev_mapper} is not a block device"; exit 1 diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 13c197d9..1b6d3099 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -59,7 +59,7 @@ mkdir mountpoint mount "${rootfs_dev_mapper}" mountpoint if [ -n "$BOOT_MOUNTPOINT" ]; then - boot_dev_mapper="${rootfs_dev_mapper%[0-9]*}1" + boot_dev_mapper="${rootfs_dev_mapper%%[0-9]}1" # assume fat32 for now mkfs.vfat -n system-boot "$boot_dev_mapper" mkdir -p "mountpoint/$BOOT_MOUNTPOINT"