Alpine Install: from a disc to PC Engines APU

From Alpine Linux

Overall description: Alpine Installation from an official image tar file to a second generation PC Engines APU system (apu2, apu3, apu4).

This document will guide you to install Alpine on second generation PC Engines APU systems, it was tested with an apu2d4 and Alpine 3.11.6.

Terminology

  • BIOS: it's a system embedded into the hardware, that manages the early boot process, see more on the Alpine and UEFI page. Note that PC Engines APU boards have the legacy BIOS (MBR), not UEFI. Nevertheless Alpine Linux can boot from these boards.
  • New machine: the APU machine fresh and ready for the installation of the Alpine operating system.
  • Bootable USB: the USB-flash disk with the downloaded Alpine iso image as install media; this drive is commonly named USB stick.
  • Bootable microSD": a microSD card with the downloaded Alpine iso image as install media;
  • Serial port:: the APU has a DB9 connector used as serial port (RS232 protocol) for use as a character console. It is common in "headless" devices.
  • Source media: will be the just burned / disk from the downloaded iso file of the Alpine Linux operating system. Will be installed on the usb-port of the APU, or the internal microSD slot, to boot the install.
  • Target media: the disk in the APU where the Alpine operating system will be installed. The use of a mSATA disk is recommended, another choice would be microSD (less reliable) or (not convenient) a USB-flash drive.
mSATA, microSD, USB-flash which disk to choose?

Users experienced unreliable or failing installs when booting Alpine from USB flash drive and installing to mSATA. If you want to install on the mSATA drive use microSD as the installation disk, not a USB flash drive. Note that the default installation procedure uses the entire target disk. Recommended set up: For installation - on mSATA: use microSD installation disk - on microSD: use USB flash installation


Booting the Alpine installation disk

  1. The installation of Alpine Linux on APU has beent tested with the factory BIOS (MBR, no UEFI).
  2. Create_a_Bootable_USB thumb drive or Bootable microSD with the current standard x86_64 image from the downloads page.
  3. Attach to the serial port (you probably will need a USB to DB9 cable). PC Engines APU systems do not provide video output. Installation must be

performed via a serial console. On a linux system: switch from the graphical desktop to a console (Alt-Ctr-F1) to be able to use the function keys. Start the terminal emulator (minicom, cu) with serial settings: Baud rate: 115200 Data bits: 8 Parity: None Stop bits: 1.

  1. Power on the APU.
  2. When BIOS prompted, hit F10 and select to boot from microSD or USB.
  3. At the boot prompt, quickly type a slash to interrupt the default boot, which has a short timeout.
  4. Continue entering the remainder of this command at your leisure. It should have only one slash at the start, to be clear: /boot/vmlinuz-lts modules=loop,squashfs,sd-mod,usb-storage nomodeset console=ttyS0,115200 initrd=/boot/initramfs-lts
  5. Alpine should come up as normal.

Continue as per Installation.

How would be used?

Then choose type of installation .. those are described at Setup modes section at Alpine setup scripts wiki page. "sys" mode is the familiar install to disk well known for usage as main OS to computers.

After all a confirmation question will raised, type "y" if everything are ok and the setup will proceed to erase, format and copy the files to the destination disk choose!

After reboot

  1. Before rebooting, edit /boot/extlinux.conf.
    1. Add SERIAL 0 115200 as the first line in the file.
    2. In the APPEND line, replace quiet with console=ttyS0,115200
  2. Remove the thumb drive.
  3. Cross your fingers and reboot. The system should boot properly with console on serial.
  4. Edit /etc/update-extlinux.conf so that if extlinux.conf is regenerated it will retain these settings:
    1. Update the line with serial_port to read serial_port=0
    2. Update the serial_baud line to read serial_baud=115200
    3. Update the default_kernel_opts line to replace quiet with console=ttyS0,115200
  5. Run update-extlinux
  6. Examine /boot/extlinux.conf.
    1. Make sure it looks OK. Compare with /boot/extlinux.conf-old.
    2. If something looks wrong, mv /boot/extlinux.conf-old /boot/extlinux.conf to roll back the changes and try to figure out what went wrong
  7. Cross your fingers and reboot. The system should boot properly with console on serial.

See Also

  1. Alpine and UEFI