Deploying Ubuntu Server 26.04 on eMMC for an x86_64 SoC like the Odroid H4+ requires a strategic approach to I/O management to prevent premature flash degradation. To achieve a “run-from-RAM” behavior while maintaining periodic persistence for logs, I recommend the following implementation stack:
1. Root Filesystem Abstraction (OverlayFS)
The most robust method for your hardware is using OverlayFS. This allows the operating system to treat the eMMC as a read-only (RO) base layer, while all subsequent writes are redirected to a temporary upper layer in RAM (tmpfs).
You can utilize the overlayroot package available in the standard Ubuntu repositories.
Edit /etc/overlayroot.conf and set overlayroot="tmpfs". This ensures that upon reboot, the system reverts to its original state, effectively eliminating wear during runtime.
2. Persistent Log Management (Log2Ram)
Since you require logs to be saved periodically, a standard read-only mount is insufficient. I suggest implementing Log2Ram.
It creates a virtual block device in RAM for /var/log.
It includes a daily cron job and a systemd service that synchronizes the RAM-based logs back to the physical eMMC during shutdown or at a specified LOG2RAM_SCHEDULE.
sudo apt install git
git clone https://github.com/azlux/log2ram.git
3. Periodic Data Synchronization
For “periodic basis” saves outside of logs, you should utilize a custom rsync script coupled with a systemd timer.
Avoid frequent writes; a 6-hour or 12-hour interval is usually a healthy compromise between data safety and eMMC longevity.
Ensure you remount the partition as Read-Write (mount -o remount, rw /) only during the synchronization window, then immediately revert to Read-Only.
4. Swap Optimization
Ensure that vm. swappiness is set to a minimal value (e.g., 10) to prevent the kernel from utilizing the eMMC as virtual memory, which is a common cause of high write amplification.