Skip to contentSkip to conversation

Can wic split rootfs files across partitions?

DISCUSSION Karl Voelker 3 participants 3 messages Mar 30, 2016 – Apr 1, 2016

lore
Share & tools
lore
#0 lore raw

I am trying to build a multi-partition image with wic, with separate partitions for / and /var. So, the / partition should get all the files except those under /var, and the /var partition should get the files under /var.

I thought this was possible because of the suggestion in the docs that the mntpoint arg of a "part" command could be /usr or /home (see
http://www.yoctoproject.org/docs/2.0/dev-manual/dev-manual.html#command-part-or-partition).

However, after trying a few different things in my wks file, and looking through a lot of the wic source code, I am starting to wonder if this kind of thing is not actually supported. If it is supported, is there an example somewhere? None of the examples in scripts/lib/wic/canned-wks appear to cover this situation.

Thanks,

Karl Voelker

#1 lore raw
Quoted 12 lines

Am 30.03.2016 um 20:48 schrieb Karl Voelker <[email protected]>:

I am trying to build a multi-partition image with wic, with separate partitions for / and /var. So, the / partition should get all the files except those under /var, and the /var partition should get the files under /var.

I thought this was possible because of the suggestion in the docs that the mntpoint arg of a "part" command could be /usr or /home (see
http://www.yoctoproject.org/docs/2.0/dev-manual/dev-manual.html#command-part-or-partition).

Quoted 5 lines

However, after trying a few different things in my wks file, and looking through a lot of the wic source code, I am starting to wonder if this kind of thing is not actually supported. If it is supported, is there an example somewhere? None of the examples in scripts/lib/wic/canned-wks appear to cover this situation.

We didn't figure out how it can easily be done and use a mix of volatile and overlayfs settings to have /etc and /var separated from readonly /.

Cheers
--
Jens Rehsack - [email protected]

#2 lore raw
In reply to Karl Voelker
Quoted 9 lines · Karl Voelker

I am trying to build a multi-partition image with wic, with separate partitions for / and /var. So, the / partition should get all the files except those under /var, and the /var partition should get the files under /var.

I thought this was possible because of the suggestion in the docs that the mntpoint arg of a "part" command could be /usr or /home (see
http://www.yoctoproject.org/docs/2.0/dev-manual/dev-manual.html#command-part-or-partition).

Quoted 6 lines

However, after trying a few different things in my wks file, and looking through a lot of the wic source code, I am starting to wonder if this kind of thing is not actually supported. If it is supported, is there an example somewhere? None of the examples in scripts/lib/wic/canned-wks appear to cover this situation.

I'm afraid it's not possible. Wic takes rootfs directories and puts them to partitions. It doesn't split subdirectories to different partitions and in my opinion it shouldn't. It's a job of build recipe to prepare rootfs directories.

Regarding documentation. /usr and /home are mentioned there just as examples of mount points. If you have rootfs directory to put into /usr you can put /usr to .wks file and wic will put content of your rootfs into separate partition and add one line to fstab to mount it to /usr.

I think it's possible to write source plugin to take subdirectory instead of whole rootfs directory and put it into partition, but I'd not suggest this. It's much more simpler to create or modify build recipes to prepare one rootfs directory per partition.

--
Regards,
Ed