This worked like a dream. There appears to be one issue, though. On OS update, it appears that the EFI/BOOT/grub.cfg is overwritten.
My BOOT_ORDER
was set to B A
. I applied this fix, and it worked, booting to Slot B. After an OS update, it started booting to Slot A. I thought that everything was working as it should. Then, in the next update, it kept booting to Slot A. I inspected the EFI/BOOT/grub.cfg
and the updates were gone.
Yeah, thatâs because the image contains the grub.cfg file. So it will overwrite it each update. To avoid this you can point your grub to use a different file like âgrub_custom.cfgâ. Of course copy the grub.cfg contents there and modify them. I am using this and it works. The downside is that if anything changes in the grub.cfg your custom one will not reflect that, but it shouldnât change too much anyway.
Makes sense.
My understanding of Grub isnât extensive, but looking at the config, Iâm unsure why manually specifying the env locations works. Theyâre not in âcustomâ locations.
Since we are pointing boot/grub/grub.cfg to the efi grub.cfg⌠is the load/save_env looking at the env in /boot/grub? If so, why isnât that being updated accordingly?
As Iâm thinking about it. I manually edited the /boot/grub/ env files and the changes were not recognized. So itâs almost like the env isnât loaded unless directly pointed to. And since it doesnât load it⌠it will always use the default BOOT_ORDER of A B
I take it that itâs not possible to do this from within HA using the terminal interface?
Iâm trying to do this remotely and have limited tools and even more limited knowledge of how to use these tools.
hello. we donât have that much technical knowledge. can you please explain in a video?
Just a friendly suggestion that may help you in the future⌠It is generally considered bad form to respond to a post that is older than a year old (essentially resurrecting a post) without something specific to add to the subject at large (asking for a video doesnât add) and youâve basically just asked someone to do research for you. Those two things generally dont attract responses.
Instead, youâll get better responses if you try to do it yourself - and then if you run into issues open a new thread, explain as much as you can about your condition and see if someone can help.
@ dbrand666
You just saved an old laptop. And youve saved me TONS of money. Thanks so much for taking the time to help the community writing this post!!
grazie!! guida perfetta
I just tried this on an IBM / Lenovo Thinkcentre M92P SFF i5-3550 deskop PC and it worked. Thank you @carloshurtadom
Looks like some Lenovo and IBM machines always look for a windows installation and if it doesnât detect one it always gives Error 1962, see https://gist.github.com/vees/b3fb1e5b62da155a006831c16eaac8e8
Error 1962: No Operating System Found
So the only way to get Home Assistant OS to work is to install grub on the boot partition of the drive (in my case the SSD drive that I had flashed the HAOS image to using another PC using an SSD to USB adaptor and then physically installing the flashed SSD to the Thinkcentre M92P PC).
In the BIOS youâll also have to configure the startup options with CSM (Compatibility Support Module) enabled and with âLegacyâ boot mode (Ie. Non-UEFI). In the Devices / ATA Drive Setup section of the BIOS also made sure that âConfigure SATA asâ was set to âIDEâ and âNative Mode Operationâ was set to âEnabledâ.
I used a Live USB version of Parrot OS Home and had pre-flashed Home Assistant OS image to an SSD drive. So booted up the PC with the Parrot OS Live USB, opened up the terminal and followed the instructions by @carloshurtadom:
Mounted sda1
sudo mount /dev/sda1 /mnt
Installed grub2
sudo apt install grub2
sudo grub-install --compress=xz --root-directory=/mnt /dev/sda --force
Configured the grub.cfg file
cat <<! | sudo dd of=/mnt/boot/grub/grub.cfg
set root=(hd0,gpt1)
configfile (hd0,gpt1)/efi/boot/grub.cfg
!
Note you can also create the grub.cfg file using nano:
sudo nano /mnt/boot/grub/grub.cfg
and input the following text in the cfg file:
set root=(hd0,gpt1)
configfile (hd0,gpt1)/efi/boot/grub.cfg
then CTRL-X to save and exit.
Unmount sda1
sudo umount /dev/sda1
Closed the terminal
exit
Shutdown pc, removed Live boot usb and then booted up into the HAOS setup.
A huge thanks to you! It works perfectly on a Toshiba Satellite A200 which does not have UEFI in the bios (@carloshurtadom)
THX!)
works for lenovo thinkcentre e73
Hi, iâm triying to install HAOS in a old MSI CUBI B120. Iâve followed instruction and finally get grub at boot but i canât lauch HAOS ⌠with slot A i get error : cannot load image.
and with slot B error : unknown file system
Can you help me please ?
any one can help ?
Hi @jscongdon was wonding if you were able to find a solution to this issue. Iâm getting a similar issue with the boot slots and HAOS booting to the older OS version in Boot Slot A instead of the updated version 14 in Boot Slot B.
Similar issue:
I have not found a permanent solution for this. I end up just manually booting to the proper slot. The machine rarely loses power so it hasnât been an issue if have to manually select it again.
This soulution from Patrice3122 worked: Cannot upgrade from 12.4 ¡ Issue #3566 ¡ home-assistant/operating-system ¡ GitHub
1. Downgrade Slot B: On the localhost, I first downgraded Slot B
to an earlier version using the command: ha os update --version 13.1.
NB: Any attempt to update directly to version 13.2 returned
the message: Version already installed.
2. Manual Boot Selection: During the startup process, I manually selected
Slot B from the boot menu. Note that the boot menu appears briefly during startup.
To select Slot B, you must press the down arrow key, and once highlighted,
press the Enter key to confirm.
3. Update Slot A: With the system booted from Slot B, I ran the CLI
command: ha os update --version 14.0. Since the system was
running on Slot B, the update process applied to Slot A.
4. Final Verification: After a host reboot, Home Assistant OS 14.0
was successfully running, booted from Slot A.
I needed to plug in a monitor to change the boot to Slot B
any Solution for old PC without UEFI. ?