Install HA on old laptop without UEFI

Hello, I’m also installing into some Samsung netbook I had (NC110) but I’m failing to do step 4 :confused:
Which partition is HAOS EFI? I currently have these partitions:

/dev/sda1 hassos-boot fat16

/dev/sda2 hassos-kernel0

/dev/sda3 hassos-system0

/dev/sda4 hassos-kernel1

/dev/sda5 hassos-system1

/dev/sda6 hassos-bootstate

/dev/sda7 hassos-overlay ext4

/dev/sda8 hassos-data ext4

And the rest of partitions are from the donor OS (I installed Xubuntu 16.04)

Currently if I do sudo update-grub2 it won’t detect HASS-OS on any partition above except it says:
Failed to probe /dev/sda3 for filesystem type
Which makes sense since it showed in gparted (on my Xubuntu installation) with an unknown filesystem

Thanks btw

EDIT: The bad this with my devices is it has a broken screen, so I cannot change bios settings and the like

NVM! I got it!! The boot partition was indeed /dev/sda1, so like you said I’ve installed grub-efi on xubuntu, added the contents of the grub.cfg inside that partition onto the file located at /boot/grub/grub.cfg directly at the end (I’ve got 5 entries in my original grub.cfg so I when I rebooted I had to (blindly) tap down 6 times and enter and then it booted!!

So many thanks for the insights!

EDIT (again, sorry): I’m having no space left errors now… on a new install? I’ve read that’s the media is (SD card or HDD in my case) faulty, I’m retrying from scratch

please let me know how this ends up working out for you. @matys.home’s instructions really confused me (e.g., after creating the 3 partitions from step 2, which partition should the linux distro be installed in? root or boot? when where will HOAS need to be installed in? and step 4’s got me just straight up lost… :/)

1 Like

In the new spare partition ‘root’, and check my last comment for step 4

EDIT: If anyone is having trouble with step 6, what fixed it for me was that there were files in /boot/loader/entries. After moving these to somewhere else HAOS booted by default.

@DiegoJp @matys.home How did you manage to complete step 6 - set default? I’ve tried in the GRUB CLI, tried modifying and deleting files in /etc/grub.d/ and rebuilding and i’ve gotten nothing to work so far after several hours of trying

It’s not really necessary to install a full Linux just to load the EFI GRUB that’s included with the x86 image. We can just create a small partition and install GRUB into it and point it at the existing grub.cfg file. Use your favorite Linux live CD/DVD/USB (I’m liking Parrot OS today).

Use gparted to create a small ext4 partition on the HassIO drive. I’m assuming it’s /dev/sda. It’ll probably tell you that the partition table doesn’t include the whole disk and offer to fix it. Let it. A 10MB partition should be fine. Tell gparted to leave 0 bytes after the partition so it ends up at the end of the disk. That way HassIO will be able to resize its partitions and use all the unallocated space.

Note: You may end up with a tiny bit of unallocated space after this partition even if tell gparted to make it 0. That’s due to alignment. Don’t worry about it.

Mount the new partition (should be sda9 but check):

sudo mount /dev/sda9 /mnt

Install GRUB on the new partition. If you’re using Parrot OS you’ll need to install the GRUB package first:

sudo apt install grub2

Then install GRUB onto the HassIO drive. Replace /dev/sda with your device if different:

sudo grub-install --compress=xz --root-directory=/mnt /dev/sda --force

Now that GRUB is installed, all that’s left is to configure it to redirect to the HassIO installation. Run the following to create the necessary config file in /mnt/boot/grub/grub.cfg (the first line tells it to use the first partition on the first drive, the second tells it where HassIO’s GRUB config file is):

cat <<! | sudo dd of=/mnt/boot/grub/grub.cfg
set root=(hd0,1)
configfile /efi/boot/grub.cfg
!

Remove the boot media and reboot. You should go straight to the HassIO boot menu.

13 Likes

Greeting dbrand666 thanks for your post. if you could, being new to HA and Linux, and trying to install on a legacy machine, could you maybe give more detail and make it easier to understand for a newbie. Thank you!

1 Like

Thanks you for editing the code added line(s). From someone who doesn’t know linux and was giving this another shot. It finally worked for me.

Welcome to the community!

Glad it worked for you. I’ll keep updating the instructions with the feedback I’m getting. If you had trouble figuring anything out, let me know.

The problem I was having is I didn’t know how to create a grub.cfg and you didn’t mention how to do it. I’m assuming the new line you entered does that and the last line saves it? Also when you said to install grub on the HassIO drive, I wasn’t sure if you meant a specific partition. I left it as dev/sda with out a partition and it work, so I guess not. Now I get to spend the weekend seting up my second instance. Thanks again

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!