{{tag>Brouillon ARM}} # Notes Raspberry Voir : * [[Notes raspberry light]] * https://www.framboise314.fr/ * https://wiki.ubuntu.com/ARM/RaspberryPi Voir aussi : * Berryboot * [Read Only SD et Watch dog reset](https://hallard.me/raspberry-pi-read-only/) * ZimaBoard ## Matériel ### Carte SD Prendre au moins une class 10 ou 90 Mo/s et 32GB ## Install / Config Voir : * https://www.raspberrypi.org/documentation/configuration/ * [Raspberry Pi 4 Bootloader Firmware Updating / Recovery Guide](https://jamesachambers.com/raspberry-pi-4-bootloader-firmware-updating-recovery-guide/) Utilitaire de configuration ~~~bash sudo raspi-config ~~~ Mise-à-jour EEPROM `/etc/default/rpi-eeprom-update` ~~~bash #FIRMWARE_RELEASE_STATUS="critical" FIRMWARE_RELEASE_STATUS="stable" #FIRMWARE_RELEASE_STATUS="beta" ~~~ ~~~bash sudo rpi-update ~~~ Exemple rotation écran `/boot/config.txt` ~~~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://magpi.raspberrypi.org/articles/raspberry-pi-recovery-partition ~~~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) LATEST: Tue 10 Sep 2019 10:41:50 AM UTC (1568112110) FW DIR: /lib/firmware/raspberrypi/bootloader/critical VL805: up-to-date CURRENT: 000137ad LATEST: 000137ad ~~~ ## Système sur disque externe Voir https://www.framboise314.fr/booter-le-raspberry-pi-sur-un-disque-dur-usb/ Avoir que /boot sur la carte SD et / sur un disque USB, donc très peu d'accès sur la SD. Il suffit juste de copier le contenu de ta SD actuelle sur le disque (ou installer un nouveau OS) puis d'editer /boot/cmdline.txt (celui de la SD) et changer root=/dev/.... par root=/dev/sda2 et éditer aussi la fstab (/etc/fstab ici celle du USB drive) pour qu'elle pointe sur le bon /boot (la SD) et le / du disque USB. ## 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 "*.* -/dev/tty12" >/etc/rsyslog.d/tty12.conf ~~~ Display IP address at login prompt ~~~bash echo "IP : eth0 \4{eth0} wlan0 \4{wlan0}" >> /etc/issue ~~~ Créer une nouvelle partition séparée ~~~bash #dd if=/dev/zero of=/var/part-var-log.img bs=1024k count=3000 # Ou # fstrim -av fallocate -l 3G /var/part-var-log.img chmod 600 /var/part-var-log.img mkfs.ext4 /var/part-var-log.img mkdir /mnt/log mount /var/part-var-log.img /mnt/log/ rsync -ax /var/log/ /mnt/log/ umount /mnt/log rm /var/log/* -rf cat >> /etc/fstab <