overlayroot read only filesystem with new non-armbian olimex images

Started by Dimitri, August 21, 2020, 07:07:32 PM

Previous topic - Next topic

Dimitri

Hi, I cannot get the read-only filesystem (overlayroot) working with the new Olimex images. I've tried with A20-OLinuXino-focal-minimal-20200731-120630.img and a few weeks ago with bionic_minimal_20200701 and bionic_base_20200701.

It works fine with the previous Armbian based image: Armbian_5.92.4_Olinuxino-a20_Ubuntu_bionic_next_5.2.21_desktop

I installed overlayroot: apt-get install overlayroot
and added overlayroot="tmpfs" to /etc/overlayroot.conf

From what I can see this is what the armbian-config script does to enable this in the Armbian based image.

I've tried this on a recent T2-OLinuXino-LIME2-e8Gs16M-IND. I've tried with booting from the SD card and booting from eMMC.

I really would like to switch to the new images, mainly because of the improved stability so any help or ideas would be appreciated.

Thanks,

Dimitri

Dimitri

Hi,

I've found the solution. It was very simple once I understood how the boot process works....
The overlayroot package updates the initrd.img file but this is only used in legacy mode. The olimex distro uses the Flattened Image Tree so after initrd.img is updated a new init tree blob needs to be generated (/boot/kernel.itb). This can be done with the following command:

cd /boot
sudo mkimage -f kernel.its kernel.itb

That's it. Now the system boots with the new init tree blob and all overlayroot scripts just work. (Tested with A20-OLinuXino-bionic-minimal-20200731-114335.img and kernel-5.8.5-olimex)

Dimitri