« Raspberry Pi/Installation » : différence entre les versions
Aller à la navigation
Aller à la recherche
Ligne 6 : | Ligne 6 : | ||
Site de récupération des sources, 32 bit, 64 bit, avec bureau, léger (lite)... : | Site de récupération des sources, 32 bit, 64 bit, avec bureau, léger (lite)... : | ||
* https://www.raspberrypi.com/software/operating-systems/ | * https://www.raspberrypi.com/software/operating-systems/ | ||
=== Exemple === | |||
Version 32 bit : | |||
* Raspberry Pi OS with desktop : https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2023-02-22/2023-02-21-raspios-bullseye-armhf.img.xz | |||
* Raspberry Pi OS Lite : https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-02-22/2023-02-21-raspios-bullseye-armhf-lite.img.xz | |||
== Installer l'image == | == Installer l'image == |
Dernière version du 11 avril 2023 à 21:25
L'installation de Raspberry Pi, nécessites plusieurs étapes.
Récupérer l'image
Site de récupération des sources, 32 bit, 64 bit, avec bureau, léger (lite)... :
Exemple
Version 32 bit :
- Raspberry Pi OS with desktop : https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2023-02-22/2023-02-21-raspios-bullseye-armhf.img.xz
- Raspberry Pi OS Lite : https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-02-22/2023-02-21-raspios-bullseye-armhf-lite.img.xz
Installer l'image
Personnaliser pour une utilisation directe en wifi
Fichier issue.txt
Raspberry Pi reference 2021-10-30 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 288b21fc27e128ea6b330777aca68e0061ebf4fe, stage5
Fichier cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=ceb251fe-02 rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles systemd.run=/boot/firstrun.sh systemd.run_success_action=reboot systemd.unit=kernel-command-line.target
Fichier firstrun.sh
#!/bin/bash set +e CURRENT_HOSTNAME=`cat /etc/hostname | tr -d " \t\n\r"` echo raspberrypi >/etc/hostname sed -i "s/127.0.1.1.*$CURRENT_HOSTNAME/127.0.1.1\traspberrypi/g" /etc/hosts FIRSTUSER=`getent passwd 1000 | cut -d: -f1` FIRSTUSERHOME=`getent passwd 1000 | cut -d: -f6` if [ -f /usr/lib/userconf-pi/userconf ]; then /usr/lib/userconf-pi/userconf 'pi' '$5$cDUP4vmx6h$t5kjDUXjpPw3rMUQvMvdTf9JynmLgeSB0niXzGTarO0' else echo "$FIRSTUSER:"'$5$cDUP4vmx6h$t5kjDUXjpPw3rMUQvMvdTf9JynmLgeSB0niXzGTarO0' | chpasswd -e if [ "$FIRSTUSER" != "pi" ]; then usermod -l "pi" "$FIRSTUSER" usermod -m -d "/home/pi" "pi" groupmod -n "pi" "$FIRSTUSER" if grep -q "^autologin-user=" /etc/lightdm/lightdm.conf ; then sed /etc/lightdm/lightdm.conf -i -e "s/^autologin-user=.*/autologin-user=pi/" fi if [ -f /etc/systemd/system/getty@tty1.service.d/autologin.conf ]; then sed /etc/systemd/system/getty@tty1.service.d/autologin.conf -i -e "s/$FIRSTUSER/pi/" fi if [ -f /etc/sudoers.d/010_pi-nopasswd ]; then sed -i "s/^$FIRSTUSER /pi /" /etc/sudoers.d/010_pi-nopasswd fi fi fi systemctl enable ssh cat >/etc/wpa_supplicant/wpa_supplicant.conf <<'WPAEOF' country=FR ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev ap_scan=1 update_config=1 network={ ssid="Orange-925C" psk=f04e6435ff99a1b1e7e66eb0c155918bf71724048e224cb56efd6c715421d598 } WPAEOF chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf rfkill unblock wifi for filename in /var/lib/systemd/rfkill/*:wlan ; do echo 0 > $filename done rm -f /etc/localtime echo "Europe/Paris" >/etc/timezone dpkg-reconfigure -f noninteractive tzdata cat >/etc/default/keyboard <<'KBEOF' XKBMODEL="pc105" XKBLAYOUT="fr" XKBVARIANT="" XKBOPTIONS="" KBEOF dpkg-reconfigure -f noninteractive keyboard-configuration rm -f /boot/firstrun.sh sed -i 's| systemd.run.*||g' /boot/cmdline.txt exit 0
Connexion SSH
Pour une connexion SSH, une fois que le système est démarré et s'est autoconfiguré :
ssh 192.168.1.29 -l pi
Avec :
- l'adresse IP affectée automatiquement par le routeur (box Orange) ;
- l'option pour indiquer le compte
pi
à utiliser :-l pi