On Wed, Apr 20, 2022 at 9:43 AM Ahmad Fatoum <[email protected]> wrote: > > Hi, > > I have existing systems that have the entries of the GPT partition table in a > different order than the on-disk order of the partitions: e.g. /dev/mmcblk0p7 > is located at an earlier physical offset than /dev/mmcblk0p1. > > I have written a genimage config to achieve the same result and am curious > to see whether this is possible with less dependencies by using a wic > kickstart file. > > There is an --offset command, which looked relevant, but it doesn't seem > to allow out-of-order creation: > > ERROR: Could not place sda2 at offset 4194304: next free sector is 262144 > (delta: -253952) > > Is this unsupported by wic or am I missing something? > For reference, this can be reproduced with: > > part rootfs-a --offset=64M --fixed-size=64M --fstype=ext4 > part env-a --offset=4M --fixed-size=8K --source rawcopy > --sourceparams="file=uboot-env.bin" > bootloader --ptable gpt > > If I swap the partitions around, image creation succeeds, but I need > them ordered the other way round.
RIght, the code creates image partitions linearly from top to bottom, so a partition lower in the list can't be inserted before an earlier one; I believe this is mostly to simplify the logic for ensuring that partitions don't overlap. If you are using GPT, I'd recommend mounting the disk by label or UUID instead of position, so the ordering isn't important > > Cheers, > Ahmad > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#164704): https://lists.openembedded.org/g/openembedded-core/message/164704 Mute This Topic: https://lists.openembedded.org/mt/90585256/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
