How to: Supervised HA install on Odroid N2+ (and others) with clean Debian 12

UPDATE: The os image was just migrated from Debian 11 to 12 to be consistent with HA.

While this topic indicates it works for Odroid N2+ the approach has been tested on a Raspberry Pi 4. There is a post that shows an individual used this method to install on a Banana Pi M5.

This topic provides an easy way to get HA up and running on an officially support version of Debian running on the Odroid N2+ platform on an eMMC hard drive. The N2+ with eMMC blows the raspberry pi 3 & 4 away from a performance perspective. The debian distro comes from this project on github. This is a clean version of debian set to work on a number of hardware platforms. The project provides an easy way to build an os image file and future updated kernel packages. If you need to talk with someone they are available on discord. The project must be installed on either Debian Bullseye or Ubuntu Jammy Jellyfish. If you have a one of these system you clone the repository and run the ./install script to get all the needed packages installed. The projects will run on either a native arm system or an intel/amd 64 bit process using a cross compiler. The install script handles getting every thing installed. I personally use a virtual machine running Debian Bullseye and installed the project on the VM.

Once you’ve run the install script you have to create a user configuration file which provides details used to to build your kernel and image files. This is handled by running “make config”. This gives you the following screen to enter your details.

The only three things you really need to update are the Name, Username and Password. The U-Boot and Branch will be different as they are updated as new releases are incorporated. So use whatever value comes in this area. Once you submit this you can then start the process of building and image with the command “make menu”. Which gives the following:

Select the Odroid N2+ and hit OK and you get this menu:

Select “Make All” and you’ll be off to the races. When it completes it’ll give you the name of your image file which you can then burn on your eMMC drive. I believe the same image will work on the SSD drive. The image is a command line only interface to the operating system. You can either connect with the console port available on the N2+, via the hdmi/keyboard interface or via ssh if you have a NIC cable connected.

When you first log in you should run “setup -r” in order to set local and timezone information. You can then run the “menu-config” command which provides this menu:

The Software option currently supports installing one product on top of the OS and that’s Home Assistant in supervised mode. Follow the prompts and home assistant, along with dockers and all other required packages will be installed. When the supervised install script runs you’ll need to select the Odroid N2 as the installation platform. Once the this install completes you will still have some time while all the HA docker containers are downloaded. You can exit the menu-config command. Once port 8123 is available on your system the install is complete.

That’s it, pretty simple. I realize some might not have a Debian Bullseye system to build the image. If requested I could look to post an image file from my build system.

If you’re wondering why you might consider using your own OS load instead of using the pre build OS/HA image provide by the Home Assistant team, I’ll give you a couple of reasons.

  • Adding cellular backup requires you to make some changes at the OS level. There are other ways to do cellular backup, but this way provides cellular to back up only to your HA system. This can greatly reduce the cost for the cellular backup.
  • Easy GPIO integration of existing wired door or window sensors.
  • Easy integration using shell commands for a full house audio system
  • If you have your own domain name, an easy way to generate a wildcard cert and us it with the HA GUI and any other service you might be trying to provide access to in HA. See the web integration from the last item to HA.

There are lots of reason having access at the OS/shell level can be useful for building out your smart house.

2 Likes

An individual reported they successfully used this approach to install Debian on a Banana Pi M5. When they ran the supervisor install they selected the Odroid N2 as their target platform.

Hi!

I followed above mentioned steps an was able to install it on an Odroid n2+ mmc.

After the supervised HA install has complete and the HA System was setup (backup / restore from an RPI4 installation) I am currently faced with the only error, that CGroups V2 is configured, which is not supported by HA.

I am currently struggeling getting the OS reconfigured to V1 - the supervised installer is normally doing this as long as grub is used as boot loader. But this image is using u-boot. I have not found any working documentation how to set kernel parameters with u-boot.

Any suggestions?

