- Without the bootloader, you only need these files in
casper/
to boot into live ubuntu:filesystem.squashfs initrd vmlinuz
- The casper boot script will mount anything named with ".squashfs" to the lower layer of the overlayfs during boot. In this case, I'm creating my own "myroot.squashfs" to add packages and files into the live ubuntu, without having to unpack the existing "filesystem.squash". This saves a lot of time.
Mount the original squashfs as the base (lower2), then mount the overlayfs with our committed changes (lower1) into myroot. Changes will be recorded in upper.
mkdir lower1 lower2 upper work
sudo mount -t squashfs /cdrom/casper/filesystem.squashfs lower2
sudo mount -n -t overlay overlayfs:/overlay -o lowerdir=lower1:lower2,upperdir=upper,workdir=work,index=on,redirect_dir=nofollow myroot