User Tools

Site Tools


baseraspberrypisetupbookworm

Differences

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

Link to this comparison view

Next revision
Previous revision
baseraspberrypisetupbookworm [2026/09/17 22:33] – created wikiadminbaseraspberrypisetupbookworm [2026/09/18 00:35] (current) – [12. Add startup cleanup and recovery] wikiadmin
Line 1: Line 1:
 ====== Raspberry Pi Base Setup for ErgoTech Software ====== ====== Raspberry Pi Base Setup for ErgoTech Software ======
 +
 +This article continues from [[PiFreshSetupIntructions]| Setting up Raspberry Pi for MIX or TransSECS Deployments (Bookworm)]]
  
 Complete this setup before installing MIX or the TransSECS built deployment.  Complete this setup before installing MIX or the TransSECS built deployment. 
Line 38: Line 40:
 Use **Desktop** when the Raspberry Pi itself will drive a screen, although the kiosk article also describes installing only the graphical packages which are needed. Use **Desktop** when the Raspberry Pi itself will drive a screen, although the kiosk article also describes installing only the graphical packages which are needed.
  
-Write down whether you installed 32-bit or 64-bit Raspberry Pi OSErgoTech may need this information when preparing software for the system. +Download Bookworm from here (scroll down to the Legacy section): https://www.raspberrypi.com/software/operating-systems/
 ==== Recommended initial settings ==== ==== Recommended initial settings ====
  
Line 49: Line 50:
 |Password|''%%ErgoErgo%%''| |Password|''%%ErgoErgo%%''|
  
-A TransSECS-only system may instead use ''%%secs%%'' as the hostname and username.+A TransSECS-only system may instead use ''%%mix%%'' or ''%%pi%%'' or anything which makes sense as the hostname and username.
  
-The examples in these articles use ''%%mix%%''. If your login user is ''%%secs%%'', substitute ''%%secs%%'' in paths such as ''%%/home/mix%%''.+The examples in these articles use ''%%mix%%''. If your login user is ''%%pi%%'', substitute ''%%pi%%'' in paths such as ''%%/home/mix%%''.
  
 ===== 3. Write the SD card with Raspberry Pi Imager ===== ===== 3. Write the SD card with Raspberry Pi Imager =====
  
-Raspberry Pi Imager is the easiest method for someone who is new to Raspberry Pi.+Raspberry Pi Imager from https://www.raspberrypi.com/software/ is the easiest method for someone who is new to Raspberry Pi and can be run from Windows, Linux, or a Mac.
  
 In Imager: In Imager:
  
   - Choose your Raspberry Pi model.   - Choose your Raspberry Pi model.
-  - Choose the appropriate Raspberry Pi OS. +  - Choose the appropriate Raspberry Pi OS (Bookworm) 
-  - Choose the microSD card carefully. The selected device will be erased.+  - Choose the microSD card carefully. The selected device will be erased. Check that the size matches what you expect and be very cautious.
   - Open the OS customization settings.   - Open the OS customization settings.
   - Set the hostname, username, password, time zone, and keyboard layout.   - Set the hostname, username, password, time zone, and keyboard layout.
-  - Enable **SSH** using password authentication.+  - Enable **SSH** using password authentication. You will need SSH for the next steps.
   - Write and verify the card.   - Write and verify the card.
  
Line 71: Line 72:
 ==== Command-line alternative using dd ==== ==== Command-line alternative using dd ====
  
-Experienced Linux users may write a downloaded ''%%.img.xz%%'' image directly:+Experienced Linux users may write a downloaded ''%%.img.xz%%'' image directly using dd.
  
-<code text> +When using ''%%dd%%'', create the SSH and user configuration on the boot partition after imaging:
-sudo umount /dev/sdX* 2>/dev/null +
-xzcat 2024-07-04-raspios-bookworm-arm64-lite.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync +
-</code> +
- +
-Replace ''%%/dev/sdX%%'' with the SD card device. Be certain which device is the SD card because this command erases it. +
- +
-When using ''%%dd%%'', create the SSH and user configuration on the boot partition:+
  
 <code text> <code text>
Line 93: Line 87:
 sudo raspi-config nonint do_hostname mix sudo raspi-config nonint do_hostname mix
 timedatectl list-timezones timedatectl list-timezones
