如何在没有 Intramfs 的情况下自动清理根文件系统?
我有一个嵌入式设备,在极少数情况下会有一个脏的根文件系统。 System-D 将停止启动:
Give root password for maintainence
(or type control-D to continue):
这些情况非常罕见,可以通过输入 root 密码后执行以下操作来解决:
# mount -o remount,ro /
# fsck /dev/mmcblk1p3
是否有办法自动执行此操作,甚至尝试在使用文件系统时执行清理?
I have an embedded device that on extremely rare occasions will have a dirty root filesystem. System-D will halt boot with:
Give root password for maintainence
(or type control-D to continue):
These situations are very rare and can be solved by doing the following after entering the root password:
# mount -o remount,ro /
# fsck /dev/mmcblk1p3
Is there anyway to automate this or even try to perform the cleaning when the filesystem is in use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过编辑适当的单元文件(或只是
systemctl edit Emergency.service
)来覆盖 systemd 紧急模式。然后你可以添加这样的东西:
You can overwrite systemd emergency mode by editing the appropriate Unit file (or just
systemctl edit emergency.service
).You can then add something like this: