tech:notes_raspberry
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:notes_raspberry [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:notes_raspberry [2026/06/02 11:50] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes Raspberry | ||
| + | |||
| + | Voir : | ||
| + | * [[Notes raspberry light]] | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | Voir aussi : | ||
| + | * Berryboot | ||
| + | * [Read Only SD et Watch dog reset](https:// | ||
| + | * ZimaBoard | ||
| + | |||
| + | |||
| + | ## Matériel | ||
| + | |||
| + | ### Carte SD | ||
| + | |||
| + | Prendre au moins une class 10 | ||
| + | ou 90 Mo/s et 32GB | ||
| + | |||
| + | |||
| + | ## Install / Config | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * [Raspberry Pi 4 Bootloader Firmware Updating / Recovery Guide](https:// | ||
| + | |||
| + | Utilitaire de configuration | ||
| + | ~~~bash | ||
| + | sudo raspi-config | ||
| + | ~~~ | ||
| + | |||
| + | Mise-à-jour EEPROM | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | # | ||
| + | FIRMWARE_RELEASE_STATUS=" | ||
| + | # | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | sudo rpi-update | ||
| + | ~~~ | ||
| + | |||
| + | Exemple rotation écran | ||
| + | |||
| + | `/ | ||
| + | ~~~ini | ||
| + | display_rotate=0 Normal | ||
| + | display_rotate=1 90 degrees | ||
| + | display_rotate=2 180 degrees | ||
| + | display_rotate=3 270 degrees | ||
| + | display_rotate=0x10000 horizontal flip | ||
| + | display_rotate=0x20000 vertical flip | ||
| + | ~~~ | ||
| + | |||
| + | NOTE: You can rotate both the image and touch interface 180º by entering lcd_rotate=2 instead | ||
| + | |||
| + | |||
| + | |||
| + | ## Guide: Removing desktop to run headless (Raspbian Jessie 2015-09-24) | ||
| + | |||
| + | Start out with entering: sudo raspi-config into the terminal. Once you get into the menu select boot options and make the pi boot to console. Optionally you can overclock Then: sudo reboot now | ||
| + | |||
| + | When it's back up run: sudo apt-get remove --auto-remove --purge libx11-.* this will remove all the packages that start with lx. | ||
| + | |||
| + | Remove some rather large packages with: sudo apt-get remove --purge wolfram-engine libreoffice libreoffice was added to the Jessie release, since we're running headless we don't need this. | ||
| + | |||
| + | Run: sudo apt-get autoremove to clear out the rest of the packages we no longer require. | ||
| + | |||
| + | Run: sudo apt-get update && sudo apt-get upgrade | ||
| + | |||
| + | Reboot and finish setting up your headless pi | ||
| + | |||
| + | Note: I wrote this guide not 5 minutes after I did this to my pi. So I am open to criticism and optimizations. If anyone would like an image I could pull one off of the SD card on request. I did this on the original raspberry pi B with 256mb of ram. Someone correct me if I'm wrong but this should work across all versions. | ||
| + | |||
| + | Edit: This post is now irrelevant due to Rasbian Jessie lite | ||
| + | |||
| + | |||
| + | ## Autres | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ~~~bash | ||
| + | sudo rpi-update | ||
| + | sudo apt-get update && apt-get full-upgrade | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | sudo update-alternatives --config x-session-manager | ||
| + | |||
| + | sudo raspi-config | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install vim atop tmux check-dfsg-status | ||
| + | |||
| + | |||
| + | check-dfsg-status # Remplace vrms | ||
| + | |||
| + | apt-get purge wolfram-engine wolframscript realvnc-vnc-server realvnc-vnc-viewer | ||
| + | |||
| + | apt-get install lxqt | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | lxqt-about-l10n | ||
| + | lxqt-openssh-askpass-l10n | ||
| + | lxqt-admin-l10n | ||
| + | lxqt-notificationd-l10n | ||
| + | lxqt-panel-l10n | ||
| + | lxqt-policykit-l10n | ||
| + | lxqt-powermanagement-l10n | ||
| + | lxqt-sudo-l10n | ||
| + | lxqt-globalkeys-l10n | ||
| + | lxqt-config-l10n | ||
| + | lxqt-system-theme | ||
| + | lxqt-session-l10n | ||
| + | lxqt-runner-l10n | ||
| + | lxqt-theme-debian | ||
| + | lxqt-themes | ||
| + | lxqt-qtplugin | ||
| + | lxqt-branding-debian | ||
| + | lxqt-globalkeys | ||
| + | lxqt-notificationd | ||
| + | lxqt-session | ||
| + | lxqt-about | ||
| + | lxqt-sudo | ||
| + | lxqt-openssh-askpass | ||
| + | lxqt-config | ||
| + | lxqt-admin | ||
| + | lxqt-runner | ||
| + | lxqt-policykit | ||
| + | lxqt-panel | ||
| + | lxqt-powermanagement | ||
| + | lxqt-core | ||
| + | lxqt | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get purge connman | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | # sudo rpi-eeprom-update | ||
| + | BCM2711 detected | ||
| + | BOOTLOADER: up-to-date | ||
| + | CURRENT: Tue 10 Sep 2019 10:41:50 AM UTC (1568112110) | ||
| + | | ||
| + | FW DIR: / | ||
| + | VL805: up-to-date | ||
| + | CURRENT: 000137ad | ||
| + | | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Système sur disque externe | ||
| + | |||
| + | Voir https:// | ||
| + | |||
| + | Avoir que /boot sur la carte SD et / sur un disque USB, donc très peu d' | ||
| + | |||
| + | Il suffit juste de copier le contenu de ta SD actuelle sur le disque (ou installer un nouveau OS) puis d' | ||
| + | et éditer aussi la fstab (/etc/fstab ici celle du USB drive) pour qu' | ||
| + | |||
| + | |||
| + | ## Perf / stress test | ||
| + | |||
| + | ~~~bash | ||
| + | pip3 install stressberry --user | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## OpenGL | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install libgl1-mesa-dri gldriver-test | ||
| + | |||
| + | apt-get install libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libglapi-mesa liblvm9 libsensors-config libsensors5 | ||
| + | |||
| + | apt-get install xcompmgr libgl1-meta-dri | ||
| + | apt-get install libalut-dev libalut0 mesa-utils | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Light - Hardening | ||
| + | |||
| + | Voir : [[Notes raspberry light]] | ||
| + | |||
| + | Renommer le compte utilisateur par défaut | ||
| + | ~~~bash | ||
| + | usermod -l newuser pi | ||
| + | ~~~ | ||
| + | |||
| + | Sortie debug sur tty | ||
| + | ~~~bash | ||
| + | echo " | ||
| + | ~~~ | ||
| + | |||
| + | Display IP address at login prompt | ||
| + | ~~~bash | ||
| + | echo "IP : eth0 \4{eth0} wlan0 \4{wlan0}" | ||
| + | ~~~ | ||
| + | |||
| + | Créer une nouvelle partition séparée | ||
| + | |||
| + | ~~~bash | ||
| + | #dd if=/ | ||
| + | # Ou | ||
| + | # fstrim -av | ||
| + | |||
| + | fallocate -l 3G / | ||
| + | |||
| + | chmod 600 / | ||
| + | |||
| + | mkfs.ext4 / | ||
| + | |||
| + | mkdir /mnt/log | ||
| + | mount / | ||
| + | |||
| + | rsync -ax /var/log/ /mnt/log/ | ||
| + | umount /mnt/log | ||
| + | rm /var/log/* -rf | ||
| + | |||
| + | cat >> /etc/fstab <<EOF | ||
| + | / | ||
| + | EOF | ||
| + | |||
| + | mount /var/log | ||
| + | |||
| + | reboot | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Raspberry Pi - Disk Encryption | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | ------------------------------------------------------------ | ||
| + | |||
| + | Raspberry Pi 2 - installation_Archlinux | ||
| + | |||
| + | ~~~ | ||
| + | fdisk /dev/sdX | ||
| + | o pour effacer la carte | ||
| + | p pour lister les partitions (normalement elle est vide) | ||
| + | n pour une nouvelle partition | ||
| + | p pour partition primaire | ||
| + | 1 pour première partition | ||
| + | ENTREE pour accepter par default le premier secteur | ||
| + | +100M pour le dernier secteur (pour la partition boot on a besoin de 100Mo) | ||
| + | t, puis c pour que la partition soit de type W95 FAT32 (LBA) | ||
| + | n pour une nouvelle partition | ||
| + | p pour partition primaire | ||
| + | 2 pour première partition | ||
| + | ENTREE pour accepter par default le premier secteur | ||
| + | ENTREE pour accepter par default le dernier secteur | ||
| + | w pour ecrire sur la carte | ||
| + | ~~~ | ||
| + | |||
| + | Créer et monter la première partition qui sert au boot : | ||
| + | ~~~bash | ||
| + | sudo mkfs.vfat /dev/sdX1 sudo mkdir boot | ||
| + | sudo mount /dev/sdX1 boot | ||
| + | ~~~ | ||
| + | |||
| + | Créer et monter la deuxième partition qui sert au système de fichier : | ||
| + | ~~~bash | ||
| + | sudo mkfs.ext4 /dev/sdX2 | ||
| + | sudo mkdir root | ||
| + | sudo mount /dev/sdX2 root | ||
| + | ~~~ | ||
| + | |||
| + | télécharger et extraire le système : (en root) | ||
| + | ~~~bash | ||
| + | su root | ||
| + | wget http:// | ||
| + | bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root | ||
| + | sync | ||
| + | ~~~ | ||
| + | |||
| + | Déplacer le dossier boot dans la première partition : | ||
| + | ~~~bash | ||
| + | mv root/boot/* boot | ||
| + | ~~~ | ||
| + | |||
| + | Démonter les partitions : | ||
| + | ~~~bash | ||
| + | umount boot root | ||
| + | ~~~ | ||
| + | |||
| + | reconnaissance écran hdmi 5 pouces GTK | ||
| + | |||
| + | Modifier le fichier / | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | # uncomment if you get no picture on HDMI for a default " | ||
| + | # | ||
| + | |||
| + | # uncomment this if your display has a black border of unused pixels visible | ||
| + | # and your display can output without overscan | ||
| + | # | ||
| + | |||
| + | # uncomment the following to adjust overscan. Use positive numbers if console | ||
| + | # goes off screen, and negative if there is too much border | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # uncomment to force a console size. By default it will be display' | ||
| + | hdmi_force_hotplug=1 | ||
| + | |||
| + | # uncomment to force a specific HDMI mode (here we are forcing 800x480!) | ||
| + | hdmi_group=2 | ||
| + | hdmi_mode=1 | ||
| + | hdmi_mode=87 | ||
| + | hdmi_cvt 800 480 60 6 0 0 0 | ||
| + | max_usb_current=1 | ||
| + | # uncomment to force a HDMI mode rather than DVI. This can make audio work in | ||
| + | # DMT (computer monitor) modes | ||
| + | # | ||
| + | |||
| + | # uncomment to increase signal to HDMI, if you have interference, | ||
| + | # no display | ||
| + | # | ||
| + | |||
| + | # uncomment for composite PAL | ||
| + | # | ||
| + | |||
| + | #uncomment to overclock the arm. 700 MHz is the default. | ||
| + | # | ||
| + | |||
| + | # for more options see http:// | ||
| + | start_x=1 | ||
| + | gpu_mem=128 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Configuration | ||
| + | |||
| + | Premier démarrage : | ||
| + | |||
| + | Changer agencement clavier : | ||
| + | ~~~bash | ||
| + | loadkeys fr-pc | ||
| + | nano / | ||
| + | KEYMAP=fr | ||
| + | ~~~ | ||
| + | |||
| + | Renseigner nom de la machine : | ||
| + | ~~~bash | ||
| + | su root | ||
| + | nano / | ||
| + | ~~~ | ||
| + | |||
| + | Décommenter les locales souhaiter (pour définir la langue du système) | ||
| + | ~~~bash | ||
| + | nano / | ||
| + | ~~~ | ||
| + | |||
| + | Exécuter : | ||
| + | ~~~bash | ||
| + | locale-gen | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Ajouter la même locale dans / | ||
| + | |||
| + | Pour la France : ajouter : | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | LANG=" | ||
| + | ~~~ | ||
| + | |||
| + | Ajouter la locale pour la session courante : | ||
| + | ~~~bash | ||
| + | export LANG=fr_FR.UTF-8 | ||
| + | ~~~ | ||
| + | |||
| + | Choisir le fuseau horaire, pour la France : | ||
| + | ~~~bash | ||
| + | ln -s / | ||
| + | ~~~ | ||
| + | |||
| + | Définir mot de passe root : | ||
| + | ~~~bash | ||
| + | sudo passwd | ||
| + | ~~~ | ||
| + | |||
| + | Installer ensuite son environnement, | ||
| + | ~~~bash | ||
| + | su root | ||
| + | pacman -Syu lxde qupzilla elinks btrfs-progs snapper xorg base base-devel | ||
| + | ~~~ | ||
| + | |||
