filesystemsembedded-linuxyoctomountsquashfs

using squashfs image file as rootfs


I'm working on a system where I wish to use a squashfs image as the root file system. What I would like to do is have a kernel image and a squashfs image file in an ext4 partition to facilitate upgrading with RAUC.

Is it possible to get the kernel image to mount a squashfs image and use that for the rootfs? If so can someone please point me to some instructions for how to do this?

Thanks in advance

Adrew


Solution

  • You probably need to create your own initramfs that mount the ext4 partition, find the squashfs image and mount it in /mnt/image, then use switch_root provided by busybox to switch to using /mnt/image as /.