I managed to boot home-assistant OS from coreboot + grub on an old Thinkpad lx201 with this. It just doesn’t do it automatically yet. Anyhow, this demonstrates that UEFI isn’t strictly required; probably just support for booting from GPT partitioned disks and somehow doing it automatically. I think having the APU boot from a USB drive which only loads Grub with the configuration for home-assistant OS might work.
Do you think it also possible to run HA supervised on an APU2 board? that would be an interesting usecase to me. I’m currently running PfSense on a APU2 board, and there is a second unused slot in the case. The 8 Gb RAM is a real nice to have for some additional containers
Nice. Further to this, to install grub and avoid the (potentially unreliable) use of blocklists, add a bios-boot partition (type 0xEF02) before the first partition. The ‘–force’ option is no longer required anymore as the grub image now has a proper home.
After writing the HAOS image, I used gdisk to create another partition (numbered mine 99) from sector 34 to 2047, of type ‘EF02’. Write the partition table, saying ‘Y’ to move the backup partition table elsewhere.
Continue from above, mounting /dev/sda1 to /mnt, etc.
One further thing I did was to add console=ttyS0,115200 to the end of the default_cmdline var in the existing HAOS grub.cfg (/mnt/efi/boot/grub.cfg).
Then unmount, reboot and watch the boot process over serial (which on first boot, expands partition(s) to disk size, etc.)
I did this. It worked great. However, it doesn’t take upgrades to the OS. I did this with 10.4 and spent a few weeks trying to figure out why 10.5 was not persisting after reboot and I finally came to the conclusion that it won’t work because of the way this was installed on the APU. The upgrade does go to SLOT B, and if you interrupt the boot (after an update), and manually pick SLOT B, it will boot to 10.5. However, on a reboot, it will go back to the original SLOT A which is 10.4. I had gotten some help over on github but no solution to fix this (or make it persist). HAOS 10.4 to 10.5 shows successful, reboots, stays on 10.4, suggests 10.5 upgrade · Issue #2766 · home-assistant/operating-system · GitHub
I have officially left the APU and gone to a NUC. It was a kludge to deal with. HA requires so much time and effort that I have to simplify my life where I can, and this was on small win. My advice is to not use the APU at all. With cheap chinese NUCs being $85, it’s not work the effort.
So, I wanted to do this as well. Raspberry Pi was a bit slow, and the apu2 (4 GB model) came free since I moved from OPNsense to Unify.
I’ve decided to build go the custom firmware route since that seemed to be the easiest solution on the HASS side.
Followed these instructions from GitHub and edited the cmdline.txt file on the hassos-boot partition to console=ttyS0,115200. After that, everything seems to work like a charm. I’m still waiting for the restore to finish, but I don’t see what could go wrong from here.
Upgrading HA works just fine, but upgrading the OS requires manually selecting Boot B on reboot if that’s where the next version was installed. For some reason it always defaults to A. By the way this is on a Thinkpad X201 with coreboot + grub. I assume it is the same on APU.