Dmitry
Dmitry

Reputation: 1156

Mount ext2 as totally readonly system from busybox

I'm using ext2 FS on my embedded device (busybox) with readonly mode. But, when I check FS if its true readonly system. I found strange things: When I type cat /proc/mounts

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

But in: /boot/grub/menu.lst

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

in fstab:

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

in inittab:

null::sysinnit:/bin/mount -a

/bin/mount:

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

I can't understand why rootfs mounted as RW (in case /proc/mounts and /bin/mount), and why arguments for mounting from fstab doesn't correspond to arguments in/bin/mount?

Upvotes: 1

Views: 2623

Answers (1)

ephemient
ephemient

Reputation: 204926

rootfs is the initial root filesystem at /. It is in RAM only, and is unreachable after /dev/root has been mounted over it.

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

Upvotes: 2

Related Questions