

This should leave you with a writable filesystem in /mnt/combined which will work as it does on OpenWRT. Sudo mount -o noatime,lowerdir=/mnt/base,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work -t overlay overlayfs /mnt/combined Also involved: a crappy USB SD card reader/writer: I put the TF card into the SD card adapter, then the adapter into the USB reader and attach the reader to an USB3 port of my laptop. Mkdir -p /mnt/base /mnt/overlay /mnt/combined We recently replaced a bunch of crappy Intenso TF cards with SanDisk Ultra A1 at a customer so now I have something crappy to play with. # Now mount both partitions (remember, you may need to unmount any automatic mounts) LOOP_DEVICE="$(sudo losetup -f -show -o "$FS_OFFSET" "$PARTITION")" # See libfstools/rootdisk.c for source of partition offset logic.ĭEVICE= # Set this appropriately - e.g. Click on Flash from file and select a OS Image. You can discover the offset by running losetup on the device, or calculate the offset yourself by inspecting the filesystem. We are going to use a Open Source tool called balenaEtcher for writing Orange Pi OS images to MicroSD card. You therefore need to mount the overlay as a loopback device. If you insert your newly flashed SD card into a Linux machine, it will be easy to mount the read only squashfs partition but it won't know about the overlay, which is not even in the partition table but instead located immediately after the squashfs filesystem in the same partition.
