Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki:raspberrypi

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
wiki:raspberrypi [2024/03/31 13:19] – [Raspbian] pulsarwiki:raspberrypi [2024/03/31 19:08] (aktuell) – [12 Bookworm] pulsar
Zeile 563: Zeile 563:
 Ab dieser Version hat sich die Ersteinrichtung für den Headless Betrieb geändert. Hierfür nutze ich das Lite Image. Auf der SD-Karte müss auf der Boot-Partition einige Dateien angelegt werden diese wären: Ab dieser Version hat sich die Ersteinrichtung für den Headless Betrieb geändert. Hierfür nutze ich das Lite Image. Auf der SD-Karte müss auf der Boot-Partition einige Dateien angelegt werden diese wären:
  
-  - 1 Für SSH Aktivierung eine leere Datei mit dem namen ''ssh'' +  - SSH Aktivierungeine leere Datei mit dem namen ''ssh'' 
-  - 2 Für den Nutzer eine Datei mit dem Namen userconf mit dem Inhalt: +  - Benutzer, eine Datei mit dem Namen ''userconf'' mit dem Inhalt: <username>:<password> Für password wird hier das verschlüsselt Passwort eingetragen, dieses holt man sich mit dem Komando ''openssl passwd -6'' 
- <username>:<password> +  - WLAN, eine Datei im Pfad ''/etc/NetworkManager/system-connections/WLAN-Name.nmconnection'' anlegen mit den folgenden Inhalt: 
- Das Passwort wird hier verschlüsselt eingetragen, dieses holt man sich mit dem Komando + 
-        openssl passwd -6+<code> 
 +[connection] 
 +id=WLAN-Name 
 +uuid=# random UUID in the format 11111111-1111-1111-1111-111111111111 
 +type=wifi 
 +autoconnect=true 
 +interface-name=wlan0 
 + 
 +[wifi] 
 +mode=infrastructure 
 +ssid=WLAN-Name 
 + 
 +[wifi-security] 
 +auth-alg=open 
 +key-mgmt=wpa-psk 
 +psk=WLAN-Passwort 
 + 
 +[ipv4] 
 +method=auto 
 + 
 +[ipv6] 
 +addr-gen-mode=default 
 +method=auto 
 +</code> 
 + 
 +  sudo chmod -R 600 <path-to-rootfs>/etc/NetworkManager/system-connections/SSID.nmconnection 
 +  sudo chown -R root:root <path-to-rootfs>/etc/NetworkManager/system-connections/SSID.nmconnection 
 + 
 +Hier soll es eine einzige Datei geben, mit der man alle Punkte ab arbeiten kann: 
 + 
 +With Raspberry Pi OS bookworm you can configure WiFi via a ''custom.toml'' **that you place in the bootfs partition (first boot only).** 
 + 
 +Note that this feature is experimental and will be replaced by cloud-init in the future. 
 + 
 +An example gist and blog explains some of the options: 
 + 
 +I am copying the example from the aforementioned gist (not affiliated): 
 + 
 +<code> 
 +# Required: 
 +config_version = 1 
 + 
 +[system] 
 +hostname = "raspberrypi" 
 + 
 +[user] 
 +# If present, the default "rpi" user gets renamed to this "name" 
 +name = "rpi" 
 +# The password can be encrypted or plain. To encrypt, we can use "openssl passwd -5 raspberry" 
 +password = "$5$pN7oRnie.WDOHoJY$aWEYmKUytN/S/bxMza5ksBiurbSJmcvcysBKHSmYa45" 
 +password_encrypted = true 
 + 
 +[ssh] 
 +# ssh_import_id = "gh:user" # import public keys from github 
 +enabled = true 
 +password_authentication = false 
 +# We can also seed the ssh public keys configured for the default user: 
 +# authorized_keys = [ "ssh-rsa ... user@host", ... ] 
 + 
 +[wlan] 
 +ssid = "mywifi" 
 +password = "$5$pN7oRnie.WDOHoJY$aWEYmKUytN/S/bxMza5ksBiurbSJmcvcysBKHSmYa45" 
 +password_encrypted = true 
 +hidden = false 
 +# The country is written to /etc/default/crda 
 +# Reference: https://wireless.wiki.kernel.org/en/developers/Regulatory 
 +country = "IE" 
 + 
 +[locale] 
 +keymap = "gb" 
 +timezone = "Europe/London" 
 +</code> 
 + 
 +You could dig more into the firstboot or init_config scripts (the latter is what loads the config). 
 + 
 + 
 + 
 + 
 +Entscheident ist dieses Verzeichnis auf der Wurzel-Partition wo die Einstellungen konfiguriert werden. 
 + 
 +<code> 
 +root@raspberrypi:~# ls -la /usr/lib/raspberrypi-sys-mods/ 
 +total 44 
 +drwxr-xr-x  2 root root 4096 Mar 15 15:01 . 
 +drwxr-xr-x 63 root root 4096 Mar 15 15:02 .. 
 +-rwxr-xr-x  1 root root 3227 Nov  15:03 firstboot 
 +-rwxr-xr-x  1 root root  445 Dec 18 10:51 get_fw_loc 
 +-rwxr-xr-x  1 root root  419 Jan  6  2022 i2cprobe 
 +-rwxr-xr-x  1 root root 5486 Nov  7 09:30 imager_custom 
 +-rwxr-xr-x  1 root root 7319 Jul 25  2023 init_config 
 +-rwxr-xr-x  1 root root  117 Aug 31  2023 regenerate_ssh_host_keys 
 +-rwxr-xr-x  1 root root  339 Jul 25  2023 sshswitch 
 +</code> 
  
-  - 3 WLAN  
 ==== Audio Sound ==== ==== Audio Sound ====
  
wiki/raspberrypi.1711883962.txt.gz · Zuletzt geändert: 2024/03/31 13:19 von pulsar