Setting up readonly root fs


(AlexTAI) #1

I tried overlayroot - seems completely not working (seems that it depends on initramfs that does not exists on Ubuntu 16.04.2 with kernel 4.4.70). Is there any other rather simple option to have readonly rootfs?

I need a setup where the fs that come with microsd is readonly + tmpfs writable layout.

Thanks in advance!


(Igor) #2

This will work https://www.armbian.com/bananapi-r2/ but 4.19.y kernel has it’s own limitations. For now.


(Frank W.) #3

Linking to armbian imho does not help. Can you describe the options in kernel and how to setup the overlay?

Which are the limitations of 4.19? Imho i have ported most functions to it.


(Igor) #4

Overlayroot, which is one of the options to have a quick virtual read only fs, works on our Ubuntu OOB, overlayfs has to be enabled in kernel at minimum, perhaps something else.

How-to: https://github.com/armbian/config/blob/master/debian-config-jobs#L1386-L1407

In yours build yes, but not yet in Armbian. :frowning:


(AlexTAI) #5

It seems that overlayfs is not in apt repository (at least not among sources preconfigured in armbian): oot@bananapir2:~# apt-get update Hit:1 http://security.debian.org stretch/updates InRelease Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB] Get:5 http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease [91.8 kB] Hit:2 https://apt.armbian.com stretch InRelease
Hit:6 http://cdn-fastly.deb.debian.org/debian stretch Release Get:7 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Packages.diff/Index [27.8 kB] Get:8 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Contents (deb).diff/Index [27.9 kB] Get:9 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Packages 2018-12-26-1413.15.pdiff [494 B] Get:9 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Packages 2018-12-26-1413.15.pdiff [494 B] Get:10 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Contents (deb) 2018-12-26-1413.15.pdiff [154 B] Get:10 http://cdn-fastly.deb.debian.org/debian stretch-backports/main armhf Contents (deb) 2018-12-26-1413.15.pdiff [154 B] Fetched 239 kB in 14s (16.1 kB/s)
Reading package lists… Done root@bananapir2:~# apt-cache search overlayroot root@bananapir2:~#

apt cannot find it.

This is what I see in different ubuntu installation (not bpi): $ apt-cache search overlayroot overlayroot - use an overlayfs on top of a read-only root filesystem

Anyway, HDMI is a must for me, so armbian cannot be used (at least for now).

Best regards, Alexander.


(Igor) #6

You can also do something to get there: https://www.armbian.com/get-involved/

This is normal. overlayfsroot is not an armbian application. It’s working only with Ubuntu. We tried to port it to Debian, but it was to much problems and the project was abandoned. If you want to use this app, you need to start with Ubuntu package relation … or try to bring this together manually.


(AlexTAI) #7

Thank you for the information. Best regards,

Alexander.