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

推荐订阅源

I
Intezer
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
博客园 - Franky
Jina AI
Jina AI
博客园_首页
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
B
Blog
A
About on SuperTechFans
J
Java Code Geeks
WordPress大学
WordPress大学
GbyAI
GbyAI
N
News | PayPal Newsroom
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
T
The Exploit Database - CXSecurity.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Know Your Adversary
Know Your Adversary
博客园 - 三生石上(FineUI控件)
AWS News Blog
AWS News Blog
Latest news
Latest news
V
V2EX
Y
Y Combinator Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
美团技术团队
A
Arctic Wolf
S
Secure Thoughts
H
Help Net Security
L
LangChain Blog
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
I
InfoQ
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Hacker News - Newest:
Hacker News - Newest: "LLM"

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