This is a set of configuration files for building a Debian installation CD optimized for the APU platform of PC Engines: http://www.pcengines.ch/apu.htm
As of 2024, the manufacturing of the APU hardware has been stopped.
This installation is only intended for an mSATA drive on the APU board. If you plan to boot from SD card, use Voyage Linux instead: http://linux.voyage.hk/
The configuration files build amd64 installer for the APU platform (APU versions 1, 2, and 3 have been tested).
The build machine MUST be of the same Debian release as the image that you are building: a Jessie host can produce a Jessie ISO, and a Stretch host can produce a Stretch ISO.
Before using these scripts, have a look at the files in profiles/, and you may want to change some options.
There are two profiles defined in profiles/ directory: "apu64" and "manual".
This profile is designed to automate as much as possible.
The default hostname is set to "apu", unless DHCP delivers a different name. Default root password is "pcengines", and it is defined in "profiles/apu64.preseed".
By default, the installer asks for the host name (this is the only thing that is manually entered). If you want to skip the hostname prompt, comment out the following line in "profiles/apu64.preseed":
d-i netcfg/get_hostname seen false
By default the installer requires that repositories be authenticated using a known gpg key. Uncomment the following line in "profiles/apu64.preseed" to disable that authentication. Warning: Insecure, not recommended.
The disk layout does not allocate a swap partition (the APU board has 2 or 4GB RAM). If you need swap, you can add a swapfile in root partition. The system is optimized for minimal swap usage: vm.swappiness=1 in /etc/sysctl.d/pcengines_apu.conf
The profile adds an hourly cronjob (/etc/cron.hourly/pcengines_apu_fstrim) which performs fstrim command on root and boot partitions once a day.
This profile disables the automation, and lets you choose the region, the debian mirror, the hostname and password, and it allows you to choose the disk partitioning that you need. You can also configure software RAID if you have multiple physical disks.
The manual profile does not install the fstrim cronjob.
The kernel boots with "elevator=deadline", which optimizes the I/O performance for SSD drives.
See also SSD optimization tips: https://wiki.freeswitch.org/wiki/SSD_Tuning_for_Linux https://wiki.debian.org/SSDOptimization
If you need a live or rescue CD, you can get a Live CD from Voyage Linux. It works fine, the only minor issue is that it switches the serial console to 9600 baud: http://linux.voyage.hk/
The SSH daemon has PermitRootLogin without-password
by default,
which disallows the root to login with a password. You either need to
install your public SSH key in root's autorized_keys, or change the SSH
daemon configuration.
WARNING: this is a fully automated installation. Once you boot from the USB stick, it will only give you 5 seconds in the initial menu, then in a couple of minutes it will ask for the hostname, and the rest will be done automatically, and a new Debian system will be installed on mSATA SSD drive.
!!! ALL EXISTING DATA ON THE DRIVE WILL BE LOST !!!
Debian Bookworm caveat: you need to select "Install Debian" in the Grub menu manually. Also, the installation takes significantly longer than for previous releases.
Both the build machine and the APU board need the Internet connection during the installation. The installer assumes that enp1s0 (marked as LAN1 on the APU board) is connected to a network with DHCP service and Internet access.
The installation ISO image is about 200MB in size.
Create the CD image on the build machine:
apt-get update apt-get install -y simple-cdd git xorriso lsb-release mtools
mkdir /opt/pcengines cd /opt/pcengines git clone https://github.com/ssinyagin/pcengines-apu-debian-cd.git .
./build apu64
fdisk -l
dd if=images/debian-9.1-amd64-CD-1.iso of=/dev/sdc bs=16M
Stanislav Sinyagin ssinyagin@k-open.com