If I try to overclock my Pi, I want to go up to the point where the Pi won't boot anymore, or won't be stable enough. At this point, I want to come back to the latest known good settings for the /boot/config.txt file. How can I do this easily? Do I have to restore the SDCard from a backup?
The raspi-config tool, at least in recent Raspbian releases (September 19th, 2012), allows you to hold the Shift key during boot to return to a non-overclocked state. This worked for me when my device didn't finish booting at 1000MHz.
You can now choose from one of five overclock presets in raspi-config, the highest of which runs the ARM at 1GHz. The level of stable overclock you can achieve will depend on your specific Pi and on the quality of your power supply; we suggest that Quake 3 is a good stress test for checking if a particular level is completely stable. If you choose too high an overclock, your Pi may fail to boot, in which case holding down the shift key during boot up will disable the overclock for that boot, allowing you to select a lower level.
From http://www.raspberrypi-spy.co.uk/2012/06/overclocking-benchmarking-the-raspberry-pi/, I learned that the
/boot directory actually resides in a specific partition that is readable directly from Windows (and probably many other OSes...).
So I just have to insert the card in my laptop, edit the file, et voilà...
There is "safe mode" boot option in raspberry Pi firmware for some time now. To enable it, you have to use a jumper to do short between pins 5 and 6 on P1 header. This makes bootloader code to almost ignore content of config.txt (except from
avoid_safe_mode option) using default values and try to boot with
kernel.img if it's not available).
kernel_emergency.img boots to minimalistic busybox based initramfs. It mounts /boot/ by default so you can easily edit it and restore your RaspberryPi to normal boot.
More informations (including photo) on this thread.