I'm creating quite a simple Yocto image based on x86.
I want the / file system to be readonly, so I set the
IMAGE_FEATURES_append = " read-only-rootfs "
in a custom copy of the original core-image-minimal.bb
. I do want to have the /home
writable and on a separate partition, though.
So, I'm adding a line
part /home --ondisk sda --fstype=ext4 --label home --align 1024 --size 600
in genericx86.wks. This creates the actual /home
partition in the final wic image, but it naturally does not hold any data, as there's no corresponding rootfs
for it. This leads to the following quite expected message after boot: No directory, logging in with HOME=/
.
There's surprisingly little info about this on the internet. There's this explanation:
It's much more simpler to create or modify build recipes to prepare one rootfs directory per partition.
I just wish there was any reference in the documentation or example on how to achieve that.
I can see that the partitions are being populated by python scripts (plugins) like rootfs.py
, and that the image parameters like IMAGE_ROOTFS_SIZE
are specified in mentioned image recipe files like the genericx86.wks
, but this is just not enough for me to connect these pieces together.
I've read the creating-partitioned-images-using-wic and the linked openembedded kickstart manuals, there are no clues there.
Appreciate someone's kind help.
wks
file to my layer under wic folder:wic/myfile.wks.in
, in my layer'slayer.conf
addedWKS_FILE="myfile.wks.in"
, and inside the file changed the partitions as per your recommendation. Also there's no problem to add--size
setting to set the/home
's size. – Inartistic