So you fix that V2 issue by setting a kernel parameter. You can set kernel parameters by editing /boot/extlinux/extlinux.conf. Last I ran the menu-config it set these options correctly. I’m building a new image file now to test things out. My extlinux.conf file looks like this:

label default
	kernel ../Image
	initrd ../uInitrd
	fdtdir ../amlogic/
	fdt ../amlogic/meson64_odroidn2_plus.dtb
	#fdtoverlays
	append earlyprintk console=tty1 console=ttyAML0,115200n8 console=both rw root=PARTUUID=d7121719-01 rootwait rootfstype=ext4 fsck.repair=yes loglevel=1 net.ifnames=0 no_console_suspend mitigations=off iommu.passthrough=1 clk_ignore_unused usb-storage.quirks=0x152d:0x0576:u init=/sbin/init systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false usbcore.autosuspend=-1 usbcore.autosuspend=-1 clk_ignore_unused  cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory apparmor=1 security=apparmor

Turns out that the issue was cause because petiboot was selected for the image build option. Uboot is the desired means for booting on odroid N2/N2+ with distro build. The install script has been updated to print out a note on how to configure kernel options if it detects petiboot is being utilized.

Hi, went trough this topic and did not came across the answer I’m looking for. I have HA - OS (all latest versions) running on a Rpi4b booting and running from an Samsung usb stick. Now I have bought a casing (DeskPi Pro V2) and a fresh ssd (samsung). Would it be possible to clone the usb stick and have that image flashed onto the ssd?
I know I can also take a backup and flash a fresh OS on the ssd and do a restore. Or will the behaviour be the same? Than it might be quicker to just flash a new OS.
My concern is that I than need to renew passwords? And I also will lose the fixed ip that is has now?

First tried it with a clone of the usb but that did not work. Installed the new OS and when the new HA started up before entering any settings choose for restoring backup (did a full restore) and after that it seems to work. So now it is running from the ssd. Nice :slight_smile:

With in HA you can do a backup from settings->system->backups menu. This will copy all HA setting, including account information used when you connect via the web browser to HA. Once you reload this backup into your fresh HA install, all of the password will be copied over. I’ve never used HA OS, but if you set a fixed IP address within HA OS it might also get copied over as well. I don’t use HA-OS but I suspect you have to provide a password on the install, assuming this is true you would have to set this password again if you load the ssd with a fresh HA install. As for the fixed IP address, this would depend how it is set. If you have your home route assign a fixed address to your PI then that IP will still be assigned when booting a new copy of HA OS on the new ssd, as routers assigned address by MAC address. The MAC address should be tied to the hardware, so the IP address for just be assigned again. If you set the IP address when you built the USB drive, then I suspect you would have to set it again or configure your router to assign the IP you want to the PI MAC address.

I’ve cloned lots of drives, but I’ve never tried to clone a USB to ssd. I suspect it could work. Assuming the ssd is larger than the USB drive and you have access to a linux system you could try using the “dd” command to make the clone. If you’re using windows, there are a number of programs that can clone drives, you would just need to make sure you get a legitimate program and not some Trojan off the internet.

Looks like you got it worked out while I was typing a response. Good deal.

1 Like

I just did a rebuild of my system a few weeks back using this approach and it still works find. The rebuild was done in response to the Nabu Casa security vulnerability. As such it was a rebuild from the ground up, without using the HA backup/restore capabilities. All is good and the image is fully HA compliant.

Just updated this HA install script in this Debian distro to work with bookworm instead of bullseye. This is to be consistent with the current supported HA version of Debian. As mentioned in the first post the discord channel associated with this distro is a great resource for getting this image up and running. While the distro is design for you to build an image directly of the Debian repo, those on the discord channel have been know to provide full images in the past. The HA install has only been tested on the Odroid N2+, but I suspect as the distro supports a lot of different ARM boards it can probably been installed on other boards. In the past other mentioned success install it on Raspberry Pi’s and Banana Pi’s.