=====PC Engines APU/APU2 - Debian 12, Bookworm===== **2023-09-14** - This is a manual install guide for installing Debian 12 Bookworm on the PC Engines APU/APU2 board. It is a network based installation, you'll need to have a working internet connection using one of the Ethernet ports. ====Documentation sources==== * [[https://www.pcengines.ch/apu.htm|PC Engines APU Board]] * [[https://www.pcengines.ch/apu2.htm|PC Engines APU2 Board]] * [[https://wiki.debian.org/DebianInstaller/CreateUSBMedia|Debian - Manually copying files to the USB stick]] ====Required hardware==== * APU board * Power supply * Internet over Ethernet * Serial (via Serial<->USB adapter) * mSATA SSD ====Install Debian 12, Bookworm==== * [[https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.1.0-amd64-netinst.iso|Download the amd64 netinst ISO]] (a DVD image for offline install might work, not tested) * [[https://deb.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/hd-media/boot.img.gz|Download syslinux installer]] * Copy syslinux image to USB:zcat boot.img.gz | sudo dd bs=4M iflag=fullblock of=/dev/sdX oflag=direct status=progress * Re-insert and then mount the USB drive:sudo mount /dev/sdX1 /mnt * Configure a serial console, edit /mnt/syslinux.cfg and add the 'serial' line:# D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) path prompt 0 timeout 0 serial 0 115200 include menu.cfg default vesamenu.c32 * Copy the netinst ISO image to the USB drive:cp debian-12.1.0-amd64-netinst.iso /mnt * Unmount the USB drive:umount /mnt * Boot the APU board from the USB drive (APU Boot menu = F12, APU2 = F10):Build date: Apr 5 2014 System memory size: 4592 MB Press F12 for boot menu. Select boot device: 1. AHCI/0: KINGSTON SMS200S330G ATA-8 Hard-Disk (28626 MiBytes 2. USB MSC Drive SanDisk Ultra 1.00 3. iPXE (PCI 00:00.0) 4. Payload [setup] 5. Payload [memtest] * Press ''i'' and * Then change the command into the following:linux initrd=initrd.gz qfxpayload=text console=ttyS0,115200n8 * Press to start install. * During installation, deselect any desktop environment and select the ''SSH server'' and ''standard system utilities''. * **If the console setting is not saved during next boot, i.e. no output to serial console, follow the next steps.** * Edit the grub entry (press ''e'' in grub menu) and add console=ttyS0,115200n8 to the linux command-line parameters \\ {{::screenshot_from_2023-09-20_22-11-21.png?nolink|}} * Press Ctrl-x to boot * Log in and edit /etc/default/grub:GRUB_CMDLINE_LINUX="console=ttyS0,115200n8" * Update grub:update-grub * Reboot ====Post-install==== ===Firewall=== * Configure default firewallcp /usr/share/doc/nftables/examples/workstation.nft /etc/nftables.conf vi /etc/nftables.conf # accept port 22 for example systemctl enable --now nftables ===APU2 LEDs=== Configure front LEDs to blink on network and disk activity. * Add ledtrig modules to ''/etc/modules''. cat >> /etc/modules < * Load the modules with ''modprobe'' * Add settings to sysfs.conf: # Install sysfs utils apt install sysfsutils # Append config to /etc/sysfs.conf cat >> /etc/sysfs.conf < * Enable sysfs:systemctl enable sysfsutils * Reboot ===Watchdog=== * Enable watchdog in BIOS, set timeout for example to 300 seconds. * Disable i2c_piix4 [[https://pcengines.github.io/apu2-documentation/theory-of-operation/]]cat > /etc/modprobe.d/noi2c.conf < * Update initramfs.update-initramfs -u * Edit ''/etc/systemd/system.conf'' and enable watchdog.RuntimeWatchdogSec=60 * Reboot * Test the watchdog by pausing the init process. It should reboot after the configured timeout.apt install gdb gdb -p 1 {{tag>[hardware apu debian linux ]}}