G4USP

Page last updated: 11/08/2014

R-Pi ConfigurationFile guides from elinux.org


How to edit the boot configuration file for Raspberry Pi

 

A quick overview

While booting up, the Raspberry Pi reads some configuration parameters from the SD card. These parameters are stored in a file named config.txt and located in the /boot partition at /boot/config.txt. You can edit this configuration file from a Mac, from a Linux PC, or from within the Raspberry Pi itself. Depending on the partitioning scheme of your SD card, the /boot partition may not be visible to Windows PCs. In this case, you will need use either a Mac, a Linux PC or the Raspberry Pi to edit the configuration file.

This configuration file contains instructions which are necessary to setup the display. If you have severe problems with the display, you will need to connect the SD card to a PC so that you can edit the configuration file. If the display is working but you wish to make minor adjustments, you may find it more convenient to edit the file from within the Raspberry Pi itself.

How to edit from OS X

This method is most useful if you cannot see anything on the display of the Raspberry Pi.

How to edit from the Raspberry Pi

This method is most useful if you can see the display of the Raspberry Pi and you wish to make minor adjustments.

sudo nano /boot/config.txt
Press Control-x
Press y
Press [enter]
sudo reboot

NOTE: You may find that your changes to config.txt disappear after a reboot. This is a very rare problem and seems to depend on the type of SD card. In this case, use a Windows/Linux/OS X PC to edit the file, see instructions above.

How to edit from a Windows PC

This method is most useful if you cannot see anything on the display of the Raspberry Pi.

NOTE: Depending on the partitioning scheme of your SD card, you may not be able to edit the configuration file using Windows.

An example configuration file

This example show how to reduce the size of the display to prevent text spilling off the edge of the screen.

# Uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# Uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan.
#disable_overscan=1

# Uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border.
overscan_left=20
overscan_right=20
overscan_top=20
overscan_bottom=20

# Uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# Uncomment if an HDMI display is not detected and composite is being output.
#hdmi_force_hotplug=1

# Uncomment to force a specific HDMI mode (this will force VGA).
#hdmi_group=1
#hdmi_mode=1

# Uncomment to force an HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes.
#hdmi_drive=2

# Uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display.
#config_hdmi_boost=4

# Uncomment for composite PAL
#sdtv_mode=2

# Uncomment to overclock the ARM. 700 MHz is the default.
#arm_freq=800

# For more options, see http://elinux.org/RPi_config.txt

HOME