Hi
When i want to build centos from existing rootfs for uefi bootable image encounter with below error in the end of build:
Error: Failed to create partitions
/snap/bin/distrobuilder pack-lxd ./centos.yaml /mnt2 -o targets.lxd.vm.size=60 --disable-overlay --debug
113 files removed
INFO[2022-08-31T08:42:08+04:30] Running hookstriggerpost-packages
INFO[2022-08-31T08:42:08+04:30] Running generator generator=hostname
INFO[2022-08-31T08:42:08+04:30] Running generator generator=hosts
INFO[2022-08-31T08:42:08+04:30] Running generator generator=dump
INFO[2022-08-31T08:42:08+04:30] Running generator generator=dump
INFO[2022-08-31T08:42:08+04:30] Running generator generator=remove
INFO[2022-08-31T08:42:08+04:30] Running generator generator=dump
INFO[2022-08-31T08:42:08+04:30] Running generator generator=fstab
INFO[2022-08-31T08:42:08+04:30] Running generator generator=dump
INFO[2022-08-31T08:42:08+04:30] Running generator generator=template
INFO[2022-08-31T08:42:08+04:30] Running generator generator=lxd-agent
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning! Read error 25; strange behavior now likely!
Warning! Read error 25; strange behavior now likely!
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Creating new GPT entries in memory.
Could not create partition 1 from 0 to 204799
Could not change partition 1's type code to EF00!
Error encountered; not saving changes.
Error: Failed to create partitions: Failed to create partitions: exit status 4
You are creating an empty disk image of 60 bytes. The EFI partition distrobuilder creates is 100 MB. That’s the reason it’s failing. Just drop targets.lxd.vm.size and it should work.
Yeah, we shouldn’t allow anything smaller than 100MB. Or better: We should require a minimum size of e.g. 150 MB as the root partition shouldn’t be empty either.
mkfs.fat 4.1 (2017-01-24)
rsync: rsync_xal_set: lsetxattr("/var/cache/distrobuilder.2410706773/vm/boot/efi","security.selinux") failed: Operation not supported (95)
rsync: rsync_xal_set: lsetxattr("/var/cache/distrobuilder.2410706773/vm/boot/efi/EFI","security.selinux") failed: Operation not supported (95)
rsync: rsync_xal_set: lsetxattr("/var/cache/distrobuilder.2410706773/vm/boot/efi/EFI/almalinux","security.selinux") failed: Operation not supported (95)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Error: Failed to copy rootfs: Failed to copy "/var/cache/distrobuilder.2410706773/overlay/" to "/var/cache/distrobuilder.2410706773/vm": exit status 23
That doesn’t make any sense as distrobuilder uses a default value of 4294967296 bytes which is less than 60000000000. The error message suggests that your disk is full.