6

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)
11
  • 2
    please post the contents of your '/etc/fstab'
    – sparkie
    Commented Dec 9, 2017 at 5:02
  • 2
    Is the disk full? post output of df -h
    – Milliways
    Commented Dec 9, 2017 at 6:08
  • Thanks guys. Updated the question with the requested info.
    – Sam Roza
    Commented Dec 9, 2017 at 16:36
  • What OS are you using? I can't believe even a cut down Raspbian would fit in 2.6G. It seems more likely something was wrong with your installation.
    – Milliways
    Commented Dec 9, 2017 at 21:53
  • root@raspberrypi:/etc# cat issue Raspbian GNU/Linux 8 \n \l
    – Sam Roza
    Commented Dec 10, 2017 at 0:31

3 Answers 3

4

For all who run across this in the future:

This was just a sign that the card was slowly becoming unusable. Whether due to quality issues, or Pi behaviors on storage, or my own buffoonery, the card was eventually impossible to use and required a new one.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Jun 8, 2020 at 17:53
3

This might seem like a stupid suggestion, but regardless of how intelligent the individual is, sometimes the stupid suggestions are actually helpful.

With that in mind, have you checked the "read only" switch on your SD card? If you SD card somehow got toggled into read only mode, you could see read only warnings as you are describing.

My advice would be to toggle the SD card / Micro SD card switch and try it again.

2
  • 2
    Stupid suggestions seem to be all I'm getting, so I'll take them! It's a MicroSD, so there's no toggle on it for RO, so I don't think that's the issue/resolution. Good thinking, though, and I appreciate it.
    – Sam Roza
    Commented Jan 15, 2018 at 21:35
  • 1
    your suggestion was a valid one!
    – Jeryl Cook
    Commented Oct 9, 2018 at 3:10
1

Edit /boot/cmdline.txt:

fsck.mode=force
fsck.repair=yes

This will run fsck before the system mounts its partitions. Then reboot by shutdown -Fr now (redundant).

Id like to see your mount-output

2
  • I added the fsck.mode=force option to the cmdline, and it doesn't seem to do anything. I plugged a monitor into it and it seems to progress through the boot procedure as always. mount output in original question.
    – Sam Roza
    Commented Dec 13, 2017 at 18:05
  • Also, the cmdline seems to remove the fsck.mode option after booting.
    – Sam Roza
    Commented Dec 14, 2017 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.