linux - 从 busybox 挂载 ext2 作为完全只读的系统

标签 linux embedded-linux mount busybox

我在我的嵌入式设备 (busybox) 上使用只读模式的 ext2 FS。但是,当我检查 FS 是否是真正的只读系统时。我发现了一些奇怪的事情:当我输入 cat/proc/mounts

rootfs / rootfs RW 0 0
/dev/root / ext2 ro,relatime,errors=continue 0 0
...

但是在:/boot/grub/menu.lst

kernel=/boot/bzimage root=/dev/sda1 ro

在 fstab 中:

/dev/root / ext2 ro,noatime,nodiratime,errors=remount-ro 0 1

在初始化表中:

null::sysinnit:/bin/mount -a

/bin/挂载:

rootfs on / type rootfs (RW)
/dev/root on / type ext2 (ro,relatime,errors=continue)

我不明白为什么 rootfs 挂载为 RW(在 /proc/mounts/bin/mount 的情况下),以及为什么从 fstab 挂载的参数没有' t对应于/bin/mount中的参数?

最佳答案

rootfs 是位于 / 的初始根文件系统。它仅在 RAM 中,在安装 /dev/root 后无法访问。

/usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt

关于linux - 从 busybox 挂载 ext2 作为完全只读的系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9696505/

相关文章:

linux - 程序接收信号SIGIO

arm - 如何访问 PWM 背光驱动?

linux - 不带 sudo 挂载卸载

filesystems - df -kvh 未显示可用空间 - 剩余空间在哪里

linux - 无法使用 Apache 通过 SSH 连接服务器

linux - 为什么 bash 脚本设置了 set -e 并且由 && 连接的两个管道失败

python - SSD 与 tmpfs 速度

c++ - 压力-ng : Writing an application program using execv to invoke stress-ng commands and return if it is success or failure

linux - linux 中串行端口描述符 block 上的“关闭”功能

Azure Centos 卸载我的数据驱动器