Projet

Général

Profil

Install Operating system on raspberry pi 0w » Historique » Version 10

openbeelab, 02/02/2019 19:08

1 2 openbeelab
# Install Operating system on raspberry pi 0w
2 1 guillaume.devoyon
3 2 openbeelab
To install Operating system on Raspberry pi there are many website describing how to do. For french noobies, better explanations here : https://edutechwiki.unige.ch/fr/Installation_de_Raspbian
4 1 guillaume.devoyon
5 2 openbeelab
## Raspbian Lite
6
7 1 guillaume.devoyon
The steps are classic :
8
9 6 openbeelab
Dowloading image from https://www.raspberrypi.org/downloads/raspbian/ and download the "Raspbian Stretch Lite" version. We will not use X servers and other desktops tools. Just console.
10 2 openbeelab
11 7 openbeelab
    wget https://downloads.raspberrypi.org/raspbian_lite_latest
12 2 openbeelab
13 6 openbeelab
unrar the .zip
14 2 openbeelab
15 7 openbeelab
    tar -xvf /my/raspbian/iso.zip
16 2 openbeelab
17 6 openbeelab
Install it on SDcard from your desktop pc https://www.raspberrypi.org/documentation/installation/installing-images/
18 2 openbeelab
19 9 openbeelab
    dd bs=512 if=/iso/place/on/my/computer of=/dev/mysdcard conv=sync
20 2 openbeelab
21 6 openbeelab
activate ssh, to create the ssh file in boot to activate it
22 4 openbeelab
23 7 openbeelab
    $ touch /Volumes/boot/ssh
24 4 openbeelab
  
25 6 openbeelab
activate ssh by usb,
26 2 openbeelab
27 4 openbeelab
edit config.txt @ the root of the sd card and add "dtoverlay=dwc2" or directly
28 2 openbeelab
29 7 openbeelab
    echo "dtoverlay=dwc2" >> /path/to/my/sd/card/config.txt
30
    echo "modules-load=dwc2,g_ether" >> /path/to/my/sd/card/cmdline.txt
31 10 openbeelab
32
edit the wifi config file to set your personnal SSID and psswd
33
    
34
    vim /media/$USER/rootfs/etc/wpa_supplicant.conf
35
36
add : 
37
38
    country=GB
39
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
40
update_config=1
41
42
network={
43
    ssid="MyWiFiNetwork"
44
    psk="password123"
45
}
46 4 openbeelab
   
47 10 openbeelab
48 6 openbeelab
eject sdcard : 
49 4 openbeelab
50 7 openbeelab
    $ sudo diskutil eject /dev/mmcbbtruc0
51
    Password:
52
    Disk /dev/mmcbbtruc0 ejected`
53 4 openbeelab
54 6 openbeelab
start pi0 : put the sdcard in pi0 and plug it with usb to your computer
55 4 openbeelab
56 8 openbeelab
connect to pi0 (default psswd is raspberry)
57 4 openbeelab
58 1 guillaume.devoyon
    ssh pi@raspberrypi.local
59 8 openbeelab
60
extend file system
61
62
    $ sudo raspi-config
63
64
in "7 Advanced options", select "A1 Expand filesystem", when operation done, reboot and reconnect to ssh.
65
66
update packages
67
68
    $ sudo apt-get update
69
    $ sudo apt-get upgrade
70
71
change password
72
73
    passwd
74
75
76 2 openbeelab
77
78
79
## Buildroot
80
81
Buildroot is a tool that help to build Linux embedded dedicated system. Basic tutorial here : https://code4pi.fr/2014/03/creation-dune-custom-image-pour-votre-raspberry-pi/