I have a pre-installed micro SD card with NOOBs. But the instructions on the internet say to use a HDMI to VGA cable, I need to un-comment two lines of code in the config.txt file:

#hdmi_force_hotplug =1
#hdmi_drive =2

I cannot find any config.txt file on my pre-installed files that comes with the canakit. How do I solve this problem?

1 Answer 1


When booting the Pi you need to hold down the SHIFT key.

This boots the Pi into recovery mode and you will be able to access the config.txt file as shown in the picture below. There's a different config.txt file for each OS, so you need to select the OS you are using.

enter image description here

For future reference if you are not using a NOOBs install:

Open a terminal window and run the following command:

sudo nano /boot/config.txt

This will open the config.txt file in an editor called nano. If you scroll through the text file you should be able to find the two lines:

#hdmi_force_hotplug =1
#hdmi_drive =2

Removing the # un-comments those lines. After doing that you need to exit the file with saving.

  • You presumably have not tried NOOBS - there is NO config.txt on the boot partition (as distinct from that mounted on /boot after running Raspbian)
    – Milliways
    Commented Jan 8, 2018 at 0:35
  • @Milliways I've edited the answer to reflect that.
    – Darth Vader
    Commented Jan 8, 2018 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.