Help needed installing HAOS to USB NVME Enclosure on Vim3

Which system do you use? Android, Ubuntu, OOWOW or others?

Want to use: Home Assistant OS

Which version of system do you use? Please provide the version of the system here:

Any version of HAOS

Please describe your issue below:

Hello. A noob looking for help here.
I’d like to use a VIM3 for a HA machine, and I would like it to use the HA OS.

I currently have a USB m.2 NVME enclosure which I was using with a rpi4.

I have been able to install ubuntu on the said NVME and get it to boot.

However, my attempt to install HAOS on it have so far failed:

  • installing the haos provided with oowow flashed on the nvme through etcher causes boot logo loop.

  • installing the haos generic aarch64 image from home assistant git and using Key Mode to bypass emmc goes through the boot sequence, but does not successfully boot into home assistant with many different errors popping up.

It would be very appreciated if someone could help me with how I can make this work.

Post a console log of your issue below:


**Delete this line and post your log here.**

Hello @viraniac

Do you have any suggestion about this issue?

1 Like

@shshin6310 Could you please confirm the following?

In case you are connecting NVME drive directly to the M.2 slot on vim3, you can follow the instructions given below.

  1. Download and flash the HA image to NVME drive. You can use balena etcher or raspberry pi imager for the same.
  2. Download and flash OOWOW to sdcard.
  3. Connect your drive to M.2 slot on VIM3. Use sdcard to boot to OOWOW.
  4. In OOWOW, it will by default run wizard to download image, choose exit
  5. Go to Device Configure menu and use the option to set port mode to pci. Vim3 will power down. Boot again into OOWOW and exit the wizard.
  6. In the OOWOW main menu, there is option for rescue shell, use the same. You would drop down into linux terminal
  7. Run the following command to flash spi with Armbian’s u-boot
# mount /dev/nvme0n1p1 /mnt

# cat /mnt/usr/lib/linux-u-boot-current-khadas-vim3/u-boot-spi.bin | spi_update
[i] disabled mmc / enable spi
[i] spiupdate => /dev/mtdblock0 (16777216 - 4096)
###  all blks wrtd same
007 0306 4096 0135 0171
[i] enable mmc / disable spi
SPI flash update DONE
  1. Now we can set spi as the boot device, We can do this from UI as well, but as we are already in the shell, we can use
# kbi bootmode spi save
[i] /opt/kbi spi -> spi
[i] power off

The device would have powered off. You can now remove SD card and boot directly into HA on the NVME drive. On first boot, it runs a script that asks to set username, password, wifi credentials, etc. Do the same and then reboot once again. After reboot, it might take upto 10 minutes to setup HA containers. You would then be able to access the HA web console on port 8123 via a web browser.

I am also checking with using HA with a usb nvme enclosure, will share the instructions for the same shortly

2 Likes

@numbqq @viraniac Thank you guys for the response!

  • I have been using the wrong image, but have downloaded the image that you have linked and flashed it into the NVME.
  • I am trying to use my usb nvme enclosure as that will allow me to use my current case and cooling setup!

I have followed your guide until step 6, and is waiting for further instructions!

Edit:
I managed to boot into Ambian from my usb enclosure (though I’d still like to know how to flash spi with Armbian’s u-boot (do I just need to change /dev/nvme0n1p1 to something else?)

But one more question: Is there a way I could use a Home Assistant OS image instead of this homeassistant-minimal version?

Again, thank you very much for your help :slight_smile:

@shshin6310 The instructions are mostly the same, with two small changes

  1. In step 5, we need to set port mode to usb3
  2. In step 7, the device will be /dev/sda1 instead of /dev/nvme0n1p1

Rest stays the same.

Glad to hear it worked for you. Sadly it didn’t worked for me and hence the delay in replying back to you. May be there is some issue with my enclosure.

yes, just change that to /dev/sda1

Will check and get back on the same.

1 Like

I found Home Assistant OS development builds for vim3 - Home Assistant OS - development builds. There is also a release version - Releases · home-assistant/operating-system

Haven’t tested them, will give them a try and get back on the same.

1 Like

The release version was the ‘wrong’ image I tried to use before, and both it and the development HAOS build result in boot logo - reboot loop sequence.
The hassos-boot partition shows just

  • boot.scr
  • haos-config.txt
  • cmdline.txt
  • meson-g12b-s922x-khadas-vim3.dtb
    So I am guessing this needs to be changed somehow? It would be awesome if you could give me pointers on how to do this. Thanks!

The boot.scr has commands hardcoded to boot from emmc or sdcard only. I have raised a PR to make it flexible. If it gets accepted, then it would be possible to run future releases from usb or nvme drive using a custom u-boot flashed to spi.

I have made a test image if you wish to give it a try - HAOS - Google Drive. For u-boot, I have modified Armbian’s u-boot to support booting HA OS image, changes for the same can be found here

Flash haos_khadas-vim3-14.2.dev0.img.xz to your nvme drive. Reconnect it to the computer and copy u-boot-spi.bin to hassos-boot partition. Connect the drive to vim3 and boot into oowow. Go to the rescue shell and run the following commands

# mount /dev/sda1 /mnt
# cat /mnt/u-boot-spi.bin | spi_update
# reboot

It should boot into HA OS. HA OS requires ethernet to be connected on first boot, to download components of the internet. I have only tested the image by booting it off a usb pendrive, functionality wasn’t tested. It’s possible it might have some bugs as its based on the dev branch code, but I hope the image will be helpful for you.

2 Likes

This worked and HAOS is up and running!

Thank you so much for helping this rather particular case.

Much appreciated and you are the best! :smiley:

1 Like