1

Hello I am very new to Raspberry pi having got a Raspi 0 only a few days ago. The only way I know to access any of the code is by ssh-ing from my laptop into the pi, but it worked and I was very happy with it. But then I wanted to go to another house and have the pi automatically connect to both my internet and the other house's. I followed this tutorial and ended up modifying my wpa_supplicant.conf and interfaces files, only to end up locked out of my pi because I could no longer ssh.

I only have Windows computers so I ended up having to do the following to change the files back to normal:

  1. Downloaded virtualbox following this tutorial
  2. Downloaded the virtualbox extension package for my version of virtualbox
  3. Partially followed this tutorial of how to read an SD card into virtualbox
    • NOTE: the USB SD card reader was required
    • NOTE: my computer never checkmarked the USB, it actually said that an error occured, but when I typed the code sudo fdisk -l I could see my USB SD reader
  4. I then mounted the card following this tutorial and modified my files before ejecting and celebrating

I ended up fixing my pi and I can now ssh back into it, but this was incredibly annoying to do, and I am wondering if there is a better way that I just missed.

2
  • 1
    For most use cases, you never need to mess with interfaces file - all you really need to change for accessing wireless is wpa_supplicant.conf Commented Jul 28, 2020 at 0:28
  • Shut down your RPi and power off. Pull the SDCard. Insert in your Windows system's card reader and edit E:\wpa_supplicant.conf with a good version as per the instructions at raspberrypi.org/documentation/configuration/wireless/…
    – Dougie
    Commented Jul 29, 2020 at 2:05

2 Answers 2

2

You can put a wpa_supplicant.conf in the boot partition, and it will overwrite any existing.

You can configure wpa_supplicant.conf for multiple networks.

See How to set up networking/WiFi

There is NO WAY to change interfaces, but then there is NO REASON to ever modify it. Just delete it - effectively on Stretch and Buster it does NOTHING.

NOTE that tutorial you linked is hopelessly OBSOLETE, and would perform significantly worse than the default!

I often wonder why so many seem to find poor tutorials by unknown authors when the Foundation has up to date correct instructions.

1
  • 1
    boot sector ... boot partition? Commented Jul 28, 2020 at 4:21
2

Of course there are better solutions for troubleshooting instead of following four (outdated?) tutorials. One of it is to use a Linux box instead of a MS Windows computer. You can just boot a live CD of one of the popular Distributions like Debian, Ubuntu or what you like. I would prefer Debian because the Raspberry Pi OS is a flavor of Debian. Now you can direct access all partitions and files on the SD Card using the card reader and mount the partitions on the SD Card.

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.