Dear pinheads,
I am currently at the stage of placing playfield elements (trial and error), with cardboard, wooden pieces, wire etc, on a whiteboard with a working Italian lower half (slingshots, inlanes, outlanes, trough and shooter lane). Although it seems to be an issue only for the final touch-up of a complete machine, I found it very useful not having to worry about shutting down my game PC at this stage, as I have no monitors, mouse or keyboard attached to the whiteboard. So I wanted to share how I set up my Linux PC such that you can simply switch it off. I am looking forward to feedback, concerns, no-go hints etc from the more experiences Linux experts here (I am not). When this procedure is hardened, I am happy to move it over to the Tutorial. So here goes…
Assumption: you start a fresh installation of Ubuntu (or derivates), or: you are running it already and have a little space left on your hard drive for an additional partition.
Here’s the (only?) caveat: the “Overlayroot” package is key to this feature; unfortunately it got deprecated with Ubuntu 26.04 LTS (although still available from the repo). I therefore use a 24.04 LTS install, which at this time (2026) is still fully maintained (until 2029).
What we need to accomplish is the following: we’ll create a separate partition for the mountpoint of “<mpf machine folder>/data” . That folder will remain as is, i.e. full read/write access. However, the entire rest of the system (root: “/” ) will be loaded into the RAM, and used there. All data written to/from the system to “/” will be gone after shutdown, with the exception of the mpf data folder. You can switch off your PC anytime (well: perhaps not exactly when you save your highscores…) – the next time it boots up, it comes up as the original, unchanged version.
We need to do 3 things now:

Creating that separate partition is easiest when starting with a fresh Ubuntu install. If you have a running system, you may want to use gparted.
Create the partition (in my example the device is called “nvme0n1p3”) and format it as ext4 . The size does not have to be huge, honestly. A few MB will be plenty. Do not define a mountpoint just yet.
After Ubuntu and mpf have been fully installed, run
sudo blkid
Note down the UUID of the partition containing your mpf data folder (e.g. 80fdd43d-5b7f-4105-b243-aa59583b6095). Then open
sudo nano /etc/fstab
and append the following line:
/dev/disk/by-uuid/<pasted from blkid> <mpf machine folder>/data ext4 rw,sync,noauto,x-systemd.automount,x-systemd.idle-timeout=5 0 0
e.g.:
/dev/disk/by-uuid/80fdd43d-5b7f-4105-b243-aa59583b6095 /home/janedoe/mypinballheaven/data ext4 rw,sync,noauto,x-systemd.automount,x-systemd.idle-timeout=5 0 0
Save the file and exit (^o, ^x).
This mounts the data folder with the following options: (rw) read-/write-able, (sync) write buffer will be written to disk right away, (noauto) no default mounting, (x-systemd.automount) enable a mountpoint where a file system may later be mounted, (x-systemd.idle-timeout=5) partition is automatically unmounted after not being used for 5 seconds.
Now we open
sudo nano /etc/default/grub
Change or add these lines:
GRUB_DEFAULT=“Ubuntu RO“
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
GRUB_RECORDFAIL_TIMEOUT=5
Save the file and exit (^o, ^x).
That creates another entry “Ubuntu RO” in the GRUB boot loader. The entry still needs to be define though. Open
/boot/grub/grub.cfg
And copy all lines between (but not including) ### BEGIN /etc/grub.d/10_linux ### and ### END /etc/grub.d/10_linux ### and paste them into
/etc/grub.d/40_custom
Rename “menuentry 'Ubuntu' ” to “menuentry 'Ubuntu RO' “ .
Append to line : linux /boot/vmlinuz-[…]-generic root=UUID=[…] ro quiet splash $vt_handoff overlayroot=”tmpfs:recurse=0”
Save /etc/grub.d/40_custom and update the system with
sudo update-grub
Finally, install overlayroot:
sudo apt-get install overlayroot
Reboot. Now you’re done. Remember: ANY changes you are making to the system (other than in the data folder) will be gone after the next reboot. If you want to make changes to the system, to mpf files etc. you need to select “Ubuntu” in GRUB, not “Ubuntu RO”.
Great.
Thanks for your initiative Ralf.
De : mpf-...@googlegroups.com <mpf-...@googlegroups.com> De la part de Ralf G.
Envoyé : lundi 8 juin 2026 20:44
À : MPF Users <mpf-...@googlegroups.com>
Objet : [mpf-users] "Just switch off" using Overlayroot
--
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mpf-users/cf06335e-63f5-4c60-8c55-22312711e13dn%40googlegroups.com.