-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
**Raspbian Headless installation:** | ||
# Raspbian Headless installation: | ||
|
||
- Download latest raspbian: https://www.raspberrypi.org/downloads/ | ||
- Flash it on SD Card using Etcher: https://www.balena.io/etcher/ (Windows) | ||
- Eject the card and plug it in again | ||
- Create new file in boot directory: wpa_supplicant.conf | ||
1 [Download latest raspbianhttps](://www.raspberrypi.org/downloads/) | ||
2 Flash it on SD Card using [Etcher](https://www.balena.io/etcher/ (Windows)) | ||
3 Eject the card and plug it in again | ||
4 Create new file in boot directory: `wpa_supplicant.conf` | ||
- Write to this file: | ||
```bash | ||
country=PL | ||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | ||
update_config=1 | ||
|
@@ -13,45 +14,50 @@ network={ | |
psk="aVeryStrongPassword" | ||
key_mgmt=WPA-PSK | ||
} | ||
- Create an empty file called ssh (without extension) | ||
``` | ||
- Create an empty file called `ssh` (without any extension) | ||
- Insert card to raspberry, wait for it to connect | ||
- Switch to Linux | ||
- Using Linux program nmap or in your router details find raspberrys IP address | ||
- Connect to SSH using this command: ssh pi@<IP> | ||
(replace <IP> with raspberryPi adress, e.g. ssh [email protected]) | ||
- Connect to SSH using this command: `ssh pi@<IP>` | ||
(replace <IP> with raspberryPi adress, e.g. `ssh [email protected]`) | ||
- Login using password: raspberry | ||
That's it! | ||
|
||
You can exit using the command: exit | ||
You can exit using the command: `exit` | ||
And format your sd card using program DISKPART from your cmd (Windows), in cmd: | ||
> diskpart | ||
> list disk | ||
> select disk x | ||
> clean | ||
> create partition primary | ||
```bash | ||
diskpart | ||
list disk | ||
select disk x | ||
clean | ||
create partition primary | ||
``` | ||
Links: | ||
https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html | ||
https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md | ||
|
||
|
||
**Running script at boot:** | ||
|
||
> sudo nano /etc/rc.local | ||
And add your command before "exit 0", for instace: | ||
|
||
> sudo python /home/pi/blink.py | ||
|
||
**To create a backup of SD Card:** | ||
|
||
> sudo fdisk -l </br> | ||
will list all disks with their names and localizations </br> | ||
|
||
> sudo dd if=/dev/mmcblk0 of=~/beacan1.img </br> | ||
<https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html> | ||
<https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md> | ||
# Running script at boot: | ||
``` | ||
sudo nano /etc/rc.local | ||
``` | ||
And add your command before *exit 0*, for instace: | ||
``` | ||
sudo python /home/pi/blink.py | ||
``` | ||
# To create a backup of SD Card: | ||
``` | ||
sudo fdisk -l </br> | ||
``` | ||
will list all disks with their names and localizations | ||
``` | ||
sudo dd if=/dev/mmcblk0 of=~/beacan1.img | ||
``` | ||
will copy everything to our new backup image. | ||
if= is a directory of SD Card (from previous command) and of= is a output directory | ||
from `dd` man page: | ||
> if=file Read input from file instead of the standard input. | ||
> of=file Write output to file instead of the standard output. Any regular output file is truncated unless the notrunc conversion value is specified. If an initial portion of the output file is seeked past (see the oseek operand), the output file is truncated at that point. |