Install HA on old laptop without UEFI

It worked!!! Thank you @dbrand666, unfortunately now I am stuck in perpetual “Preparing Home Assistant.” In its long script at the end it reads: “23-01-23 18:06:06 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec”

BTW, this is my third installation of HAOS.

May go now to: Installing Home Assistant Supervised on Debian 11

Made a last-ditch effort with an operational and updated install of HA on an SSD of an UEFI x86-64 system. I applied your instructions from there and it’s working wonderfully
I think the problem was how the install of HA from github.com created very small partitions and giving an error of not enough space on the dev/sda8.
I am grateful for you help and hopefully the system will be stable – thanks again very much!

Not enough space on sda8? Any chance you put sda9 right after sda8 instead of telling gparted to place it all the way at the end of the drive?

Maybe @blind-oracle 's suggestion of installing GRUB right into sda1 is easier to follow. Sorry.

I did put sda9 right after sda8. I will try again with the other drive; but I need a bit more help understanding @blind-oracle instructions - thanks @dbrand666!

BTW sda8 used up all the rest of the space on the drive. I had to reduce its size to get the 10MBs to create the sda9 partition on the UEFI system that I used.

sda8 doesn’t get expanded until you boot for the first time. You should be able to create an sda9 at the end of the disk right after you copy the HassIO image to it. Make sure to say yes when gparted asks you whether to fix the disk

As for @blind-oracle 's instructions, just skip the part where I had you create the sda9 partition and mount the existing sda1 instead.

Thank you both @dbrand666 and @blind-oracle – its working great! This is how I did it (hoping it helps other newbies) with both your help:

Using Debian 11 Live I installed HAOS @ Terminal:

Logged in as root user

sudo su -

Downloaded and installed Home Assistant

curl -L https://github.com/home-assistant/operating-system/releases/download/9.4/haos_generic-x86-64-9.4.img.xz |xz -d >/dev/sda

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

Unmount sda1

  • sudo umount /dev/sda1
  • exit

Closed Terminal, shutdown pc, removed Debian 11 Live boot usb and restarted x86-64-bit system with a non-UEFI Legacy BIOS.

Thank you both, I could not have done it without your support – onward to Automation Creation!

14 Likes

Hi @carloshurtadom!

Your post is very useful for newbies. I have followed all your steps with some modifications:

  1. -force must be --force
  2. Before install grub 2 I must make an apt update (if not throws an error that grub2 doesn’t exists)
  3. unmount must be umount

I was able to install grub but HAOS doesn’t start and I don’t know the reason. I attach you a screenshot. It’ seems that there is no fail in any step, but I’m not sure. I hope you can help me. Thanks in advance

Saludos @zantos, thank you for your help; I made the typos corrections.

I am a newbie too and hope that others can help; @dbrand666 & @blind-oracle were very helpful to me.

Sorry I do not know enough to make any sense of your screenshot.

All the best

1 Like

@zantos

What happens when you hit enter there in GRUB? Nothing?

1 Like

Thanks @carloshurtadom! Don’t worry, your guide was very very very useful for me.
@blind-oracle , nothing happens, the cursor blinks but HA never starts. I have tried installing a Debian and try to running Supervised install with hassinstall installation script and the process stops at “Start and initialize containers” step. I have connected trough SSH to check activity (screenshot attached).

What kind of hardware you’re installing it to?

@blind-oracle, in a Asus EeePC 1000HD, with a Intel Celeron M353, 2GB DDR667 RAM and 40GB HD.

Well then that’s what I suspected. It’s too old, it doesn’t support 64bit instructions, only 32bit. So Home Assistant OS won’t work there.

1 Like

Hello,

I’m very grateful for finding this thread! I managed to install HAOS and get it booting from BIOS on an old laptop based on the instructions here.

Basically I used @matys.home 's instructions and method. Having very little experience about Linux, this required several attempts before I was successful.

The steps provided by @carloshurtadom is what I tried first but I don’t fully understand how those steps alone can work since installing the HAOS image will wipe the disk clean of everything else if I’m not mistaken? So I just ended up in the situation that when trying to install grub with sudo grub-install --compress=xz --root-directory=/mnt /dev/sda --force then Debian was telling me that there is no BIOS boot partition on the disk which as far as I understand is correct after just having installed the HAOS image. Maybe I’m missing some point to be successful with this method?

But thanks for both anyway since there were useful points in both instructions.

What I did at the end:

  • Had an SSD set up as GPT in the laptop

Booted to Debian Live 11 from USB

Installed HAOS image

curl -L https://github.com/home-assistant/operating-system/releases/download/9.4/haos_generic-x86-64-9.4.img.xz |xz -d >/dev/sda

Installed gparted

sudo apt install gparted

Launched gparted from GUI which informed me that the partition table doesn’t include the whole disk and I let gparted fix it. This was crucial step at least for me for next steps because otherwise Debian installation to same disk was not possible as the full unallocated space left on the disk was not usable in the installation before the fix.

Launched Debian installation from the GUI in Debian Live 11.

In the installation process I created the necessary partitions to unallocated space on the disk ( /boot (~ 500MB), bios_grub (~ 8MB) and root (20GB)). This was not very easy even with graphical interface due to never having done this before in Linux. So the /boot is defined as “mounting point” and bios_grub is configured with the flag for the corresponding partition (was also wondering if “boot” flag is required for /boot but seems not needed). For root partition the mounting point had to be “/” and root flag enabled. The installer also automatically set the bios_grub flagged partition as 8MiB. After creating all 3 partitions then it will allow to continue the installation.

