Hi,
I'm new to this site but I've had a couple of APU's knocking around for about 9 months and rescued an ALIX box from a scrapheap a while ago too (branded as a Stonesoft FW-105) . It can be frustrating using these neat little boxes due to the lack of a graphics chipset, instead (as you all know I'm sure) the whole installation of any OS needs to be done over serial. I've researched the techniques for doing this on dozens of websites and I've ended up my own variation which I find the least complicated and thought I'd share it in case it might help someone. These are the advantages as I see them...
- You don't need to modify the original ISO (in this example a Debian 8.5.0 netinst ISO)
- You don't even need to mount an ISO!
- Debian will automatically find the needed Realtek non-free firmware without you needing to use an unofficial ISO
So here is how I do it anyway...
p.s. typically I'm running this on a Ubuntu Desktop as root (i.e. run 'sudo su') but any Debian derivative should do, also /dev/sdb is my USB pen.
apt-get install mbr syslinux p7zip-full
wget http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/debian-8.5.0-amd64-netinst.iso
umount /dev/sdb*
echo -e ",16,6,*\n,,17,"|sfdisk -uM /dev/sdb
install-mbr /dev/sdb
cp debian-*-amd64-netinst.iso /dev/sdb2
mkdosfs /dev/sdb1
syslinux /dev/sdb1
mkdir -p boot; mount /dev/sdb1 boot
7z e debian-*-amd64-netinst.iso install.amd/vmlinuz install.amd/initrd.gz -oboot
wget ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-realtek_0.43_all.deb -Pboot
echo -e "default vmlinuz\nappend console=ttyS0,115200n8 initrd=initrd.gz" > boot/syslinux.cfg
umount boot; rmdir boot
sync
In english this is what that does...
- Install packages mbr, syslinux and p7zip-full (so we can use install-mbr, syslinux and 7z respectively later on)
- Download the Debian netinst ISO version 8.5.0 (change this URL as new versions come out)
- Unmount any filesystems your desktop might have automatically mounted from your USB pen
- Make a tiny bootable 16 MB partition and use the rest for a 2nd partition to hold the ISO
- Clear away any old master boot record that might be on the USB pen
- Copy the ISO to that 2nd partition
- Format the 1st partition FAT16
- Load on to the 1st partition the SYSLINUX boot loader
- Make a temporary directory and mount the 1st partition to there
- Extract the kernel and initial ramdisk from the ISO to the 1st partition
- Download the non-free Realtek firmware package from Debian to the 1st partition
- Tell SYSLINUX what to boot and console settings (change if your baud rate, etc... is different)
- Unmount and remove the temporary partition
- Commit any leftover data in the buffer meant for the USB pen now
When you boot this you'll get the normal Debian installer (as though it was a normal PC with graphics and you'd popped a CD in).
Unfortunately when you boot up for the first time, the Debian installer only told GRUB how to display its own menu over serial and doesn't tell it how to load the Linux kernel with the right serial settings. So hit 'e' to edit the menu option and plop 'console=ttyS0,115200n8' at the end of the line that starts 'linux', once you're booted up and logged in you can permanently fix this with these commands...
sed -i 's/^\(GRUB_CMDLINE_LINUX=\).*/\1"console=ttyS0,115200n8"/' /etc/default/grub
update-grub
Which basically just adds the option in to a GRUB configuration file and then reloads GRUB.
If you fancy updating your firmware from your new Debian 8.5.0 system then the tool is right there in the repository and can be done this way...
apt-get --no-install-recommends install p7zip-full flashrom
wget http://www.pcengines.ch/file/apu140405.zip
7z e apu*.zip
flashrom -p internal -c MX25L1605A/MX25L1606E -w apu*.rom
Lastly if you want to see how hot your box is getting just do this...
apt-get --no-install-recommends install lm-sensors
sensors
Now in theory some of this might also work on the ALIX but I haven't tested that recently, just be sure to check baud rate and also they might not need that non-free firmware.
Also you might find this works with the Ubuntu too, but I'd recommend trying this with a Ubuntu ISO that doesn't attempt graphics (didn't Ubuntu used to have an "alternative installer"!?)
Steven