3

I've had Raspberry Pi running few years Arch Linux ARM 24/7. All the sudden there seems to be inability to write anything, can't create new files nor edit anything, even as root. Same applies to any software, Nginx refuses to start. For example, when opening some file, say with nano there is a following textbox in the bottom:

[ Read 121 lines. (Warning: No write permission) ]

Reboot doesn't help, although it is possible to read the files,has the SD-card given up the ghost?

df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G   11G   16G  41% /
devtmpfs        237M     0  237M   0% /dev
tmpfs           241M     0  241M   0% /dev/shm
tmpfs           241M  4.3M  236M   2% /run
tmpfs           241M     0  241M   0% /sys/fs/cgroup
tmpfs           241M     0  241M   0% /tmp
/dev/mmcblk0p5   90M   22M   69M  24% /boot
tmpfs            49M     0   49M   0% /run/user/1000

touch testfile
touch: cannot touch ‘testfile’: Read-only file system

cat /etc/mtab

rootfs / rootfs rw 0 0
/dev/root / ext4 ro,relatime,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=241728k,nr_inodes=60432,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/bfqio cgroup rw,nosuid,nodev,noexec,relatime,bfqio 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /tmp tmpfs rw 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mmcblk0p5 /boot vfat rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=49196k,mode=700,uid=1000,gid=100 0 0
jvs
  • 39
  • 3

1 Answers1

3

This could be a problem with your SD card. I've had a Sandisk card suddenly die. When it died it went into read only mode "to protect your data from loss". It's plausible your SD card has done the same.

If it's an old RPI (using a regular SD card) then double check the read/write switch on the SD card.

Try placing the card into another machine. If possible back the card up entirely and then attempt to write to it (even format it). You may well find that other machines can't write to it.

If that's the case you'll need a new SD card and need to take an image backup and restore it to a new card.

Philip Couling
  • 518
  • 2
  • 6
  • 17