dan_fritz
Posts: 13
Joined: Tue Jul 31, 2012 3:36 pm
Location: Belgium
Contact: Website

config.txt reset after reboot

Tue Jul 31, 2012 3:55 pm

Hellow,

After searching around I don't find the solution, so lets post it on the forums!

First I change 3 values in my config.txt file (in /boot) to overclock my raspberry pi, I started with changing the freq to 800Mhz but after I get my issues I also tryed smaller steps.

The problem is that I change the file, reboot the raspberry pi and then when I clock at the file again its completly resetted and my settings are gone, the default config.txt is back in place and no changes happend.

I first thought this happend because I've used settings the pi cant handle, but even changing the basic freq to 720 results in the same problem.

Thanks!
Created of the ArduinoPi, a PHP/Python API for controlling an Arduino with the Raspberry Pi.
More info: http://www.fritz-hut.com/all-projects/arduinopi/

drgeoff
Posts: 8175
Joined: Wed Jan 25, 2012 6:39 pm

Re: config.txt reset after reboot

Tue Jul 31, 2012 4:58 pm

Are you sure you are saving your changes after editing config.txt?

dan_fritz
Posts: 13
Joined: Tue Jul 31, 2012 3:36 pm
Location: Belgium
Contact: Website

Re: config.txt reset after reboot

Tue Jul 31, 2012 9:39 pm

Yes, I use sudo nano /boot/config.txt

then I exit using ctrl + x and saving changes

When I do sudo cat /boot/config.txt I clearly see my changes


I reboot, and the config is back to its default...

Thanks for your reply!
Created of the ArduinoPi, a PHP/Python API for controlling an Arduino with the Raspberry Pi.
More info: http://www.fritz-hut.com/all-projects/arduinopi/

drgeoff
Posts: 8175
Joined: Wed Jan 25, 2012 6:39 pm

Re: config.txt reset after reboot

Tue Jul 31, 2012 9:54 pm

dan_fritz wrote:Yes, I use sudo nano /boot/config.txt

then I exit using ctrl + x and saving changes

When I do sudo cat /boot/config.txt I clearly see my changes


I reboot, and the config is back to its default...

Thanks for your reply!
That's puzzling. The only thing I can think of is to issue the 'sync' command after saving the changes before rebooting.

dan_fritz
Posts: 13
Joined: Tue Jul 31, 2012 3:36 pm
Location: Belgium
Contact: Website

Re: config.txt reset after reboot

Tue Jul 31, 2012 9:57 pm

Found that in the forums and tryed it, no luck at all.

I've also tryed resetting my SD card (reloading the image) starting fresh but still the same happens,

Is there a log of the last boot (and what happens) maybe it will result in a problem/solution

thanks!
Created of the ArduinoPi, a PHP/Python API for controlling an Arduino with the Raspberry Pi.
More info: http://www.fritz-hut.com/all-projects/arduinopi/

drgeoff
Posts: 8175
Joined: Wed Jan 25, 2012 6:39 pm

Re: config.txt reset after reboot

Tue Jul 31, 2012 10:30 pm

You don't say which OS image you have used though I haven't heard that any of them are set to automatically re-write config.txt.

Try this:
1. Boot the RPi and make a simple change to config.txt. Just put '# this is a comment' as the last line. (Don't include the quote marks.)
2. Exit and save.
3. Type 'sudo shutdown -h now'
4. Wait until LEDs stop flashing. (They will not all turn off.)
5. Unplug the power.
6. Remove the SD card, put it in a card reader and plug in to your PC
7. If your PC is a Windows PC it will only see the boot partition with several files including config.txt. Open that and see if the comment line is there. (If your PC is a Linux PC, it will also see the main partition on the SD card.)
8. If the comment line is present, safely remove the SD card from the PC, re-insert in RPi and boot it. Then 'nano /boot/config.txt'. Is the comment line still there?

lb
Posts: 232
Joined: Sat Jan 28, 2012 8:07 pm

Re: config.txt reset after reboot

Tue Jul 31, 2012 10:59 pm

This is a known bug, probably rooted in the SDHCI driver, and I'm currently investigating it. The FAT filesystem causes single block writes, and these appear to be problematic (i.e. the writes silently don't succeed) with some SD cards. Dataloss bugs are not acceptable.

More discussion in http://www.raspberrypi.org/phpBB3/viewt ... 0&start=25.

drgeoff
Posts: 8175
Joined: Wed Jan 25, 2012 6:39 pm

Re: config.txt reset after reboot

Tue Jul 31, 2012 11:18 pm

lb wrote:This is a known bug, probably rooted in the SDHCI driver, and I'm currently investigating it. The FAT filesystem causes single block writes, and these appear to be problematic (i.e. the writes silently don't succeed) with some SD cards. Dataloss bugs are not acceptable.

More discussion in http://www.raspberrypi.org/phpBB3/viewt ... 0&start=25.
Aha!

dan_fritz
Posts: 13
Joined: Tue Jul 31, 2012 3:36 pm
Location: Belgium
Contact: Website

Re: config.txt reset after reboot

Wed Aug 01, 2012 8:30 am

drgeoff wrote:You don't say which OS image you have used though I haven't heard that any of them are set to automatically re-write config.txt.

Try this:
1. Boot the RPi and make a simple change to config.txt. Just put '# this is a comment' as the last line. (Don't include the quote marks.)
2. Exit and save.
3. Type 'sudo shutdown -h now'
4. Wait until LEDs stop flashing. (They will not all turn off.)
5. Unplug the power.
6. Remove the SD card, put it in a card reader and plug in to your PC
7. If your PC is a Windows PC it will only see the boot partition with several files including config.txt. Open that and see if the comment line is there. (If your PC is a Linux PC, it will also see the main partition on the SD card.)
8. If the comment line is present, safely remove the SD card from the PC, re-insert in RPi and boot it. Then 'nano /boot/config.txt'. Is the comment line still there?
Thanks I've tryed that one, I'm using 2012-07-15-wheezy-raspbian.zip OS btw.

I also did the following, on my windows 7 pc, added a comment and then put the sd back into the pi, after boot, I checked and it was still there (really dont know if the PI used the settings, how do i check the current frequency of the ARM?

Then I shutdown the PI down, took out the SD card and my comment was still there! So It seems that making changes to the config.txt on the Pi itself wont work, but doing it on an another computer does work.

So yea my problem is resolved but it should be possible to change the config in the pi...

Thanks!
Created of the ArduinoPi, a PHP/Python API for controlling an Arduino with the Raspberry Pi.
More info: http://www.fritz-hut.com/all-projects/arduinopi/

drgeoff
Posts: 8175
Joined: Wed Jan 25, 2012 6:39 pm

Re: config.txt reset after reboot

Wed Aug 01, 2012 10:23 am

Yes it should be possible to change config.txt on the RPi, and for many people it is. The link in lb's post expounds on the problem with the SD card driver which is causing the behaviour you are experiencing. I'm sure this will be fixed. In the meantime, if you want to make any changes to files in /boot you should do that on another computer.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5140
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: config.txt reset after reboot

Wed Aug 01, 2012 12:00 pm

Anyone suffereing from this issue, please test the kernel provided here:
http://www.raspberrypi.org/phpBB3/viewt ... 15#p138315

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: config.txt reset after reboot

Fri Aug 03, 2012 7:16 pm

Hello,

nano

You should use Crl + o and Rtn to write the changes and then Ctrl + x to exit.

Regards

Return to “Troubleshooting”

Who is online

Users browsing this forum: lorenw74, NOsen and 49 guests