I apologize if there are a bunch of replies here. I am having trouble with your posting system. It won’t let me post the output I am trying to send you because it contains http links. I am going to remove that part of the output by hand, but the apt-get update command did in fact work correctly.
Captain,
Thank you for your reply.
Here is a summary of what I did (I am also putting 2 logs at the end so you can see exactly what I am talking about.
I boot the stock version of raspberian from an 8G sd card. For the logs I am sending today, I made sure I was using the very latest version of the OS.
fsck always fails.
The second log is a search (grep fsck /var/log/syslog) in /var/syslog when I boot the HDD (which is /dev/sda2). You can see the when the boot process runs fsck it fails, so the system mounts /dev/sda2 dirty.
The way I first noticed this problem was when I had a power fluctuation and the OS remounted /dev/sda2 read-only. I tried to reboot to fix the problem, but because the fsck failed on boot, the system continued to mount /dev/sda2 as ro. I can’t remember how I cleared this error. I think I just waited.
Also, I am running a raspberrypi 3.
#******* LOG 1 ******
Here is a log of the exact steps showing how I ran fsck. This is on a system booted from an 8G sd card. First I show the system is up to date & the sizes of the disks and what is mounted. I put the spaces between the commands to make them easier to find.
LOG 5-May-2016, Booted from /dev/mmcblk0p2 (an 8G sd card)
george@fenrir:~ $ sudo apt-get update
NOTE: OUTPUT REMOVED BECAUSE OF LINKS
Reading package lists… Done
george@fenrir:~ $ sudo apt-get dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
george@fenrir:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 1.7G 5.3G 24% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 68K 463M 1% /dev/shm
tmpfs 463M 6.6M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 20M 41M 34% /boot
tmpfs 93M 8.0K 93M 1% /run/user/1000
tmpfs 93M 0 93M 0% /run/user/1001
george@fenrir:~ $ mount
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=469688k,nr_inodes=117422,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,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/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
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/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)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (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=94804k,mode=700,uid=1000,gid=1000)
tmpfs on /run/user/1001 type tmpfs (rw,nosuid,nodev,relatime,size=94804k,mode=700,uid=1001,gid=1001)
george@fenrir:~ $ sudo fsck -t ext4 /dev/sda2
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
/dev/sda2 has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!
george@fenrir:~ $
#**** LOG 2 ******
This is a search on /var/log/syslog on the system when I boot from the HDD. It shows that the boot process is not able to check the drive.
May 5 08:24:38 fenrir kernel: [ 306.410328] EXT4-fs (sda2): error count since last fsck: 10
May 5 08:26:04 fenrir systemd[1]: Stopping system-systemd\x2dfsck.slice.
May 5 08:26:04 fenrir systemd[1]: Removed slice system-systemd\x2dfsck.slice.
May 5 08:26:12 fenrir systemd-fsck[76]: e2fsck 1.42.12 (29-Aug-2014)
May 5 08:26:12 fenrir systemd-fsck[76]: /dev/sda2 has unsupported feature(s): metadata_csum
May 5 08:26:12 fenrir systemd-fsck[76]: e2fsck: Get a newer version of e2fsck!
May 5 08:26:12 fenrir systemd-fsck[76]: fsck failed with error code 8.
May 5 08:26:12 fenrir systemd-fsck[76]: Ignoring error.
May 5 08:26:12 fenrir kernel: [ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa22082 bcm2709.serial=0xd2259ef4 smsc95xx.macaddr=B8:27:EB:25:9E:F4 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/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
May 5 08:26:12 fenrir systemd-fsck[174]: fsck.fat 3.0.27 (2014-11-12)
May 5 08:26:12 fenrir systemd-fsck[174]: /dev/mmcblk0p1: 85 files, 2550/7673 clusters
May 5 08:26:12 fenrir kernel: [ 12.741190] EXT4-fs (sda2): warning: mounting fs with errors, running e2fsck is recommended
I will be happy to send you any more information you need.
Thank you for you help,
George