Skip to content

bibsdb/os2borgerpc-kiosk-rpi-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi OS2BorgerPC Kiosk Image

Raspberry Pi 4 in an Argon One v2 case placed behind a wall mounted display screen

DISCLAIMER: This is an experimental project not supported by Magenta. It has been developed by Agnete Moos, Sønderborg Kommune with support from Dennis Borup Jacobsen, Aarhus Kommune. Questions or comments should be directed to Agnete Moos [email protected].

Contents

How to create a bootable OS2BorgerPC RPI Kiosk Image
Speed up the process - Clone your Raspberry Pi SD-card and turn it into an img-file
The RPI case
Chromium installation and startup
Protect the SD-card by making it read-only

How to create a bootable OS2BorgerPC RPI Kiosk Image

You can not use the standard OS2BorgerPC Kiosk Image on a Raspberry Pi because RPI use an ARM processor, that is not build on the x86 chip architecture. There are key differences in how you install a RPI. You don´t run an installer to enter username, timezone and other preferences and information. Instead you modify configuration files in the image and the boot the RPI. On boot the settings are applied.

We start with a generic Ubuntu Server 22.04.04 LTS (64 bit) ARM image. We modify it to be a OS2BorgerPC RPI Kiosk Image and then we boot an Raspberry Pi with this image. On first boot the magic happens. The OS2BorgerPC Client is installed and you preferences are applied.

  1. Download and install Raspberry Pi Imager on a PC. I have used a Lenovo Laptop running Ubuntu, but it should be possible from Windows too.

  2. Place a SD-card in the card reader of your PC.

  3. Start the Raspberry Pi Imager program

    • In Raspberry Pi Device select Raspberry Pi 4
    • In Operating system. Scroll down and unfold Other general-purpose OS. Choose Ubuntu. Scroll down and select Ubuntu Server 22.04.04 LTS (64 bit)
    • In Storage. Choose the SD-card you have inserted.

  4. Then you are asked if you want to apply OS customization settings. Press No. We do that by applying our own config-files in the next step.



  5. Now confirm to continue. Press Yes



  6. The Ubuntu Image is written to your SD-card. This will take a few minutes.


Now we need to configure the Ubuntu Image with some custom configuration files.

  1. Access the SD-card through the file manager. Open the system-boot directory.



  2. Overwrite three files with the ones provided in this project.

    • user-data
    • config.txt
    • network-config
  3. Validate the contents of network-config. It will be inserted into /etc/netplan/config.yml and thereby become the network setup for your RPI. You might have different networking preferences. The provided version both support wired connection and wifi. Please provide the SSID you want the RPI to connect to.

  4. Now you can insert the SD-card into the RPI and boot. IMPORTANT: Your RPI must be connected to the internet during first boot On first boot cloud-init configures the RPI and installs the OS2BorgerPC client. Wait for cloud-init to finish. It can take a few minutes.

  5. Now you are ready to connect the RPI to OS2BorgerPC Admin. Run sudo os2borgerpc_kiosk_setup as you would normally do after installing a OS2BorgerPC Kiosk PC.

Speed up the process - Clone your Raspberry Pi SD-card and turn it into an img-file

If you need to make more than a few OS2BorgerPC Kiosk RPIs you want to speed up the process.

Install a RPI as described above. After boot - but before you connect to the Admin system - you can take a snapshot of the SD-card and turn it into a .img file. This image can be applied to new SD-cards using the Raspberry PI Imager software. Thereby you make pre-installed OS2BorgerPCs. Just insert a preinstalled SD-card into a RPI, turn it on and run sudo os2borgerpc_kiosk_setup. You are ready to rock!

  1. Turn off your RPI and remove the SD-card
  2. Insert the SD-card into a card reader of a PC. In have used a Lenovo Laptop running Ubuntu.
  3. Follow this very fine guide to make an image from your Raspberry Pi SD-card (https://www.pragmaticlinux.com/2020/12/how-to-clone-your-raspberry-pi-sd-card-in-linux/)

The RPI case

The official Raspberry Pi case is simple and cheap. It has no on/off button, no HDMI port and it doesn't provide cooling for the CPU.

If you want cooling and the RPI to look more "Intel NUC-like" you can choose the Argon One v2 case (If it is out of stock just mail them...) You need to install a custom software package support the power button and cooling regulation.

Here is a OS2borgerPC scripts that installs the software:

Argon One v2 case - software package installation

Chromium installation and startup

Use these two scripts to install Chromium and launch the browser in full screen.

Install Chromium on RPI

Launch Chromium on RPI

Protect the SD-card by making it read-only

A commonly discussed problem is that SD-cards are worn out, when being used as a hard drive, that does a lot of read-write operations. A way to protect the SD-card is to make it read-only. The way to accomplish that is to enable the Overlay read-only file system.

When the Overlay filesystem is enabled, changes you make to the filesystem are stored in RAM and not persisted for long - they are gone upon reboot. Even changes made by superuser disappears. If you need to make lasting changes, you have to turn off Overlay filesystem, do your changes and then turn Overlay filesystem back on.

Script to Turn the Overlay Filesystem on/off

About

OS2BorgerPC Kiosk on Ubuntu Server 22.04 ARM edition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages