惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
AI
AI
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threat Research - Cisco Blogs
T
Tenable Blog
G
GRAHAM CLULEY
腾讯CDC
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AWS News Blog
AWS News Blog
D
Docker
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Latest news
Latest news
L
LINUX DO - 热门话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
LangChain Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
P
Privacy International News Feed
Cloudbric
Cloudbric
Attack and Defense Labs
Attack and Defense Labs
量子位
爱范儿
爱范儿
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
J
Java Code Geeks
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
博客园 - 司徒正美
I
InfoQ
WordPress大学
WordPress大学
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News

IT Notes - series

IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes IT Notes
IT Notes
Stefano Marinelli · 2024-05-31 · via IT Notes - series

Many years ago, I needed to create some small servers using PCEngines Alix and had to choose the most suitable operating system. One of the challenges was dealing with dirty shutdowns and subsequent reboot issues, sometimes requiring manual intervention (not always feasible). After testing various Linux distributions and BSD systems, I found the ideal solution: FreeBSD.

One highly useful but often overlooked feature of FreeBSD is its ability to detect that the system is in read-only mode and automatically mount important directories (like /tmp, /var/log, etc.) in tmpfs, allowing the system to function perfectly.

Since then, whenever I need a system that can recover from any type of blackout without manual intervention (such as my Raspberry Pies), I always use this feature. If needed, external storage devices will be mounted automatically (or manually) after boot, and in case of issues, I can always access the device via SSH to perform necessary checks on the external filesystem.

This feature is automatic: simply have the root file system on UFS (not ZFS) and set it to "ro" (from "rw") in /etc/fstab. After a reboot, the system will operate in read-only mode, helping preserve the integrity of the embedded memory.

For updates, just:

  • Temporarily remount the root file system as rw (mount -uo rw /)
  • Modify /etc/fstab, changing "ro" back to "rw"
  • Reboot the device and update it normally