apologies, i keep forgetting that there’s no read only anonymous access to mender issue tracker.
Below is the issue info:
“we should allow extra wic partition lines to be specified and appended to the mender dynamically generated wic file. Possibly another mender variable that contains extras lines to be appended. Lines will need to be parsed for --fixed-size and --size parameters so that the mender a/b rootfs size calculation can adjust accordingly”
Actually, there is, it’s the link that contains a filter value which is
not permitted. The bug itself is public. This is the correct link: https://tracker.mender.io/browse/MEN-2362
Yes a variable with the size and the / app for example.
Is it warned to be able to update other partition than A / B? If I take an example on rauc with we can update a specific slot
@dellgreen Can you provide the logical steps for the same to replicate this behaviour on mender-convert?
I have been trying to use mender-convert and add an extra partition which was exceeding the maximum number (4) of primary partitions allowed on MBR partition table. So, I forcefully tried to create an extended partition and then add the extra partition along with the data partition as a logical partition.
I am getting an Error, “Error: The location 7176190 is outside of the device /mender-convert/output/image.sdimg.”*
What am I doing wrong here?
Below is the link to the patch file that came out of the commits I made locally, the log file and output of fdisk -u -l image.img. The branch used was 1.2.x in mender-convert
I’ll have to defer this one, as i have no experience with mender-convert, and the yocto work i was doing on this has been shelved for now as other priorities have taken over.
I will do give a try to Yocto as I have some experience but mender-convert seemed convenient enough.
Will it be possible for you @dellgreen to guide me through this? The goal is to add an extra partition but currently the total number of partitions exceed 4 and MBR is limited to 4 primary partitions.
This is what I did but nothing happens. I did not see any directories under /mnt
# Extra partitions to create after the data partition
MENDER_EXTRA_PARTS = "factorydata userdata"
#
# Size (in MB) of specified extra partition
MENDER_EXTRA_PARTS_SIZES_MB[factorydata] = "512"
MENDER_EXTRA_PARTS_SIZES_MB[userdata] = "2048"
#
# FSTAB options of specified extra partition (optional)
MENDER_EXTRA_PARTS_FSTAB[factorydata] = "auto,defaults,nofail,0,0"
MENDER_EXTRA_PARTS_FSTAB[userdata] = "auto,defaults,nofail,0,0"
In that case I think you will have to do some manual debugging and find out why this doesn’t expand correctly (the function itself is in mender-helpers.bbclass).
I was able to successfully create a partition but seems like I can’t create a folder or put any files on it.
# Extra partitions to create after the data parition
MENDER_EXTRA_PARTS = "part1"
MENDER_EXTRA_PARTS[part1] = "--label=hero-secc --fstype=ext4 --fixed-size=2048"
#
# Size (in MB) of specified extra partition
MENDER_EXTRA_PARTS_SIZES_MB[part1] = "2048"
#
# FSTAB options of specified extra partition (optional)
MENDER_EXTRA_PARTS_FSTAB[part1] = "auto defaults 0 2"
root@hero-secc:/data/hero-secc/factorydata# cd
# stock fstab - you probably want to override this with a machine specific one
/dev/root / auto ro,ro 1 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,stri
ctatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0
/dev/mmcblk1p3 /data auto defaults 0 2
/dev/mmcblk1p4 /mnt/hero-secc auto defaults 0 2
I think this is not supported yet, actually. There are two things that would need to be implemented for this to work:
The mount paths for the partitions in MENDER_EXTRA_PARTS need to be added to IMAGE_ROOTFS_EXCLUDE_PATH. This makes sure that any files added to these folders are not included in the root filesystem.
In the get_extra_parts_wks function, it needs to take into account that it should reference those folders. I don’t recall the exact syntax off the top of my head, but it’s something like --rootfs=${IMAGE_ROOTFS}/mnt/hero-secc. The last hero-secc part should be extracted from MENDER_EXTRA_PARTS, ideally, and not be hard coded. This makes sure that the folder do get included in the extra partitions’ filesystems.
You can either hardcode those things locally, or even better if you can make it generic and submit a pull request!