home-assistant / operating-system

:beginner: Home Assistant Operating System
Apache License 2.0
4.48k stars 932 forks source link

HassOS data resizing timeout #3365

Open agners opened 1 month ago

agners commented 1 month ago

Fresh install on a Lenovo M90n-IoT with an i3, 4gb ram and a 128gb low-performance NVMe SSD. Computer had windows before on the drive. Booted Ubuntu Live, and used Disk to restore and image (HAOS 12.2) as per HA tutorial. After 1m30s, timeout to resize the data partition: [DEPEND] Dependency failed for HassOS data resizing.

Command line (From CTRL-ALT-F2) with blkid showed part p8 to be correctly labeled (hassos-data) Ping to 8.8.8.8 and local network worked.

What worked: Booted Ubuntu Live, used Disk to FORMAT DISK, with option "empty no partitions" and "slow write zeroes everywhere". Then used Disk to restore an image (HAOS 12.2) as per HA tutorial.

On bootup, resizing the SWAP took 30s, resizing data was so fast I did not see going trough (so, less than 2s). ... and now it works.

I'm enclined to say it's a bug, as strictly following instructions gives a dead-end. Maybe the data resizing needs more time on a non-zeroed disk to perform the duty? Why put a timeout anyway, if the whole thing fails when it fails?? If zeroing the disk is critical, probably something important is incorrectly defined in the disk image? Like not zeroing a trailing sector after a partition table that can add garbage to it?

Anyway, that is my first welcome to HA, and it's already a bug hunt. Hope this helps other users and devs! :)

Originally posted by @LionRelaxe in https://github.com/home-assistant/operating-system/issues/2272#issuecomment-2077001018

LionRelaxe commented 1 month ago

If I may add, instead of making the timeout longer, it could be removed altogether. There is no point to "cancel after a certain amount of time" (a timeout), as the HA installation is not viable afterward. Better let it hang there, so the end-user is immediately aware of what and where the issue is. I would suggest to replace the countdown with: A "counting up" timer, with a remark in this vein: "Resizing Data partition for HassOS, expect a couple of minutes: 12m34s elapsed" Thanks!