Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复某些设备重启后Read Only File Syetem的问题 #2290

Closed
Shrinft opened this issue May 2, 2024 · 4 comments
Closed

修复某些设备重启后Read Only File Syetem的问题 #2290

Shrinft opened this issue May 2, 2024 · 4 comments

Comments

@Shrinft
Copy link

Shrinft commented May 2, 2024

Device Information | 设备信息

  • SOC: [适用于所有支持的SOC]
  • Model [适用于所有支持的设备]

Armbian Version | 系统版本

  • Kernel Version: [所有报错的设备]
  • Release: [所有设备版本]

Describe the bug | 问题描述
捕4获
如图,重启后出现大量只读文件系统的报错

如何解决这个问题?

我们可以修改/etc/fstab如图
2
以文本文档的形式打开它
修改defaults,noatime,nodiratime,commit=600,errors=remount-ro为defaults,noatime,nodiratime,commit=600,rw如图
3
保存退出

Armbian下的命令:
nano /etc/fstab
将errors=remount-ro改为rw
ctrl+o保存,ctrl+x退出

@ophub
Copy link
Owner

ophub commented May 2, 2024

errors 挂载选项用于定义当文件系统发现有错误时应该采取的动作。对于 ext4 文件系统而言,这个选项可以有不同的设置值:

  • errors=remount-ro:当检测到有错误时,将文件系统重挂载为只读模式。这是一种安全措施,可以防止文件系统错误加剧。在用户手动检查并修复错误之前,不允许对文件系统进行写操作。
  • errors=continue:即使文件系统发现错误,也继续以读写模式运行。这可能会导致数据的进一步损坏,一般不推荐在生产系统中使用。
  • errors=panic:一旦文件系统发现错误,便会引发内核错误(kernel panic),并停止系统。这通常用于一些对数据一致性要求非常高的系统。

默认情况下,大多数系统会使用 errors=remount-ro,因为它能在保护系统不受进一步损坏的同时,使系统能继续运行,尽管是在受限的只读模式下。在处理文件系统错误之前,系统至少能保持运行,并允许用户对其进行故障排查和数据备份。

如果你在 errors=remount-ro 的情况下是只读,应该立即修复,而不是绕过,这可能会让问题更严重。

@Shrinft
Copy link
Author

Shrinft commented May 4, 2024

那如果我遇到这种错误情况,我应该怎么去修复它呢?

@Shrinft
Copy link
Author

Shrinft commented May 4, 2024

在设备命令行输入reboot正常重启也会遇到这种情况,这是什么原因?

@ophub
Copy link
Owner

ophub commented May 4, 2024

首先在刷系统的时候,不要把u盘插在运行的安卓系统里,插入会百分百篡改了armbian的权限,表现的就是只读,只能重新刷u盘的armbian系统,正常的操作是断电,查u盘,插电开机从u盘启动armbian。

如果不是刷机时碰到的系统只读,是日常使用的时候突然系统只读了,那么检查磁盘坏道,修复坏道。

@ophub ophub closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants