Install HA on old laptop without UEFI

Greetings and thank you both for your help,

Installed grub on /dev/sda9

When trying to install grub on /dev/sda or /dev/sda1 get following error:

“Installing for i386 - pc platform.
grub-install: error: failed to get canonical path of ‘overlay’.”

Did you remember to run this?

sudo mount /dev/sda9 /mnt

yes i did. i just tried it again now and same error

That second grub install (using just sda) is the right one. If the install to /dev/sda1 didn’t damage anything, you should be able to boot now.

Otherwise, you might need to start from the top again.

1 Like

@dbrand666 BTW you don’t even need to create a new partition. I’ve used the EFI boot partition (/dev/sda1) to install GRUB files there on APU2, worked like a charm.

  • Boot APU into some Linux live USB (I’ve used SysrescueCD)
  • dd the HAOS image to APU’s internal SSD (or from where you boot it), /dev/sda in my case
    xzcat haos_generic-x86-64-9.4.img.xz | dd of=/dev/sda bs=1m
  • Mount /dev/sda1 (EFI boot partition) to /mnt
    mount /dev/sda1 /mnt
  • grub-install --boot-directory=/mnt/boot --force /dev/sda

Then just create a /mnt/boot/grub/grub.cfg with the following content:

set root=(hd0,gpt1)
configfile (hd0,gpt1)/efi/boot/grub.cfg
  • Unmount /mnt, take bootable USB out and reboot
  • Done, HAOS booting
3 Likes

@blind-oracle I specifically didn’t want to touch any of the partitions “owned” by HassIO just in case it decides to mess with them during an upgrade. I agree it’s pretty unlikely though and worst case you’d just need to reinstall GRUB.

@dbrand666 Yeah, I agree. But sda1 is just dumb standard EFI FAT32 which has EFI GRUB stuff inside which probably never gets updated (and even if it does we don’t care since we install in other folder). So, probably it should work fine. Time will tell :slight_smile:

1 Like

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!

15 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.