Warning: session_start(): open(/tmp/sess_288c2ecbbd77d07febfb30639b7b95ae, O_RDWR) failed: No space left on device (28) in /var/www/html/inc/init.php on line 265

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/inc/init.php on line 265

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/auth.php on line 432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/actions.php on line 38
apu_ubuntu [Ben's notes]

Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


PC Engines APU2 - Ubuntu 18.04 LTS server

Install Ubuntu 18.04 LTS on a PC Engines APU2 board.

If you're using an APU1 board, try the section Prepare a USB drive (optional) to create a prepared USB-drive first. Then boot from USB (press F12, during boot) and select Command-line install and proceed with the installation.

Install Ubuntu 18.04

  • dd Ubuntu server netinstall (mini.iso) to USB drive https://www.ubuntu.com/download/alternative-downloads, be sure to select the amd64 arch.
  • Connect the USB drive to the APU2 board and boot from USB, press F10 at boot.
  • Select Install, then TAB.
  • Change kernel options to linux initrd=initrd.gz console=ttyS0,115200
  • When asked to unmount mounted partitions choose Yes.
  • Install options as you like.
  • Reboot after install.

Post installation steps


  • At the grub menu, press 'e'.
  • Scroll to the line starting with linux and add:
  • Then press 'ctrl-x' to boot.
  • You can now log in with your user account.
  • Modify grub:
    sudo vi /etc/default/grub
    sudo update-grub
  • Reboot to test the update grub configuration.


  • Edit /etc/netplan/01-netcfg.yaml
    # This file describes the network interfaces available on your system
    # For more information, see netplan(5).
      version: 2
      renderer: networkd
              search: [mydomain, otherdomain]
              addresses: [,]
  • Apply config:
    netplan apply


  • Install and start openssh:
    apt install openssh-server
  • Enable firewall:
    ufw allow ssh
    ufw enable
  • Multi-user target (not graphical):
    sudo systemctl set-default multi-user.target
  • Configure timezone:
    dpkg-reconfigure tzdata
  • Configure locale:
    dpkg-reconfigure locales


It seems the sp5100_tco module is blacklisted by default in /lib/modprobe.d. We need to override that and blacklist some conflicting modules.

  • Blacklist conflicting modules:
    cat >> /etc/modprobe.d/blacklist-i2c-ccp.conf <<EOF
    blacklist i2c_piix4
    blacklist ccp
  • Update the initramfs:
    update-initramfs -u
  • Install watchdog:
    apt install watchdog
  • Add module to config:
    vi /etc/default/watchdog 
    # Load module before starting watchdog
  • Edit /etc/watchdog.conf:
    watchdog-device = /dev/watchdog
  • Reboot to test:
    dmesg | grep sp5100_tco
  • Kill watchdog, it should restart your system after some time:
    pkill -9 watchdog
    # if wd_keepalive is started, also kill that
    pkill -9 wd_keepalive

PC speaker

  • Install beep:
    apt install beep
  • Comment or remove pcspkr from /etc/modprobe.d/blacklist.conf.


Power / reset button, J2

  • ACPId is already installed and should be working.
    • Short press: shutdown
    • Long press: hard power off
    • When powered off, short press, will power on.
  • You can add a beep, just before shutdown.
    cat >> /etc/systemd/system/beeponshut.service <<EOF
    ExecStop=/usr/bin/beep -f500 -l50 -r3 -n -f1 -l50 -n -f400
    systemctl daemon-reload
    systemctl enable beeponshut

Prepare a USB drive (optional)

  • Install required packages:
    apt install xorriso isolinux
  • Extract downloaded ISO and copy the files to a temporary location:
    sudo mkdir /mnt/iso
    sudo mount -o loop ~/Downloads/mini.iso /mnt/iso
    cd /mnt
    tar -cvf - iso | (cd /var/tmp/ && tar -xf - )
    cd /var/tmp/iso
  • Modify isolinux.cfg
    serial 0 115200
    console 0
    include menu.cfg
    default vesamenu.c32
    prompt 0
    timeout 0
  • Modify cli / Command-line install: txt.cfg
    append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=788 initrd=initrd.gz --- quiet 
    append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=off initrd=initrd.gz console=ttyS0,115200n8 ---
  • Create a new ISO file:
    #Fedora host:
    xorriso -as mkisofs -R -J -V "Ubuntu-Server 18.04 LTS amd64" \
    -o ~/file.iso -b isolinux.bin -c boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin .
    #Ubuntu host:
    xorriso -as mkisofs -R -J -V "Ubuntu-Server 18.04 LTS amd64" \
    -o ~/file.iso -b isolinux.bin -c boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin .
  • Write the new image to the USB drive:
    sudo dd if=~/file.iso of=/dev/sdX bs=4M
apu_ubuntu.txt · Last modified: 2021/10/09 15:14 by