Title is a decent descriptor. Not sure where to go with this-fs was never my comfort zone. No amount of running fsck seems to resolve the issue p1 comes up as dirty, but p2 comes up read-only. I don't see any log messages that help me determine a good course of action.
I don't know for sure why, but the date/time seems to reset itself to April 22 every time, and ntp won't start automatically due to the rofs.
Here's the clinical details:
root@raspberrypi:/home/pi# touch manyfiles
touch: cannot touch ‘manyfiles’: Read-only file system
~~~
root@raspberrypi:/home/pi# dmesg|grep mmcblk
[ 0.000000] Kernel command line: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa22082 bcm2709.serial=0x247e14a smsc95xx.macaddr=B8:27:EB:47:E1:4A bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 1.870346] Waiting for root device /dev/mmcblk0p2...
[ 1.872840] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 1.875524] mmcblk0: p1 p2
[ 1.881380] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[ 1.883524] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[ 2.705972] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
[ 2.715632] EXT4-fs (mmcblk0p2): 1 orphan inode deleted
[ 2.717957] EXT4-fs (mmcblk0p2): recovery complete
[ 2.724193] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.050381] systemd[1]: Expecting device dev-mmcblk0p1.device...
[ 5.912881] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
~~~
root@raspberrypi:/home/pi# fsck
fsck from util-linux 2.25.2
e2fsck 1.43.3 (04-Sep-2016)
/dev/mmcblk0p2: clean, 70946/971040 files, 749538/3894272 blocks
fsck.fat 3.0.27 (2014-11-12)
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Leaving filesystem unchanged.
/dev/mmcblk0p1: 119 files, 2660/8057 clusters
~~~
fsck says p2 is clean. If p2 is clean, then why is it coming up ROFS?
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additional requested information:
root@raspberrypi:/home/pi# cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
root@raspberrypi:/home/pi# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 2.6G 12G 19% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 30M 434M 7% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 63M 21M 43M 34% /boot
tmpfs 93M 0 93M 0% /run/user/1000
UPDATE 12/12:
Needed to reboot today due to a impending power outage. Shut the Pi down, and brought it up later. I noticed that it was not ROFS when it came back up. I don't know what would make it different about it this time, with the exception of using 'shutdown -h now' instead of poweroff or reboot.
I don't understand why I was unable to get it to fix the file system before, but it worked properly this time.
Here's dmesg from this boot. I grepped out the mmc* entries:
root@raspberrypi:/home/pi# dmesg|grep mmc
[ 0.000000] Kernel command line: 8250.nr_uarts=0
dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416
bcm2709.boardrev=0xa22082 bcm2709.serial=0x247e14a
smsc95xx.macaddr=B8:27:EB:47:E1:4A bcm2708_fb.fbswap=1
bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000
vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline
fsck.repair=yes rootwait
[ 1.739506] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 1.744015] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[ 1.746309] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[ 1.796782] mmc0: host does not support reading read-only switch,
assuming write-enable
[ 1.840476] Waiting for root device /dev/mmcblk0p2...
[ 1.842405] mmc0: new high speed SDHC card at address 59b4
[ 1.842999] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 1.845653] mmcblk0: p1 p2
[ 1.851957] EXT4-fs (mmcblk0p2): INFO: recovery required on
readonly filesystem
[ 1.854109] EXT4-fs (mmcblk0p2): write access will be enabled
during recovery
[ 1.861550] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1.865219] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.868802] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.875605] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.968851] mmc1: new high speed SDIO card at address 0001
[ 2.721460] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
[ 2.731388] EXT4-fs (mmcblk0p2): 1 orphan inode deleted
[ 2.733772] EXT4-fs (mmcblk0p2): recovery complete
[ 2.739988] EXT4-fs (mmcblk0p2): mounted filesystem with ordered
data mode. Opts: (null)
[ 4.175328] systemd[1]: Expecting device dev-mmcblk0p1.device...
[ 5.162347] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 6.284184] FAT-fs (mmcblk0p1): Volume was not properly unmounted.
Some data may be corrupt. Please run fsck.
mount output:
root@raspberrypi:/home/pi# mount
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type
devtmpfs(rw,relatime,size=469532k,nr_inodes=117383,mode=755)
sysfs on /sys type sysfs(rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs(rw,nosuid,nodev)
devpts on /dev/pts type
devpts(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup(rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-
cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type
cgroup(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup(rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup(rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup(rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs(rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs(rw,nosuid,nodev,relatime,size=94776k,mode=700,uid=1000,gid=1000)
df -h