{{tag>Brouillon ARM}} = Notes Raspberry Voir : * [[Notes raspberry light]] * https://www.framboise314.fr/ * https://wiki.ubuntu.com/ARM/RaspberryPi Voir aussi : * Berryboot * [[https://hallard.me/raspberry-pi-read-only/|Read Only SD et Watch dog reset]] * 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/ * [[https://jamesachambers.com/raspberry-pi-4-bootloader-firmware-updating-recovery-guide/|Raspberry Pi 4 Bootloader Firmware Updating / Recovery Guide]] Utilitaire de configuration sudo raspi-config Mise-à-jour EEPROM ''/etc/default/rpi-eeprom-update'' #FIRMWARE_RELEASE_STATUS="critical" FIRMWARE_RELEASE_STATUS="stable" #FIRMWARE_RELEASE_STATUS="beta" sudo rpi-update Exemple rotation écran ''/boot/config.txt'' 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 sudo rpi-update sudo apt-get update && apt-get full-upgrade sudo update-alternatives --config x-session-manager sudo raspi-config 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 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 pip3 install stressberry --user == OpenGL 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 usermod -l newuser pi Sortie debug sur tty echo "*.* -/dev/tty12" >/etc/rsyslog.d/tty12.conf Display IP address at login prompt echo "IP : eth0 \4{eth0} wlan0 \4{wlan0}" >> /etc/issue Créer une nouvelle partition séparée #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 < === Raspberry Pi - Disk Encryption Voir : * https://www.kali.org/docs/arm/raspberry-pi-with-luks-disk-encryption/ * https://github.com/NicoHood/NicoHood.github.io/wiki/Raspberry-Pi-Encrypt-Root-Partition-Tutorial ------------------------------------------------------------ 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 : 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 : sudo mkfs.ext4 /dev/sdX2 sudo mkdir root sudo mount /dev/sdX2 root télécharger et extraire le système : (en root) su root wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root sync Déplacer le dossier boot dans la première partition : mv root/boot/* boot Démonter les partitions : umount boot root reconnaissance écran hdmi 5 pouces GTK Modifier le fichier /boot/config.txt ''/boot/config.txt'' # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output 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 #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # for more options see http://elinux.org/RPi_config.txt start_x=1 gpu_mem=128 Configuration Premier démarrage : Changer agencement clavier : loadkeys fr-pc nano /etc/vconsole.conf KEYMAP=fr Renseigner nom de la machine : su root nano /etc/hostname Décommenter les locales souhaiter (pour définir la langue du système) nano /etc/locale.gen Exécuter : locale-gen Ajouter la même locale dans /etc/locale.conf Pour la France : ajouter : ''/etc/locale.conf'' LANG="fr_FR.UTF-8" Ajouter la locale pour la session courante : export LANG=fr_FR.UTF-8 Choisir le fuseau horaire, pour la France : ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime Définir mot de passe root : sudo passwd Installer ensuite son environnement, et ses applications, par exemple : su root pacman -Syu lxde qupzilla elinks btrfs-progs snapper xorg base base-devel