OS 12.2 upgrade left HA on grub menu, unbootable

Hi,
I’m using this section as I believe it’s the most appropriate
I clicked to upgrade to the latest HAOS (12.2) about 30’ ago.
Never came back up.

On plugging a screen and keyboard, I saw it was stuck on the grub boot menu
tried all entries manually. Tried power cycling, and did the same again.

It is not booting saying “error loading image” or something like that for entries A&B and nothing, just coming back to menu for the other 2 entries.

how do I fix this ? I’m not keen on reinstalling from scratch and loosing all my data…

I’m actually keen on a simple solution. I’m tired of plugin a live usb, copying the files, reinstalling and putting back the files and restoring and crossing fingers that this will all work after 2h spent…

thanks in advance for the help

EDIT:
there’s an issue open for this here (x86_64) HA OS doesn't boot when updating from 12.1 to 12.2 · Issue #3305 · home-assistant/operating-system · GitHub

1 Like

Can you provide more details about your installation please?

How to help us help you - or How to ask a good question.

Why would you do that when you can download backups locally to your PC or upload them to the cloud?

You could try to reinstall grub boot loader by booting it with some live distro or anything that can boot linux.
I was using this guide a few days ago and it does work.
Mine problem was that I was migrating my installation from 256 to 512 GB ssd and did messed something on grub side.

Ah yes sorry.
I felt so tired I forgot the basics.

  • It’s an old Intel atom Mobo
  • Hass OS install (12.1 to 12.2 upgrade), initially from September 2022
  • HA Version, well, the latest since I cannot access it anymore. So 2024.4.2 even if it’s only 3 days old. For sure nothing older than 2024.4.1

The last thing I changed in the past days was to start activating the mod us for my weishaupt heat pump. Home assistant remained functional across reboots with these changes until the update.

Let me know if you need more. If I can give I will.

I’m not a friend of the cloud.
My cloud is mostly my home servers.

I did not come around configuring the “remote backup” Service/addon/plugin.

In any case, that or downloading locally, you still need to bring it back on the Hass OS system somehow.

I always found that the backup system of HA has the merit of existing and still is quite cumbersome to use in Hass OS.

Personal opinion obviously :wink:
I’ll probably end up doing what i said I didn’t want to do… After I try restoring the grub

That’s a fairly easy thing to do.
I’ll give it a go when I have a moment.

I read “old Intel atom Mobo”; same here and also old AMD Bobcat (E-350) around, not really used, but I learned that although it has UEFI firmware, there are various timing differences at boot time and the UEFI way of booting is sometimes random failure/success. So went back to old MBR/BIOS way, but with more than 4 partitions (e.g. GPT) you need a extra ‘BIOS Boot partition’ in as first.

Now I don’t know (yet) which/what HAOS is using, I use it as EFI in a VM, but maybe that is an area to keep an eye on.

That will be a problem if it fails to install grub again. He will need a boot partition as a first partition. That was my case when I migrated my system to larger ssd. Luckily for me I created swap partition as a first partition,so I could create bios partition with out loosing data from drive. It should be around 200 MB.
But as he already installed haos he probably created boot partition in installation process.

Hi, I am stuck with the same problem after upgrading from 12.1 to 12.2 on a very old atom computer.

Is there something in the 12.2 release causing this? Or is it just a random coincidence it happened two persons with similar hardware?

Not very keen on losing all my configuration. Even if I can access the hdd and extract the files I imagine there will be a lot to fix to be back on track. If there is no way to fix it?

2 Likes

Same here. Stuck on grub menu after installing 12.2 OS update. Older setup, with embedded components.

my macbook air not boot after update 12.1 to 12.2.it was stuck on the grub boot menu

https://github.com/home-assistant/operating-system/issues/3305

One can create a BIOS Boot partition from sector 34 to 2047, that is almost 1MB, is large enough to fit the binary blob.

200MB is something you need for the FAT formatted ESP (‘the boot partition’), if it is a standard Linux EFI system (or VM) it can work with 1 default named .efi file, only a few MB in size, in VMs I have it 16MiB.

But I see that in the GRUB script, fixed partition numbers are used (2 and 4), so you need to manually edit that to get it booted, maybe it is done correctly by installer, but I am guessing. I am quite sure the A B method is not tested with ‘BIOS Boot partition’, also Debian split x86_64 and i386 w.r.t. GRUB package AFAIK, others do not.

