HA OS/Core: Set datadisk during onboarding

Hi,

Happy new year everyone! Now, mine started with a Samsung 980 1GB(latest fw btw) drive failing. Where was this drive? Yeah, HA was running this as its datadisk. Good thing i had automatic backups every second days from the great addon Home Assistant Google Drive Backup.

But, restoring this was not so simple. Due to the datadisk failure i had no access to HA, neither was it responding to “ha” commands over Serial actually, and over Serial i could see that the unit was not able to start containerd - no mention of a failing SSD, this was noticed first when i put the disk in my computer, some bad sectors there where… A quick reset and reinstalling HA again was done, but there where no possibilities to set datadisk during installation, and its kinda hard to get 20gb of data onto a 16GB CM4. So i have been trying and failing for a couple hours now. Would it be a good idea to bring the option of setting datadisk on this very first landing page? It sure would make it easy for alot of people i think.

For now i solved it by doing following steps

  • Reinstall HA following articles on yellow guides How to reinstall the operating system – Home Assistant Yellow
  • Plug in the new drive and reboot
  • Login via Serial, verify that the new drive is available “ha os datadisk list”
  • Move the datadisk “ha os datadisk move /dev/sdX”
  • Unit will reboot after a while, and then start to move data. Should be done in a minute sinces there is not much there.
  • Now go to the onboarding page and upload the backup - that will take a while