raspi

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
raspi [02/05/2021 - 09:43] thommie4raspi [11/05/2023 - 16:37] thommie4
Zeile 10: Zeile 10:
 dd bs=4M of=/dev/mmcblk0p1 iflag=fullblock oflag=direct status=progress; sync dd bs=4M of=/dev/mmcblk0p1 iflag=fullblock oflag=direct status=progress; sync
 </code> </code>
 +
 +===== Image kopieren =====
 +
 +<code>
 +sudo dd if=/dev/[SD CARD DEVICE NAME] of=[IMAGE FILE NAME].iso bs=4M status=progress
 +</code>
 +
 +Bei if= den Devicenamen ohne Partitions-ID nehmen, also "/dev/mmcblk0 ", nicht "/dev/mmcblk0p1". Dann landen zwei Partitionen in einem Image.
 +
 +Pishrink: https://github.com/Drewsif/PiShrink
 +verkleinert Image, sodass es sich beim ersten boot automatisch auf die Grösse der neuen SDcard vergrössert:
 +
 +<code>
 +odysseus3:/run/media/thommie/ab51503b-6005-4c24-960f-415e289a2eb1 # pishrink.sh -v raspi05_backup2.img raspi05_backup2_shrink.img
 +pishrink.sh v0.1.3
 +pishrink.sh: Copying raspi05_backup2.img to raspi05_backup2_shrink.img... ...
 +pishrink.sh: Gathering data ...
 +Creating new /etc/rc.local
 +pishrink.sh: Checking filesystem ...
 +rootfs: 116220/3852672 files (0.3% non-contiguous), 1578868/15525376 blocks
 +resize2fs 1.46.5 (30-Dec-2021)
 +pishrink.sh: Shrinking filesystem ...
 +resize2fs 1.46.5 (30-Dec-2021)
 +Resizing the filesystem on /dev/loop0 to 1425936 (4k) blocks.
 +Begin pass 2 (max = 473157)
 +Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 +Begin pass 3 (max = 474)
 +Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 +Begin pass 4 (max = 9713)
 +Updating inode references     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 +The filesystem on /dev/loop0 is now 1425936 (4k) blocks long.
 +
 +pishrink.sh: Shrinking image ...
 +pishrink.sh: Shrunk raspi05_backup2_shrink.img from 60G to 5.7G ...
 +</code>
 +
 +Kopie raus schreiben
 +
 +<code>
 +sudo dd if=~/raspbian_backup.img of=/dev/sdf
 +</code>
 +
 +===== Image mounten =====
 +
 +Partitionsstruktur des Images analysieren
 +
 +<code>
 +odysseus3:/mnt # sfdisk -d /srv/downloads/raspi05_backup_310521.img 
 +label: dos
 +label-id: 0x91906680
 +device: /srv/downloads/raspi05_backup_310521.iso
 +unit: sectors
 +sector-size: 512
 +
 +/srv/downloads/raspi05_backup_310521.img1 : start=        8192, size=      524288, type=c
 +/srv/downloads/raspi05_backup_310521.img2 : start=      532480, size=    60047360, type=83
 +</code>
 +
 +Loopback devices erzeugen
 +
 +<code>
 +losetup -P -f /srv/downloads/raspi05_backup_310521.iso
 +</code>
 +
 +oder mit kpartx
 +
 +<code>
 +odysseus3:~ # kpartx -a /srv/downloads/raspi05_backup_310521.iso 
 +</code>
 +
 +Dann werden die loop devices unter /dev/mapper erzeugt und sind mount-bar.
 +
 +<code>
 +odysseus3:/mnt # mount -o loop /dev/mapper/loop0p1 /mnt/loop0p0/
 +</code>
 +
 +Danach loop devices mit ''losetup -D'' entfernen.
 +
  
 ===== Watchdog ===== ===== Watchdog =====
Zeile 21: Zeile 99:
 -DBUILD_BROWSER=OFF -DCMAKE_INSTALL_PREFIX=/usr .. -DBUILD_BROWSER=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
 </code> </code>
- 
  
 <code> <code>
 sudo make -j4 sudo make -j4
 </code> </code>
 +
 +===== OBS mit Software Rendering =====
 +
 +OBS bzw. OPENGL versucht beim Starten standardmässig das Rendering über eine GPU, das geht im RASPI schief. Daher muss man über eine Umgebungsvariable das Software-Rendering hart definieren. Für OBS wird dafür der Desktop Shortcut angepasst:
 +
 +<code>
 +/usr/share/applications/com.obsproject.Studio.desktop
 +
 +und darin
 +
 +Exec=env  LIBGL_ALWAYS_SOFTWARE=1 obs
 +</code>
 +
 +
 +===== Networking =====
 +
 +Der RASPI nutzt dhcpcd als dhcp Client. Bridge settings nicht über /etc/interfaces setzen, sondern über systemd-networkd.
 +
 +https://wiki.archlinux.org/title/systemd-networkd#Network_bridge_with_DHCP
 +
 +===== rtmp Server für Streaming =====
 +
 +https://blog.unixweb.de/video-streaming-server-mit-restreamer-2-0/
 +
 +https://blog.unixweb.de/video-streaming-server-auf-einem-raspberry-pi/
 +
 +Hier wird als Streaming Lösung der datarhei Restreamer von https://datarhei.com/ der FOSS GmbH Schweiz in einem Docker Container benutzt. Siehe https://hub.docker.com/r/datarhei/restreamer
  • raspi.txt
  • Zuletzt geändert: 05/03/2024 - 10:52
  • von 127.0.0.1