User Tools

Site Tools


fmlist_scanner:setup_raspberry_pi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fmlist_scanner:setup_raspberry_pi [2025/10/30] – created hayatifmlist_scanner:setup_raspberry_pi [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
 +{{indexmenu>.#1| nojs navbar nocookie msort }}
 +{{indexmenu_n>211}}
 +
 +====== 2.1.1 Setup Operating System onto the Raspberry Pi ======
 +
 +===== Download the image =====
 +
 +I would recommend a 64-bit system, as Raspberry Pi 3B, 3B+ and 4B are 64 bit hardware.
 +
 +Raspberry Pi Foundation provides a suitable system at https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit . I would recommend "Raspberry Pi OS Lite" 64-bit. The latest one was released April 4th 2022.
 +
 +
 +===== Write to micro-SD card =====
 +
 +
 +With this release, the default user //pi// was removed! \\ 
 +I would suggest to setup the user //scanner// - see https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/ \\ 
 +Also don't forget to activate SSH daemon for remote (headless) setup.
 +
 +You might follow the setup instructions at https://www.raspberrypi.com/software/
 +
 +
 +==== Details for writing from a Linux PC ====
 +
 +=== check and verify your micro-SD cards' device name ===
 +
 +verify to have the correct device name for the (new) SD card\\ 
 +for not overwriting and trashing your system\\ 
 +or overwriting relevant data!
 +
 +  * check for existing block devices with ''lsblk'' - before inserting the SD card to be written.
 +  * on another terminal (SSH-session), you may check ''dmesg -w'' while inserting
 +  * re-execute and compare output of ''lsblk'' to previous output
 +
 +optionally, you might check existing contents by mounting - **replace** ''/dev/sdb'' with **YOUR** device! \\
 +but keep the digit after ''/dev/sdb'', e.g. ''/dev/sdb1'' is changed into ''/dev/sdc1''
 +
 +
 +<code>
 +sudo fdisk -l /dev/sdb   # lists partitions
 +mkdir /dev/shm/sdb1
 +sudo mount /dev/sdb1 /dev/shm/sdb1
 +</code>
 +
 +check the contents, e.g. with ''cd'', ''ls'', .. or ''mc''
 +and then unmount each checked partition
 +
 +<code>
 +sudo umount /dev/shm/sdb1
 +</code>
 +
 +
 +=== (over)write the micro-SD card ===
 +
 +don't forget to **replace** ''/dev/sdb'' with **YOUR** micro-SD cards' device name!
 +
 +<code>
 +xzcat 2022-04-04-raspios-bullseye-arm64-lite.img.xz | sudo dd bs=4M of=/dev/sdb
 +sync
 +</code>
 +
 +unplug / eject the micro-SD card with the adapter
 +
 +
 +=== prepare auto-generating user and SSH activation ===
 +
 +re-insert micro-SD card and mount\\ 
 +again: **replace** ''/dev/sdb'' with **YOUR** device!
 +
 +<code>
 +sudo fdisk -l /dev/sdb
 +mkdir /dev/shm/sdb1
 +sudo mount /dev/sdb1 /dev/shm/sdb1
 +</code>
 +
 +we need an enctypted version for the password ''scanner123'' - you might change in following
 +
 +<code>
 +echo 'scanner123' | openssl passwd -6 -stdin
 +</code>
 +
 +there comes a huge alphanumeric string. copy it into your clipboard - or select for pasting with middle mouse button.
 +
 +for later automatic generation of user ''scanner'' - you might change in following
 +
 +<code>
 +echo 'scanner:$6$6t.t7wG2IkuS0IHn$COM.bQQWWbTYtLCkLf5Mk6PUUnpkZN7R0JLsXwUfHDPx6Hc0jK77Ci28zR01rdyN.1jRQGuHnP1rq78I0xzF.0' >/dev/shm/sdb1/userconf.txt
 +</code>
 +
 +and for later activation of SSH-daemon
 +
 +<code>
 +touch /dev/shm/sdb1/ssh
 +</code>
 +
 +you might setup / change other bootup options for the Raspberry Pi, e.g. display options, ..
 +
 +when finished, unmount\\ 
 +
 +
 +<code>
 +sudo umount /dev/shm/sdb1
 +</code>
 +
 +and unmount the micro-SD card from the PC
 +
 +now, you are ready to insert the prepared SD card into the Pi and boot from it.
 +using Pi headless over Ethernet network, you might lookup the IP address; the default hostname is ''raspberrypi''
 +
 +
 +===== SSH Software hints =====
 +
 +On a Windows PC, you can use one of the following programs to establish an SSH connection
 +
 +  * ''PuTTY'': https://www.putty.org/
 +  * ''MobaXterm'': https://mobaxterm.mobatek.net/
 +  * //Windows Subsystem for Linux// (WSL/LXSS) with Windows 10
 +
 +for sure, there are other alternatives. i would recommend //MobaXterm//, 
 +which has a builtin X-server, that would allow to run GUI programs.
 +
 +if really necessary, i would suggest ''JuiceSSH'' (https://juicessh.com/) for SSH from an Android smartphone or tablet.
 +
 +
 +===== System Update & Configuration =====
 +
 +Please continue with [[fmlist_scanner:prepare_exisiting_linux_or_preinstalled_pi|2.2 Setup on a pre-installed Pi or PC]]
 +
 +afterwards, check other configuration options - special for Raspberry Pi, e.g. speaker output:
 +
 +<code>
 +sudo raspi-config
 +</code>
 +