1

How do I access the /boot partition on the SD card so that I can edit the wpa_supplicant.conf file?

  • Just put the card in ANY computer and "edit". NOTE the existing file is NOT in /boot, and any file will be copied and deleted when the Pi boots. – Milliways Aug 2 at 8:22
2

You will need to get access to the wpa_supplicant.conf file located in:

/etc/wpa_supplicant/wpa_supplicant.conf 

Remove and mount the disk in another computer and modify the file..

You can:

-Obtain an HDMI cable for the Pi Zero W, a USB hub to connect mouse and keyboard. Edit through monitor. It's nice to have these 'tools' handy for this reason.

This has happened to me a few times, so I had a modification implemented from following this awesome resource:

http://www.raspberryconnect.com/network

Basically, when the RPi is away from any access points that it uses in wpa_supplicant.conf, it will detect AP no longer available, and automatically create it's own hotspot, so then I can connect to the RPi directly over it's WiFi hotspot. So when my home network is unavailable, I can still connect and ssh into the Pi. This creates a network, and allows other devices to connect as well to this network.

The RPi SD has 2 partitions, one is the FAT boot partition, and the other is the OS with User data etc on ext4 file system. Windows can't read this out the box, so keep that in mind if your only alternative machine to edit SD is a windows, then, a (hindsight) solution, would be to create a symlink of the wpa_supplicant.conf to the FAT side, which Windows will be able to see, assuming Windows is your only other computer to read the RPi SD. But this would need to be done when the RPi is accessible.

At this point it's probably easiest to take the SD to a linux machine, or other capable of reading and writing to that ext4 partition.

2

The boot partition is mounted to the directory /boot so you can just access it, for example with ls /boot.

But you will not find wpa_supplicant.conf there. It is located at /etc/wpa_supplicant/wpa_supplicant.conf.

2

If you're meaning to access it on an operational Raspberry Pi: it's not in /boot, as other have explained.

If you're meaning to create it on an SD card on another computer: /boot is the small MS-DOS partition that shows up under Windows or Mac OS. You have to create the /boot/wpa_supplicant.conf yourself, and it will automatically be moved to the right place when you boot your Raspberry Pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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