Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Also, the PiSugar 3 functions as an external watchdog reset for the Raspberry Pi.

...

4G modem

If the Netrabrick lid loses communications with the internet, a 4G modem can be activated by the lid to notify about the communications failure.

...

  1. Unmount partition and insert the memory card on the Raspberry Pi Zero 2W. Power on the Netrabrick.

  2. Connect via ssh

    Code Block
    ssh -p 2001 root@192.168.0.86
    
    root@192.168.0.86's password: 
             _____ _  _  ____      ____  __
            |  __ (_)| |/ /\ \    / /  \/  |
            | |__) | | ' /  \ \  / /| \  / |
            |  ___/ ||  <    \ \/ / | |\/| |
            | |   | || . \    \  /  | |  | |
            |_|   |_||_|\_\    \/   |_|  |_|
    
        Welcome to PiKVM - The Open Source KVM over IP on Raspberry Pi
        ____________________________________________________________________________
    
        The root filesystem of PiKVM is mounted in the read-only mode by default.
        Use command "rw" to remount it in the RW-mode and "ro" to switch it back.
        If the filesystem is busy and doesn't switch to the RO-mode, use "reboot"
        to reboot the device, don't leave it in the RW-mode.
    
        Useful commands:
          * Preventing kernel messages in the console:  dmesg -n 1
          * Changing the Web UI password:  kvmd-htpasswd set admin
          * Changing the root password:    passwd
    
        Links:
          * Official website:  https://pikvm.org
          * Documentation:     https://docs.pikvm.org
          * Auth & 2FA:        https://docs.pikvm.org/auth
          * Networking:        https://wiki.archlinux.org/title/systemd-networkd

  3. Change the root password and web admin password

    Code Block
    [root@pikvm ~]# rw
    + mount -o remount,rw /
    + mount -o remount,rw /boot
    + set +x
    === PiKVM is in Read-Write mode ===
    [root@pikvm ~]# passwd root
    New password: 
    Retype new password: 
    passwd: password updated successfully
    [root@pikvm ~]# kvmd-htpasswd set admin
    Password: 
    Repeat: 
    
    # Note: Users logged in with this username will stay logged in.
    # To invalidate their cookies you need to restart kvmd & kvmd-nginx:
    #    systemctl restart kvmd kvmd-nginx
    # Be careful, this will break your connection to the PiKVM
    # and may affect the GPIO relays state. Also don't forget to edit
    # the files /etc/kvmd/{vncpasswd,ipmipasswd} and restart
    # the corresponding services kvmd-vnc & kvmd-ipmi if necessary.
  4. Activate 2FA authentication with your favorite authenticator app:

    Code Block
    [root@pikvm ~]# kvmd-totp init
  5. Connect via browser to the PiKVM address: 192.168.0.86. (Accept the unsecured connection, as we have not yet added a SSL certificate) using password

Install and configure Wireguard

  1. Update the repo

  2. Install wireguard

  3. Create the config file

  4. Start and test

  5. Configure auto-start

  6. Configure the wireguard client

Install and configure Lets Encrypt Certificates for the PiKVM

Configuring PiSugar

Add a pisugar user to the PiKVM (Raspberry Pi):

  1. Connect via ssh to the PiKVM device.

  2. Add a pisugar user:

Code Block
[root@pikvm ~]# rw         
+ mount -o remount,rw /
+ mount -o remount,rw /boot
+ set +x
=== PiKVM is in Read-Write mode ===

useradd --system -s /usr/bin/bash pisugar
usermod -d /opt/pisugar -m pisugar
passwd pisugar
  1. Add pisugar to /etc/sudoers

  2. Download latest pisugar-archlinux_<version>_all.tar.gz from https://github.com/PiSugar/pisugar-power-manager-rs/releases

Code Block
su - pisugar
tar -xvf pisugar-archlinux_<version>_all.tar.gz
  1. Edit the PKBUILD to support the RPi Zero 2W:

    Code Block
    arch=('arm' 'armhf' 'aarch64' 'x86_64')

Attaching the lid and connecting external cables

...