-sudo timedatectl set-timezone Europe/Rome+ssudo timedatectl set-timezone America/Los_Angeles
 sudo reboot sudo reboot
 </code> </code>
  
-Replace ''%%Europe/Rome%%'' with the correct time zone for the installation.+Replace ''%%America/Los_Angeles%%'' with the correct time zone for the installation such as ''%%Europe/Rome%%''.
  
 ===== 4. First login with SSH ===== ===== 4. First login with SSH =====
Line 111: Line 105:
 The first time you connect, SSH asks whether you trust the computer’s fingerprint. Type ''%%yes%%'', then enter the password. The first time you connect, SSH asks whether you trust the computer’s fingerprint. Type ''%%yes%%'', then enter the password.
  
-If ''%%mix.local%%'' does not work, connect using the Pi’s IP address:+If ''%%mix.local%%'' does not work, connect using the Pi’s IP address, for example:
  
 <code text> <code text>
Line 191: Line 185:
  
 Configure Ethernet and WiFi according to the needs of the installation. Configure Ethernet and WiFi according to the needs of the installation.
- 
-Changing the hostname, IP address, or network configuration does not change the ErgoTech license. 
  
 If WiFi is not needed, it may be left unconfigured or disabled using the approved network setup for the system. For MIX systems, network configuration can be managed through the MIX setup page. If WiFi is not needed, it may be left unconfigured or disabled using the approved network setup for the system. For MIX systems, network configuration can be managed through the MIX setup page.
Line 209: Line 201:
 These packages provide serial-port support, SQLite support, system logging, log rotation, Raspberry Pi clock recovery, ''%%.local%%'' hostname discovery, and several useful support tools. These packages provide serial-port support, SQLite support, system logging, log rotation, Raspberry Pi clock recovery, ''%%.local%%'' hostname discovery, and several useful support tools.
  
-For a project which uses Raspberry Pi GPIO:+===== 9. Disable Automatic Software Updates =====
  
-<code text+For an ErgoTech system which will run continuously in production, software updates should be performed as a planned maintenance task rather than installed automatically. 
-sudo apt install -y pigpio + 
-sudo systemctl enable --now pigpiod+Automatic operating-system updates can change system libraries, networking components, Chromium, Java-related packages, or other software which the ErgoTech application depends on. Disabling automatic updates helps keep a tested production system in a known configuration. 
 + 
 +Stop and disable the unattended-upgrades service: 
 + 
 +<code> 
 +sudo systemctl disable unattended-upgrades 
 +sudo systemctl stop unattended-upgrades
 </code> </code>
  
-===== 9. Install Java 8 =====+Stop and disable the two automatic APT update timers: 
 + 
 +<code> 
 +sudo systemctl disable apt-daily.timer 
 +sudo systemctl stop apt-daily.timer 
 + 
 +sudo systemctl disable apt-daily-upgrade.timer 
 +sudo systemctl stop apt-daily-upgrade.timer 
 +</code> 
 + 
 +Prevent the system from prompting for an operating-system release upgrade. 
 + 
 +First make a dated backup: 
 + 
 +<code> 
 +sudo cp /etc/update-manager/release-upgrades /etc/update-manager/release-upgrades.bak.$(date +%Y%m%d_%H%M%S) 
 +</code> 
 + 
 +Open the configuration file: 
 + 
 +<code> 
 +sudo nano /etc/update-manager/release-upgrades 
 +</code> 
 + 
 +Find the line beginning with: 
 + 
 +<code> 
 +Prompt= 
 +</code> 
 + 
 +Change it to: 
 + 
 +<code> 
 +Prompt=never 
 +</code> 
 + 
 +Save and exit nano: 
 + 
 +  * Press **Ctrl+O** to save. 
 +  * Press **Enter** to confirm the filename. 
 +  * Press **Ctrl+X** to exit. 
 + 
 +==== Verify ==== 
 + 
 +Check the automatic-update service and timers: 
 + 
 +<code> 
 +systemctl status unattended-upgrades 
 +systemctl status apt-daily.timer 
 +systemctl status apt-daily-upgrade.timer 
 +</code> 
 + 
 +The unattended-upgrades service and both APT timers should show which they are disabled or inactive. Press **q** if a status display remains open. 
 + 
 +Also verify the release-upgrade setting: 
 + 
 +<code> 
 +grep '^Prompt=' /etc/update-manager/release-upgrades 
 +</code> 
 + 
 +It should show: 
 + 
 +<code> 
 +Prompt=never 
 +</code> 
 + 
 +These changes do not prevent an administrator from installing updates manually later. Updates can still be performed deliberately during a maintenance period after they have been reviewed and tested. 
 + 
 + 
 +===== 10. Install Java 8 =====
  
 ErgoTech applications covered by this guide use **Java 8** unless ErgoTech support specifies otherwise. ErgoTech applications covered by this guide use **Java 8** unless ErgoTech support specifies otherwise.
