1

I want to set up an Lubuntu-Kiosk read-only. So I want everything that user does, written in the RAM only. When the Raspberry is restarted, everything is deleted.

I have tried using the package overlayroot:

apt install overlayroot
nano /etc/overlayroot.conf

#--> overlayroot = "tmpfs"**
#REBOOT

But it didn't work.

I have got Lubuntu from: Ubuntu Pi flavour maker

Update: Content of /etc/overlayroot.conf

# This is the overlayroot config file
# ... nothing changed ...
#    which is a tmpfs in memory.
overlayroot_cfgdisk="disabled"
overlayroot="tmpfs"

Update 2

I also tried to regenerate initramfs (after change as proposed in Felix' link to Odroid forum: sudo update-initramfs -c -k $(uname -r)), nothing changed.

Also, lsmod does not show overlayfs module to be loaded.

Tr33Bug
  • 11
  • I haven't played with LVM on the RPi, but if you can get LVM running, you might be able to pull this off with snapshots. If LVM won't work, one of the other answers on that page may accomplish what you need. – b_laoshi Apr 26 '17 at 07:07
  • @b_laoshi Sounds like a viable option, but with LVM you would still do writes against the disk wouldnt you? You wouldnt increase the lifetime e.g.bof the SD-card. – Felix Apr 26 '17 at 07:55
  • @Felix is right. Writes against the SD card could reduce life expectancy of the SD card, although if that's a huge concern, /boot could be put on the SD card and / could be moved to external USB storage (likely with a performance hit). Given the small amount of RAM in the RPis, you almost have to assume any solution that creates a temp fs in RAM is going to end up writing to SWAP, so you're going to be writing against a disk anyway. – b_laoshi Apr 26 '17 at 08:45
  • Could you please edit your question and add the contents of /etc/overlayroot.conf? – b_laoshi Apr 27 '17 at 01:38
  • I had the same problem with the Odroid hardware (https://forum.odroid.com/viewtopic.php?t=24078), I guess it has something to do with mkinitramfs - I never fully understood what happens, though. – Felix Apr 28 '17 at 15:43
  • @G-ötz, given what you're trying to do, have you considered just setting it up to use a guest account by default? The guest account can be customized if necessary, and anything done in guest gets destroyed on logout. I just put lubuntu on a card and am trying it out in my pi3. – b_laoshi May 05 '17 at 06:16
  • 1
    Okay, here's probably the issue... Even on lubuntu for RPi3, the mount device for / is specified in the kernel command line options found in the /boot/cmdline.txt file. All of the sudden, it's clear to me why this wouldn't work. The boot process for a Raspberry Pi is a bit different from what you see on your PC. I'm guessing it is these very differences that would make it impossible (?) for overlayroot to do its thing. – b_laoshi May 05 '17 at 06:48

0 Answers0