Install HA on old laptop without UEFI

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.

1 Like

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.

1 Like

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.

3 Likes

@ 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!!

1 Like

grazie!! guida perfetta :smiley:

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.

1 Like

A huge thanks to you! It works perfectly on a Toshiba Satellite A200 which does not have UEFI in the bios (@carloshurtadom) :star_struck:

THX!)
works for lenovo thinkcentre e73