[yocto] Resizing extended partition in image created with wic (poky sumo)

Smith, Peter1 (GE Renewable Energy) peter.t.smith at ge.com
Fri Mar 8 10:08:35 PST 2019

Thanks for the pointers. I think I came across this post but maybe did not read it carefully enough. It is true that if I generate the partitions using parted by hand and leave a gap inside the extended partition before the first logical partition then the problem goes away. What I’m struggling with is how to make wic (via the .wks file) insert this space. Peter

From: Leon Woestenberg <leon at sidebranch.com>
Sent: 08 March 2019 12:26
To: Smith, Peter1 (GE Renewable Energy) <peter.t.smith at ge.com>
Cc: yocto at yoctoproject.org
Subject: EXT: Re: [yocto] Resizing extended partition in image created with wic (poky sumo)

Hello Peter,

here are some (partial) successes with some twiddling:


On Fri, Mar 8, 2019 at 10:31 AM Smith, Peter1 (GE Renewable Energy) <peter.t.smith at ge.com<mailto:peter.t.smith at ge.com>> wrote:
Posting again as I was not a member…

From: Smith, Peter1 (GE Renewable Energy)
Sent: 07 March 2019 16:31
To: 'yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>' <yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>>
Subject: Resizing extended partition in image created with wic (poky sumo)

I am having trouble with resizing a partition inside of an extended partition in an image created using wic (poky sumo).

Here is the .wks file I have used:

part /mnt/boot --source bootimg-partition --ondisk mmcblk0 --label edgeos-boot --active --align 4096 --fixed-size=100M --fstype=msdos --use-uuid
part / --source rootfs --rootfs-dir=sdcard-image --ondisk mmcblk0 --use-uuid --uuid=EA2EEE0B-5C82-4817-8439-1202B5E5651A --fstype=ext3 --label edgeos-root --align 4096 --fixed-size 1G
part /mnt/rootfs2 --ondisk mmcblk0 --use-uuid --uuid=EA2EEE0B-5C82-4817-8439-1202B5E5651B --fstype=ext3 --label rootfs2 --align 4096 --fixed-size 1G
part /mnt/conf --ondisk mmcblk0 --use-uuid --fstype=ext3 --label edgeos-conf --align 4096 --fixed-size 20M
part /mnt/data --ondisk mmcblk0 --use-uuid --fstype=ext3 --label edgeos-data --align 4096 --fixed-size 2947M
bootloader --ptable msdos

…and here is what parted thinks about the content of the image:

Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start     End        Size      Type      File system  Flags
1      8192s     212991s    204800s   primary   fat16        boot
2      212992s   2310143s   2097152s  primary   ext3
3      2310144s  4407295s   2097152s  primary   ext3
4      4415487s  10500095s  6084609s  extended               lba
5      4415488s  4456447s   40960s    logical   ext3
6      4464640s  10500095s  6035456s  logical   ext3

When I try and resize the extended partition to the end of the disk (it’s a 16GB SDCARD) with the following command I get an error

parted /dev/… resizepart 4 -1s
bash[177]: Expand extended partition(4)... Error: Unable to satisfy all constraints on the partition.

I have searched the internet but can’t seem to find any suggestions about what could be wrong, any ideas?

Best Regards Peter Smith
yocto mailing list
yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>

Leon Woestenberg
leon at sidebranch.com<mailto:leon at sidebranch.com>
T: +31 40 711 42 76
M: +31 6 472 30 372

Embedded Systems
Eindhoven, The Netherlands


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190308/30a6a0c0/attachment-0001.html>

More information about the yocto mailing list