Is it possible to create a second (persistent) partition on iMX7D

Hi,
I need a second partition that should not be touched during update processes. In former projects with TK1 there was a MBR file and it was quite easy to create 2 dedicated ext3 partitions.
What would be the recommended way to achieve this structure with UBIFS/iMX7D?

Thanks in advance

If you are using Toradex Easy Installer (TEZI) you can modify a image.json file to add a partition.
Please see “Configuration Files” tab at https://developer.toradex.com/software/toradex-easy-installer .
OS image and json file - https://docs.toradex.com/104474-colibri-imx7-linux-image-beta-tezi.tar

Unfortunately i do not use TEZI so this i not an option for me.

On raw NAND devices you need to create a new UBI volume for the data partition. The easiest way is to first clear the whole UBI MTD partition to make sure that the update scripts will recreate the UBI volumes:

nand erase.part ubi

Then make sure that the update scripts create a data partition beside the root partition, e.g. by overwriting the prepare_rootfs variable (this creates a 128MB data partition):

run setupdate
setenv prepare_rootfs 'ubi create data 0x8000000 dynamic && ubi create rootfs 0 dynamic'
run update

Then you can mount it from within Linux like this:

mount -t ubifs ubi:data /mnt

Or create a /etc/fstab entry accrodingly

ubi:data             /mnt                 ubifs      defaults              0  0

Hi,
I followed your instructions but however, now i am getting the error “UBI init error 22”. I think its the “ubi part ubi” command that fails now…

hello
could you post the console output when you apply steps described by stefan? Is the module booting? Can you send a dmesg log? Thanks.