Chris D
Posts: 195
Joined: Tue Sep 20, 2016 11:27 am

STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:15 pm

Wow, another odd problem.

I did an image backup of this SD last week. It runs fine, my program that is auto loaded runs as it should, HOWEVER

I just copied a new file onto the desktop - all seemed normal
I edited LXDE-PI to prevent auto running - all seemed normal

I rebooted,

Those changes were gone as if I never did them?

After the second attempt and the same result, I am pretty sure something is really messed up.

Any suggestions as to what I did that could cause such crazy behaviour?

This is an RPI3 with Stretch.

I tried some google searches and couldn't find similar problems posted anywhere.

Chris D

ejolson
Posts: 5107
Joined: Tue Mar 18, 2014 11:47 am

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:17 pm

Chris D wrote:
Sat Feb 15, 2020 3:15 pm
Wow, another odd problem.

I did an image backup of this SD last week. It runs fine, my program that is auto loaded runs as it should, HOWEVER

I just copied a new file onto the desktop - all seemed normal
I edited LXDE-PI to prevent auto running - all seemed normal

I rebooted,

Those changes were gone as if I never did them?

After the second attempt and the same result, I am pretty sure something is really messed up.

Any suggestions as to what I did that could cause such crazy behaviour?

This is an RPI3 with Stretch.

I tried some google searches and couldn't find similar problems posted anywhere.

Chris D
Did you toggle read-only mode in the rpi config program or another way?

Chris D
Posts: 195
Joined: Tue Sep 20, 2016 11:27 am

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:20 pm

If I did, I have no idea how I could have done that?

What should I look at to check this?

User avatar
croston
Posts: 706
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:21 pm

I've had something similar happen before. Turned out that it was a strange SD card fault. Clone your SD card and it will probably be OK on the new one.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:29 pm

Yeah, I've only ever seen this on faulty/failing SD cards. What kind of card do you have? Have you tested it on another computer to see if changes can be permanently written to it?

User avatar
TimG
Posts: 297
Joined: Tue Apr 03, 2012 12:15 am
Location: Switzerland

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:30 pm

ejolson wrote:
Sat Feb 15, 2020 3:17 pm
Did you toggle read-only mode in the rpi config program or another way?
Another possibility is that the SD card is damaged and has turned read-only. I’ve had a couple of memory cards do this after a power brown-out. It’s not immediately obvious because no errors are generated, and as long as the new files remain in the cache it appears as if they have been written as normal.

To test, try dropping the cache and see if the files disappear:

Code: Select all

echo 3 | sudo tee /proc/sys/vm/drop_caches

klricks
Posts: 7118
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 3:41 pm

Likely your card has gone into read only mode. The controller on the SD card will do this in order to preserve existing data when impending failure is sensed. This is so you don't loose all your photos in a camera etc.
This feature is not reversible.
If so then you can use the SD copy tool and copy your SD onto a new SD card.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Chris D
Posts: 195
Joined: Tue Sep 20, 2016 11:27 am

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 4:13 pm

Wow, Seems like the general consensus is a failed SD card.

It makes sense seeing that I just did the image copy of it which means I handled it.

For what it is worth, it is (was) a:
Lexar633x
16GB Micro[1] HC I

Luckily everything is backed up both as an image and my Python programs are copied in native format to the cloud.

Thanks everyone, I am in the process of setting up a new SD card.

Chris

User avatar
TimG
Posts: 297
Joined: Tue Apr 03, 2012 12:15 am
Location: Switzerland

Re: STRANGE -- make changes - reboot - changes are gone!???

Sat Feb 15, 2020 4:45 pm

Here's a little script that my Pis run daily. It tests the filesystem, looks for kernel errors, and sends a warning email if anything is wrong.

Code: Select all

#!/bin/bash

# email parameters
email="sendEmail -f me@mail.com -t me@mail.com -s smtp.mail.com:587 -o tls=yes -xu username -xp password -q"
subj="Error from $HOSTNAME"
msg="error reported by $HOSTNAME at $(date)"

# look for critical kernel errors
[[ $(dmesg -xl crit) ]] && \
  eval "$email -u '$subj' -m 'Critical kernel $msg'"     # look for critical errors in dmesg
# to clear dmesg : $ sudo dmesg -C

# check filesystem hasn't become read-only
teststring=$(date)
testfile=$(mktemp -p $HOME)
echo $teststring > $testfile                             # make a test file
sync; sync                                               # wait for disc-sync to complete
echo 3 | sudo tee /proc/sys/vm/drop_caches &> /dev/null  # drop caches
echo $teststring | diff - $testfile &> /dev/null || \
  eval "$email -u '$subj' -m 'File-system $msg'"         # check the contents of the test file
rm $testfile &> /dev/null

User avatar
Imperf3kt
Posts: 3559
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: STRANGE -- make changes - reboot - changes are gone!???

Sun Feb 16, 2020 5:34 am

Chris D wrote:
Sat Feb 15, 2020 4:13 pm
For what it is worth, it is (was) a:
Lexar633x
16GB Micro[1] HC I
Lexar do not list a 633x card in 16GB, lowest storage capacity they offer is 32GB - your card is likely a fake.
That doesn't mean they've never sold them in the past, just that they don't sell them now.

https://www.lexar.com/portfolio_page/hi ... s-i-cards/
55:55:44:44:4C
52:4C:52:42:41

MisterEd
Posts: 137
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: STRANGE -- make changes - reboot - changes are gone!???

Sun Feb 16, 2020 6:40 am

Imperf3kt wrote:
Sun Feb 16, 2020 5:34 am
Chris D wrote:
Sat Feb 15, 2020 4:13 pm
For what it is worth, it is (was) a:
Lexar633x
16GB Micro[1] HC I
Lexar do not list a 633x card in 16GB, lowest storage capacity they offer is 32GB - your card is likely a fake.
That doesn't mean they've never sold them in the past, just that they don't sell them now.

https://www.lexar.com/portfolio_page/hi ... s-i-cards/
The following is for sale on Amazon:
Lexar High-Performance 633x MicroSDHC UHS-I Cards: 16GB, 32GB
Lexar High-Performance 633x MicroSDXC UHS-I Cards: 64GB, 128GB, 256 GB, 512 GB

What is on Lexar's website is what they are making now. Things previously made will remain for sale by sellers until their supply runs out.

Return to “General discussion”