[Buildroot] Squashfs boot

Stefan Fröberg stefan.froberg at petroprogram.com
Wed Jan 23 16:05:54 UTC 2013


23.1.2013 17:57, Thomas Petazzoni kirjoitti:
> Dear Stefan Fröberg,
>
> On Tue, 22 Jan 2013 19:49:35 +0200, Stefan Fröberg wrote:
>> It's true that you can use squashfs to compress whole system but even
>> in that case you have to
>> make your own init script that will take care of all the magic of
>> mounting. And because squashfs is read-only filesystem then it get's
>> more trickier because you have to take care
>> of yourself of all those /tmp and /var/log etc.. directories that need
>> to store temporarily stuff.
> Huh? Mounting a squashfs filesystem as the root filesystem is very
> easy. Just use root=/dev/<whereyourrootfsis> and that's it.
>
> Buildroot already mounts a tmpfs in /tmp and has several symlinks
> from /var/<something> to /tmp.
>
> So, with the basic default Buildroot configuration, there is absolutely
> nothing complicated in having the entire root filesystem read-only
> inside SquashFS. On several projects, I've generated a system with
> Buildroot where the entire filesystem is read-only mounted. No problem
> at all.
>
> I think your solution is much more complex than just having the entire
> root filesystem read-only.
>
> Best regards,
>
> Thomas

No.
What I meant was, that if he is going to make it *without* buildroot
(that is, if he can't get buildroot generated squashfs root to boot).
*Then* he has to make his own init stuff to mount those /tmp and /var/log.

And my own solution is overly complex because I want the ability to
write to squashfs, even if just temporarily.
That's why I use initramfs + squashfs + unionfs


Regards
Stefan




More information about the buildroot mailing list