From charlesreid1

No edit summary
No edit summary
Line 1: Line 1:
Wipe the SD cards
==Wipe SD Cards==


Set up wpa supplicant config file
Wipe SD cards and install raspbian


https://charlesreid1.com/wiki/Ubuntu/Bespin#Configure_WPA_Supplicant
==Mount SD Cards==


Install a custom wpa supplicant startup service based on the one provided
Mount the SD cards as a local filesystem on a Linux box


https://charlesreid1.com/wiki/Ubuntu/Bespin#WPA_Supplicant_Startup_Service
Now, if you want to modify the file <code>/foo/bar</code>, you can edit the file on the SD card at <code>/media/ubuntu/rootfs/foo/bar</code>


<pre>
==Wifi==
sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/wpa_supplicant.service


sudo vim /etc/systemd/system/wpa_supplicant.service
Set up wpa supplicant config file for your local wifi network
</pre>


Change this line from this:
https://charlesreid1.com/wiki/Ubuntu/Bespin#Configure_WPA_Supplicant


<pre>
<pre>
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
 
network={
    ssid="YOURWIFINETWORK"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="YOURWIFIPASSWORD"
}
</pre>
</pre>


to this:
==Network Interfaces==
 
Next set up the WPA supplicant service to automatically start for our wifi device


<pre>
Update the contents of your network interfaces file to look like this:
ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
</pre>


Also, remove the following line if it is present:
<code>/etc/network/interfaces</code>


<pre>
<pre>
Alias=dbus-fi.w1.wpa_supplicant1.service # DELETE ME!
source-directory /etc/network/interfaces.d
</pre>


Enable it manually by doing this:
allow-hotplug lo
iface lo inet loopback


<pre>
allow-hotplug wlan0
cd /media/charles/rootfs/etc/systemd/system/multi-user.target.wants
iface wlan0 inet manual
ln -fs /etc/systemd/system/wpa_supplicant.service
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
</pre>
</pre>

Revision as of 23:46, 15 July 2020

Wipe SD Cards

Wipe SD cards and install raspbian

Mount SD Cards

Mount the SD cards as a local filesystem on a Linux box

Now, if you want to modify the file /foo/bar, you can edit the file on the SD card at /media/ubuntu/rootfs/foo/bar

Wifi

Set up wpa supplicant config file for your local wifi network

https://charlesreid1.com/wiki/Ubuntu/Bespin#Configure_WPA_Supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YOURWIFINETWORK"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="YOURWIFIPASSWORD"
}

Network Interfaces

Next set up the WPA supplicant service to automatically start for our wifi device

Update the contents of your network interfaces file to look like this:

/etc/network/interfaces

source-directory /etc/network/interfaces.d

allow-hotplug lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf