RPI3 update problem - Read-only file system

I’m having issues with updating the RPI3.

I’m getting error messages about read only filesystem.

Upon further investigation I see that it looks like the SD card stops responding and osmc mounts the filesystem as read only.
I have been able to update few packages by doing multiple reboots, so it’s not always stopping on the same package.

I’m using the OSMC_TGT_rbp2_20160306.img.gz image.
I’ve tried different SD cards with the same result. Brand new cards.
I’ve tried updating a RPI2 and it did not have this issue.

The following NEW packages will be installed: armv7-bluez-osmc rbp2-image-4.4.6-3-osmc The following packages will be upgraded: apt apt-utils armv7-network-osmc base-files-osmc bind9-host bluez gnupg gpgv libapt-inst1.5 libapt-pkg4.12 libbind9-90 libdns100 libgcrypt20 libgif4 libglib2.0-0 libgraphite2-3 libgudev-1.0-0 libhogweed2 libisc95 libisccc90 libisccfg90 libjasper1 liblwres90 libnettle4 libpam-modules libpam-modules-bin libpam-systemd libpam0g libpcre3 libpcrecpp0 libsmbclient libsystemd0 libudev1 libwbclient0 locales mediacenter-addon-osmc multiarch-support rbp-bootloader-osmc rbp-userland-osmc rbp2-device-osmc rbp2-kernel-osmc rbp2-libcec-osmc rbp2-mediacenter-osmc samba-common samba-libs systemd systemd-sysv tzdata udev 49 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/93.2 MB of archives. After this operation, 65.0 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Extracting templates from packages: 100% Preconfiguring packages ... (Reading database ... 22313 files and directories currently installed.) Preparing to unpack .../libapt-pkg4.12_1.0.9.8.3_armhf.deb ... Unpacking libapt-pkg4.12:armhf (1.0.9.8.3) over (1.0.9.8.2) ... dpkg: error processing archive /var/cache/apt/archives/libapt-pkg4.12_1.0.9.8.3_armhf.deb (--unpack): unable to securely remove '/usr/share/locale/nn/LC_MESSAGES.dpkg-tmp': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/pl/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/pt/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/pt_BR/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/ro/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/ru/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/sk/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/sl/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/sv/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/th/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/tl/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/tr/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/uk/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/vi/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/locale/zh_CN/LC_MESSAGES/libapt-pkg4.12.mo': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/locale/zh_TW/LC_MESSAGES/libapt-pkg4.12.mo’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/doc/libapt-pkg4.12/copyright': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/doc/libapt-pkg4.12/NEWS.Debian.gz’: Read-only file system

dpkg: error while cleaning up:
unable to restore backup version of /usr/share/doc/libapt-pkg4.12/copyright': Read-only file system dpkg: error while cleaning up: unable to restore backup version of /usr/share/doc/libapt-pkg4.12/NEWS.Debian.gz’: Read-only file system
dpkg: error while cleaning up:
unable to restore backup version of /usr/share/doc/libapt-pkg4.12/changelog.gz': Read-only file system dpkg: error while cleaning up: unable to securely remove '/var/lib/dpkg/tmp.ci': Read-only file system dpkg: error while cleaning up: unable to securely remove '/var/lib/dpkg/reassemble.deb': Read-only file system dpkg: error: unable to create new file '/var/lib/dpkg/status-new': Read-only file system E: Sub-process /usr/bin/dpkg returned an error code (2) E: Failed to write temporary StateFile /var/lib/apt/extended_states.tmp osmc@osmc:~$

Please use paste-log to upload this kind of information instead of posting them.
This doesn’t sound like an upgrade problem, either a power supply issue or an issue with the SD cards (even so unlikely if they are both new.

The Power Supply is brand new as well, 2.5A one from Stontronics they rate specially for the RPI3.
I know this sounds like a hardware issue but the SD cards are brand new and I’m having no issues with these SD cards on my card reader.

Here’s some output I managed to grab from journalctl: http://paste.pound-python.org/show/qg0pJATIKdkyQbKMW3mP/

Well I think if you take a look at the log you can see yourself that it is an issue with the SD Card. Are you overclocking?
Maybe provide full logs grab-logs -A maybe we find any other reason than a broken SD Card (are they quality cards?).

Yeah it definately looks like the card is failing by looking at the log.
However the same exact card works just fine for the exact same procedure on a rpi2.
The cards are quality cards, Class 10 Kingston with lifetime warranty.

No overclocking or modifications, just a fresh install that I went directly ahead to update.

The thing about grabbing the logs is that I’m unable to write to the SD card when this happens, so it’s a bit hard to grab a full log.
I could try and see if I can store it in the ram and export it somehow (cp, scp, etc won’t work as I’m unable to run any binaries after the card gets mounted as read only).

The only possible issue I can think off is an issue between the Kingston card and the sdhost driver.
Do you have dtoverlay (mmc or sdhost) on the Pi2?

Kingston and quality do not belong in the same sentence…

The SDHost driver causes issues with some Kingston cards. Reverting to mmc will work, but you won’t be able to use Pi 3’s built in WiFi capabilities

Must be a while since you updated, as SDHost has been the default for some time

It has not been a while since I updated, like I said in my first post I’m using the latest image available on your website: OSMC_TGT_rbp2_20160306.img.gz

Here’s the “grab-logs” logs I managed to collect: http://paste.osmc.io/evecegazoq

As mentioned sdhost driver could be your issue.
Try on the RPi3 to add dtoverlay=mmc to /boot/config.txt.
As Sam mentioned this will make the Wifi not working anymore on the RPi3 but can give you an indication if the driver/card combination is the issue.

I’ll be damned, I had another go at this and using a SiliconPower Elite SD card I had laying around and I’m not experiencing this issue there. Looks like Kingston isn’t as good as I always thought they were.
Thanks for the information guys!