This is my first time in a forum so I am sorry if i say some BS… but after this issue I found your comments very useful, lets try to add to the discussion with my case.
Same thing happened here, with my old Atom D2550 (I’m a little embarrassed to think now that I left the whole house trusting this little guy). After the update to 12.2 today it is stucked at boot screen…
I have installed yesterday HA backup in a raspbery pi 4 and it is working very sharp, looks like it is something related to the old processors and old BIOS. Do you thing that HA will be supporting those old machines again in next updates or is it time to retire these warriors ?

I currently don’t know enough about how this A B method works and how it is implemented. So I can’t say if the problem is due to this not working correctly or if it is an ‘old computer BIOS’ boot problem. Or maybe a combination.

Independent of HAOS, if you think or experience boot problems after reboot or power loss with an older computer, it is you yourself that has to fix or workaround it. If you don’t know how to do that, it might be worth to do a multi-year energy-cost calculation of older computers. In my case, 2 years ago with prices up to 1 Euro per kWh, I could easily buy a SingleBoardComputer with 8GB RAM and run the whole home automation stuff including router pihole database etc on it. You don’t have to throw away the old computers, but at least not power them 24/7.

This is extremely expensive. Here in Croatia electricity is less than 0.2 € per kWh and that is after prices went up a lot.

This is how the partition table looks like.
Nothing special. Kinda always looked like that with HA.

Interesting that other with similar hardware experience the same issue.

Please note that that hardware has been running HA since September 2022 flawlessly, and going through all updates and upgrades just as flawlessly until that one.

I came here looking for help, I see that we are several with the issue so I would say this warrants a bug report. I’ll check if there is one and either add to it or create it.

For the sake of precision I am running this on an Intel D525MW motherboard.

(Just as power efficient and powerful as a RPi)

Nothing looks out of place, yet it won’t boot further than grub

partitions 2 and 3 are kernel- and root filesystems of the 12.1 version, 4 and 5 of 12.2 version. So it is 4 read-only filesystems (squashfs, not ext4) where on normal vanilla ‘default’ Debian you have 1 partition root filesystem that this ext4 formatted and kernel is in /boot and its modules in /usr/lib/modules

If you really want things to get running again from the same SSD, what I do in such case is to pull out the SSD, plug it into some other computer and map its kernelblockdevice name ( e.g /dev/sdb) as main hd for a virtual machine. In that virtual machine you specify direct kernel-boot, so you need the kernel+initrd+dtb from the SSD, they are in partition 1. Pick the ones that represent haos12.2
As extra, specific the root=UUID=<the uuid of the filesystem>
In adition, add loglevel=8 for the kernel commandline.

Then start the VM and you should see all detailed bootlog, which might disappear again because HAOS might set it to level3 or so.

The same principle with real hardware, but usually x86_64 boards don’t have a serial port anymore so the kernel commandline option console=/dev/ttyS0 will dump into nirvana. Screenshots is not good enough sometimes, there are phases where a monitor might miss things, depends on various things. On ARM boards, there is usually some way to connect a serial console cable, so then you can do the same.

GRUB version2 is quite sophisticated, but if you manage/edit to delete all that A B stuff, you can point it to the proper kernel file and rootfs UUID.

What could be the case with Atom boards is that something is stored in UEFI flash. UEFI support multiple boot entries, they are a sort of device+file path of the .efi file to be loaded. If no boot entry is there, it will load <EFI-bootpartition>/EFI/BOOT/BOOTX64.EFI
Then there is secure-boot, something might have changed. Debian12 is 6.1.x kernel, not 6.6.x as HAOS uses, like RaspberryPiOS, it also uses 6.6 since a month or so.

Without detailed logs of GRUB and/or kernel, it is impossible to say what is wrong. I have a NanoPi-R6C which runs kernel 6.8 and has its own specific issues, but it has a dedicated USB-C connector for serial console that I can connect to a laptop or so, then easy to copy-paste bootlog/kernellog if needed.

just chiming in with a similar issue, ha stopped responding after the 12.2 upgrade. Sits at grub, this is haos on an ssd. Also using an Atom, a D2500 1.87ghz w/ 4GB of ram in this case. I did a fresh install of haos to the disk but it has the same issue. I’ll probably try and older version to narrow it down to a change in 12.2 or not.