Booted to installed Debian and copied the grub.cfg contents from HAOS EFI system partition (so I mounted /dev/sda1 in my case and opened grub.cfg from there) to the grub.cfg in /boot/grub/grub.cfg. This step will also need that you allow read/write access for /boot/grub/grub.cfg

In the above steps when creating the partitions, I also made a mistake which I realized afterwards. So I created the partitions right after the HAOS partitions on the disk which caused the situation that HAOS was not able to utilize the free unallocated space (endless “Preparing Home Installation”). I used gparted in Debian Live USB to move the Debian partitions (all 3 of them) to the end of the disk space afterwards which I guess is risky but worked well in my case. After doing this HAOS was able to use the unallocated space available right after its’ own partitions.

After all of the above, the HAOS was available in the boot menu and can be launched.

I would be grateful for some detailed instuctions on how to set the HAOS as default boot system in Debian side? I was playing around with this but the only way I managed to change the default boot selection is when I added one of the HAOS menu entries as custom menu entry in /etc/grub.d which does not really work without the other content from grub.cfg in HAOS EFI partition.

Long reply but hope this maybe helps some other newbies such as myself :slight_smile:

1 Like

Greetings @sandman-125

Thank you for such a laborious explanation of what you did; I am sure many will benefit from you hard work. If I am understanding you correctly, (and I may have miscommunicated in my install description), but I never intended to install Debian 11 on my old pc (i.e., non UEFI BIOS). I only used Debian live to setup HAOS without installing it as per @dbrand666.

Thanks again,

PS. Sorry I cannot help with your partition question, but I was looking at this video (Install Home Assistant on Debian Linux - YouTube) before my current install.

1 Like

@blind-oracle , I have read that some people have installed it in this model of laptop.
And, during the weekend I was be able to finish the installation with hassinstall people support. It seems that the problem was that I was forcing the installation process for a “generic-x86-64” machine and the docker image downloaded was not the correct. Delegating the machine type selection in the installation script the installation process went well. Then I have this docker processes running:

@carloshurtadom Thanks but I actually figured out both of my questions now. I never intended to install Debian either but that seemed like the only way after lots of attempts.

But now I resolved it how to do it without Debian installation on the disk. Grub installation to the disk was only successful after I created an 8MiB unformatted partition on the disk with gparted and flagged it as bios_grub. Then I could install grub2 and do sudo grub-install without any warnings and disk booted to Grub menu and HAOS could be loaded.

Regarding how to set the default boot selection if you have Debian installed on the same disk. What I did is copied the contents of EFI/boot/grub.cfg to etc/grub.d/40_custom but left out two first lines of grub.cfg contents. Then modified “grub_default=” value in /etc/default/grub to correspond to my boot selection and did sudo update-grub

1 Like

Brilliant solution! Many thanks to all who have contributed to it. I followed the summary provided by carloshurtadom.

So would it also work with an old desktop? I have answered this for myself, sharing it might also help someone else.

I have an old intel G31 bios motherboard running Win10, Ubuntu, used as a fall back system in case main machine down. HA however runs on a RaspPi. Wanted a fall back version of HA on the old G31 machine to provide support when main HA down for some reason, but with minimal overhead and simple to maintain i.e. NOT on Debian. I tried:

  1. Using this method to create bios-bootable USB connected Hard Drive. It works! But not without flaws. Keeps showing errors for hardware connectivity. Probably more to do with the primitive USB bus on this motherboard.
  2. Install internally on its own dedicated SSD. Works flawlessly when bios told to boot from that SSD - with one exception found, to date. It seems impossible to update HA operating system from within HA. It proceeds apparently normally, but always reboots showing the original OS version not the update that was applied. Not much of a problem for me since it’s only a fall back machine - can ‘start again’ when HAVE to update the OS, and just apply the full backup from main HA installation to it.

One word of warning too. Some of the commands used, particularly DD and anything that over-writes the boot files, are dangerous on an installed linux system because it’s too easy to blat the wrong drive by mistake. It is safer using a live distro and just one HD or SSD, as described. Any more HDs or SSDs and/or if using installed linux, then you have to be very careful that Linux is writing to the right drive. In my case, NOT /dev/sda, that would obliterate windows and linux partitions on the main drive. In fact, with my configuration, after checking how linux saw it, the HA-intended drive was in fact /dev/sdc, and all command had to be adjusted accordingly.

Thank you @RobAtHome for your contribution - this is definitely a collaboration effort.

If you have time, can you speak a little more to your troubles updating HA; have you tried updating it via a different way? You documenting it here, brought it to my attention, because I am having the same problem but did not give it much thought because I had earlier updated HA via the GUI.

Problem: Installing HAOS 9.5

Thanks

@carloshurtadom @RobAtHome Have you tried selecting slot B in Grub boot menu after running the update?

I ran into this update issue also and tried booting to slot B after wondering why the version is not changing and selecting Slot B then booted to the updated version (HAOS 9.5).

Hopefully this works the other way around also that the next update after 9.5 is applied to slot A but I haven’t had the chance to test that yet.