Line 229: Line 296:
 ls /opt/java ls /opt/java
 </code> </code>
- 
-For 32-bit Raspberry Pi OS, use ''%%linux/arm/%%'' instead of ''%%linux/aarch64/%%'' in the download address. 
  
 The ''%%ls%%'' command shows the folder which was extracted. Use the actual folder name in the next command: The ''%%ls%%'' command shows the folder which was extracted. Use the actual folder name in the next command:
Line 266: Line 331:
 Register the extracted Java 11 installation using its actual folder name and a lower priority than Java 8. Register the extracted Java 11 installation using its actual folder name and a lower priority than Java 8.
  
-===== 10. Keep Linux system logs from filling the SD card =====+===== 11. Keep Linux system logs from filling the SD card =====
  
 Linux system logs can grow surprisingly large when a device repeatedly reports an error. A nearly full SD card can make SSH and other commands extremely slow and can eventually make the system unusable. Linux system logs can grow surprisingly large when a device repeatedly reports an error. A nearly full SD card can make SSH and other commands extremely slow and can eventually make the system unusable.
Line 276: Line 341:
 <code text> <code text>
 sudo cp /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.bak.$(date +%Y%m%d_%H%M%S) sudo cp /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.bak.$(date +%Y%m%d_%H%M%S)
 +</code>
 +
 +Then edit the system log configuration:
 +
 +<code text>
 sudo nano /etc/logrotate.d/rsyslog sudo nano /etc/logrotate.d/rsyslog
 </code> </code>
Line 305: Line 375:
 </code> </code>
  
-===== 11. Add startup cleanup and recovery =====+===== 12. Add startup cleanup and recovery =====
  
-''%%/etc/rc.local%%'' is a traditional Linux startup script which runs near the end of the boot process. On an ErgoTech Raspberry Pi it is useful for small recovery and housekeeping tasks after a power interruption.+''%%/etc/rc.local%%'' is a traditional Linux startup script which runs near the end of the boot process. On Raspberry Pi it is useful for small recovery and housekeeping tasks after a power interruption.
  
-Make a dated backup:+Make a dated backup and then edit this:
  
 <code text> <code text>
Line 371: Line 441:
 The test should complete without shell errors. The maintenance log should contain a start time, disk-usage information, and a finish time. The test should complete without shell errors. The maintenance log should contain a start time, disk-usage information, and a finish time.
  
-The MIX kiosk article adds two browser-specific cleanup commands to this file.+The [[SetupChromeKioskOnRpi]|MIX kiosk article]] adds two browser-specific cleanup commands to this file.
  
-===== 12. Timekeeping =====+===== 13. Timekeeping =====
  
 ==== Raspberry Pi 5 ==== ==== Raspberry Pi 5 ====
Line 411: Line 481:
 </code> </code>
  
-If the factory network has no Internet or local time server, the clock may drift. MIX provides another convenient way to set the system time through **Get Pre-License Key** on the setup page.+If the factory network has no Internet or local time server, the clock may drift. MIX provides another convenient way to set the system time by loading **Get Pre-License Key** on the setup page. In addition, for SECS/GEM tool applications, the host can also set the Pi's clock by sending the standard **S2F31 Date and Time Set Request** message. This updates the system clock in the same way which opening the MIX Get Pre-License Key page updates it from the browser. 
  
-===== 13. Verify the base setup =====+===== 14. Verify the base setup =====
  
 Reboot: Reboot:
Line 437: Line 508:
 At this point the SD card can be used as a **base master image** before TransSECS or MIX is installed. At this point the SD card can be used as a **base master image** before TransSECS or MIX is installed.
  
-Before removing the SD card, shut the Pi down cleanly:+Before removing the SD card, shut the Pi down cleanly (and wait a minute before powering off):
  
 <code text> <code text>
baseraspberrypisetupbookworm.1789698814.txt.gz · Last modified: by wikiadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki