MX on Linux: Difference between revisions

4,867 bytes added ,  30 August 2020
m
If you want to be able to use the micro-SD card in other devices (like your PC), you may need to also buy an adapter which allows the micro-SD card to be plugged into a standard SD socket. This may be included if you buy a micro-SD card not sold specifically for the Pi.
 
== The Operating System ==
==== Notes by ExperiMentor (in Switzerland) ====
 
As said before, a number of operating systems can be installed on your Pi, even Windows. I leave it to you to read, on-line, how to install the operating system you choose, normally the instructions will be found from where you download the system you have selected.
 
If you have a micro-SD card pre-installed with an operating system, you are ready to go!
 
If you have a micro-SD card pre-installed with NOOBS, as described above, the first boot will install the operating system. By default, it will be the latest Raspbian OS when the card was manufactured.
 
If you want to install Raspbian, and it is not pre-installed, download from https://www.raspberrypi.org/downloads. That imager is run on any device, say your pc, and then you select '''write''' to save it onto the micro-SD card (don't forget this overwrites anything already on the card). This should work without a need to format the card first,(but if you do need to format it, do so using a SD card formatter, not the Windows format tool). After this image has been stored it will have created two partitions (one the boot partition can be accessed by Windows, but the larger partition is invisible to Windows).
 
== Pre-configuring the Pi for headless operation ==
 
You can store files in the boot partition of the micro-SD card that can be accessed by Windows. When the card is inserted in a Pi, these two files will be removed from that partition, one will switch on a setting that is by default off, the other file will be moved to a new location and enable wireless connection to your local network.
 
=== Secure Shell Home ===
 
Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. By default, this optional way for another device to see your PI is turned off. You can turn it on by the configuration application on your Pi, but you may want it turned on as your Pi boots up and you can do that by adding a file to your micro-SD card.
 
The file must be named "SSH" with those three letters in capitals, but with no file extension and no contents. On a Windows PC, if you right click (while viewing the boot directory on the card) there is an option called '''New''' and if you select ''a text file'' it will create an empty file with the extension '''.txt'''. (In windows there is an option to hide extensions which is on by default, so you may need to deselect this option ['''New''' menu -> ''Options''] to see this extension). On Windows you can open the file using Notepad to verify it is empty, if you gave accidentally created a file of another type like word processing it will be full of characters some of which do not display. Anyway, you must remove any extension from the file name so it is really just '''SSH'''.
 
When the card is inserted into your Pi, on boot this file will be removed and the SSH option will be enabled.
 
=== Wireless Network ===
 
Again, create a new file, again if you are using Windows you can create it as a text file and then replace the '''.txt''' extension with a ''.conf'' extension, store it in the boot directory on your micro-SD card under the name '''wpa_supplicant.conf'''.
 
Using a text editor that won't add any unwanted control characters, add the following text using UTF-8 encoding:
<pre>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
 
network={
ssid="YourNetwork"
psk="YourNetworkPassword"
key_mgmt=WPA-PSK
}</pre>
 
*Obviously, if you are not in United Kingdom, you will replace '''GB''' by the country code that applies to you.
*Within the first set of quotes, replace '''YourNetwork''' by whatever ''Service Set Identifier'' is used for your wireless network. You may have typed this into your mobile phone. It may be shown on a card that slips into a slot on your hub or router. Whatever it is, and it can be up to 32 characters (letters, numbers, and symbols), type it within the double quotes. Some routers come with a default SSID that is the manufacturer's name, and leave it to you to pick a SSID that is unique to you using up to 32 characters to personalise it.
*Within the next set of quotes, which relate to the replace '''YourNetworkPassword''' by whatever Pre-Shared-Key (password) is used for your wireless network. You may have typed this into your mobile phone. Hopefully, you have changed it from whatever was shown as the initial password on the card that slips into a slot on your hub or router (even if all you have done is add a prefix or suffix that means something to you).
*Most wireless networks will use Wi-Fi Protected Access (WPA) or (from 2006) Wi-Fi Protected Access II (WPA2) protocols, so '''WPA-PSK''' is correct for you. Note that your Pi is only able to use these protocols. The earlier Wired Equivalent Privacy (WEP) was officially withdrawn in 2004 as too easy to crack, so it is not supported on a new Pi.
 
Should you wish to set up your Pi with several network definitions, please see [https://cumulus.hosiene.co.uk/viewtopic.php?p=139422#p139422 Notes by ExperiMentor] (in Switzerland)
 
These comprehensive notes describe how to install Cumulus MX on a Pi Zero, using a PC to do some of the work:
* Right click and select ‘New’, ‘Text document’. Change its name to wpa_supplicant.conf (deleting the .txt extension; you need to make a file called wpa_supplicant.conf not wpa_supplicant.conf.txt). Click ‘Yes’ to ‘Are you sure you want to change the extension?’
* Right click on this new file and select ‘Open with Notepad’ or ‘Open with …’ then select Notepad. Enter the following content exactly as below (copy and paste) then edit your country code (if needed), WiFi network’s SSID and password: NOTE: Change GB as needed to be the code for your country. The quote marks should appear in the file, that is ssid="YourNetwork" not ssid=YourNetwork . Same for psk.
<pre>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
 
network={
ssid="YourNetwork"
psk="YourNetworkPassword"
key_mgmt=WPA-PSK
}</pre>
 
* Not essential, but I like to keep copies of both those files for future use. They can be on the SD card with different names eg ‘SSH - Copy’ and ‘wpa_supplicant.conf - Copy’ as well as on your PC
5,838

edits