1

Some puzzling situation. Here's what I have:

root@OrangePI:~# cat /etc/fstab
# OrangePI fstab
/dev/mmcblk0p2  /  ext4  defaults,ro,noatime,nodiratime  0 1
/dev/mmcblk0p1  /media/boot  vfat  defaults,ro  0 0
tmpfs /tmp  tmpfs nodev,nosuid,mode=1777  0 0

root@OrangePI:/media/boot# mount
/dev/mmcblk0p2 on / type ext4 (ro,noatime,nodiratime)
none on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,mode=1777)
none on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) /dev/mmcblk0p1 on /media/boot type vfat (ro)
systemd on /sys/fs/cgroup/systemd type cgroup 
(rw,noexec,nosuid,nodev,none,name=systemd)

I am able to create/delete files on /. Proof:

root@OrangePI:~# touch /HELLO
root@OrangePI:~# ls -la /HELLO
-rw-r--r-- 1 root root 0 Nov 25 00:26 /HELLO
root@OrangePI:~# rm /HELLO
root@OrangePI:~# ls -la /HELLO
ls: cannot access /HELLO: No such file or directory

Then:

root@OrangePI:~# df -T /HELLO
Filesystem Type 1K-blocks   Used Available Use% Mounted on
/dev/root  ext4  15340028 674788  14040832   5% /
root@OrangePI:~# reboot

and after the reboot:

root@OrangePI:~# ls /HELLO:
/HELLO

i.e. the file persists after reboot. I also install new packages, which all persist after reboots.

The system is OrangePI Zero (RaspberryPI clone), running Ubuntu 14.04.5 LTS.

8
  • Try a df [filename] after touching the new files, what does it say? If you edit a new file in / is it still there after rebooting? I'd suspect there's a tempfs or overlayfs allowing writes everywhere, even though the on-disk filesystems are ro, but I'm not seeing it in mount's output...
    – Xen2050
    Commented Dec 2, 2017 at 8:58
  • 2
    And the question is…? "How can it be?", "Is it safe?", "How to make it really ro?", "Is it a bug?", "How to do such a trick on amd64 Debian?" Commented Dec 2, 2017 at 9:49
  • @Xen2050 touch /HELLO', df -T /HELLO` Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/root ext4 15340028 674788 14040832 5% / reboot, ls /HELLO: /HELLO ie. file persists after reboot. (I am installing new packages, which all persist after reboots). Commented Dec 2, 2017 at 16:26
  • Formal note: edit your question to add relevant information (this time I did it for you). In a comment you can then notify any interested user that the question has been edited. The point is to have all the information in the question body. Commented Dec 2, 2017 at 21:30
  • /dev/root doesn't show up in mount's output, looks like it's rw. /proc/mounts very different? Any interesting messages after mount -vo remount,ro /dev/root or mount -vo remount,ro /dev/mmcblk0p2, in terminal or dmesg / syslog?
    – Xen2050
    Commented Dec 3, 2017 at 13:33

1 Answer 1

-2

root@OrangePI:~#
You are root, you can do anything. (i'm new to superuser, can't use comment)

1
  • Thanks, but see the original post. Commented Dec 25, 2017 at 1:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .