[Buildroot] Building multi-part rootfs images

Christian Stewart christian at paral.in
Mon Apr 10 22:17:49 UTC 2017


Arnout,

On Mon, Apr 10, 2017 at 6:09 PM, Arnout Vandecappelle <arnout at mind.be> wrote:
>  Loop mount indeed means -o loop, but that's used to mount a normal file where a
> block device is expected. What you want is to mount a different partition (or
> UBI volume, or NFS export) on /lib/modules. At least, that's what I think you mean.

No, I mean mounting a file from the boot partition - that way, we have
three files that define the system: the kernel image, the initrootfs
image, and the "extras" image in one partition. I do this because then
OTAing the system is just replacing those files, and theoretically
later on logic could be added to fall-back on older versions of the
files if there are issues with an upgrade.

That might have a significant performance impact on the "extras" IO
speed, probably, since you're reading through two layers - the loop,
and the fs volume. Since I only plan to store read-only code and not
r/w data files in that image, the performance decrease should be
pretty negligible.

>  systemd already has that for anything specified in /etc/fstab. It's not
> blocking, though.

Cool, I'll use that at first. The primary motivation behind making it
a boot step is that I can then make the systemd kernel-modules-load
step depend on the "extras" being loaded in before running, although
this is probably already the case with /etc/fstab. Furthermore, the
more complex fallback mechanism could be implemented there as well.

Best,
Christian


More information about the buildroot mailing list