Install dual boot with Windows 10

Hi, I have a Dell optiplex which has Windows 10 on it. I’m familiar with how to load a Linux flavour onto it dual boot with grub etc.
I would like to install the HA OS onto a separate partition from Windows 10, as if it was e.g. Debian. HA would be the default boot, and 99.998% of the time the machine will be running HA. I would just like to retain the ability to boot into Windows in case I later want to repurpose the machine.

I’ve seen some people ask this and the answer was “why would you want to?”

I don’t want to learn about containers or VMs , I just want to use HA native, so I know I can otherwise go ahead and blap the HA install on there exclusively. However I want retain the W10 boot option just in case, and given the HA is apparently a Linux based thing, one would think a dual boot install is technically possible.

So, can I do that, and if so, how?

1 Like

Not sure what is you actual question, here.

Have you seen

from

Let me ask you the question.
Why do you want to do that?

Microsoft has a media creation tool available to download for both Windows 10 and 11 that will install a fresh Windows with most updates included.

Thanks for your reply. I should clarify that when I say “I’m familiar with how to load a Linux flavour onto it dual boot with grub” it’s more that I have done Linux installs alongside W10 and seen the use of Grub, rather than manually set up Grub (although I may have done that in the past).

The link you provided starts with “This guide assumes that you have a dedicated Generic x86-64 PC (typically an Intel or AMD-based system) available to exclusively run Home Assistant Operating System.” so I understood that to mean “It will result in you overwriting the entire SSD with Home Assistant and the machine will then only be able to boot into HAOS - you will lose your W10 install”

I have seen the reference you mentioned - maybe it actually answers my question but not in so many words. Assuming what I want is possible, please can you confirm (or deny) that the following approach would work?:

  1. Perform an install of a Linux distro onto the target “alongside Windows”, so grub is installed and the partitioned SDD has two bootable partitions, one with Windows in it, the other with Linux in it. I expect the Linux partition will be the default boot.
  2. Prepare the HA install USB and then boot the machine from it.
  3. <This is the bit that’s not clear> (a) Does the the HA install process notice there are two partitions and ask which one I want to install into? If it does I would select the one that has Linux in it, and install HA into that, replacing the Linux install. (b) If it does not, and can only obliterate all partitions and make the machine available exclusively to run HA with one new partition then that is what I don’t want to do.
  4. If 3(a) is a thing, then hopefully HA is installed into the the default bootable partition, and W10 is still there in the other bootable partition if I ever want to use it. If 3(a) isn’t possible, I have to change the SSD in the machine, install HA, and save the original W10 SSD for future use. Which is OK, but I’d prefer the dual boot approach if it’s available.

So, if the sequence above 1, 2, 3(a), 4 is possible, I’m good. Would that work?

Thanks

Rob

Clone the SSD with Clonezilla, back it up to some DVD’s, you can always restore it exactly as it is now.

Thanks for your reply.

Answer is because if I use the W10 media creation tool, I would be reinstalling W10 onto the target and then I would have obliterated the HA install, which I might have done a load of work on to set up.

What I want is to set up HA as if it was a Linux install in a default bootable second partition, and start playing with it, but retain the ability to boot that machine into Windows if (for whatever reason) I want to do that - without having to reinstall anything, swap the SSD or any such faffing about.

I realise I can have two SSDs (one W10, the other HA) and swap them around, but seeing as HA is a LInux based thing and installng Linux alongside W10 is completely routine, it seems line HA alongside W10 should work also - but the install info doesn’t mention it as a possibility.

Cheers

Rob

Thanks, please see my above reply to WallyR - I expect to have set HA up and not want to restore over it. If I can’t do the dual boot thing I will just use two SSDs - but if I can dual boot, I don’t need to swap them.

HA OS is not a typical Linux distribution, it does not come with an installer, you have to flash it to your HDD/SSD/SD. Maybe what you want is easier installing Debian on the second partition, and run a Supervised install.

Right, I kindof assumed you could write HAOS to a partition, rather than to the full disk, but it doesn’t seem so.

What I would do:

  • Create a bootable linux flash drive and boot it
  • Extract and mount the HAOS image inside linux
  • Format the partition on your disk supposed to host HAOS and copy the content of the root partition of the image.

All very theoretical, and it would take me a lot of trial and errors to do, but reasonably sure that would work.

OR

Install an additional disk and install HAOS according to the instructions above.
You could use GRUB or just your bios to boot to the disk/OS you want.

Install debian 11 as dual boot. Install supervised on debian. Job done.

Thanks all for your suggestions. I managed to blag another SSD from work so maybe the vanilla install onto that is the thing, but I might give @nickrout & @francisp plan a whirl (I don’t fully understand what a Supervised install means but will read up)

I will let you know if I manage to do it whichever way.

Thanks again,

Rob

The directions are here for supervised

I have a Dell optiplex that duel boots to linux and windows(although i cant remember the last time i ever booted it to a windowd), but I just run home assistant container. The downside of container is no addons (although many addons have equivalent docker images you can install and manage yourself). Supervised will give you the addons but requires debian and other strict requirements (see requirements in linked documentation), and doesn’t allow installing anything other then home assistant and its addons. Although container is more difficult to maintain, I prefer it because it is more flexibile and I can install any other software I want beside homeassistant/addons.

I would not duel boot between windows and haos- haos is based on a very stripped down version of linux, and is fairly locked down. As mentioned above, it has no installer, and I don’t know if it can even run in a duel boot setup, and don’t recall ever seeing a post of someone running it that way.

Thanks for the reply. I can see why HAOS would be stripped down and locked down, since (it seems) it’s effectively an embedded system and for reliability one would want to limit or eliminate random effects on HA from other software running under the same OS. E.g. you wouldn’t want someone to be sporadically running a resource-hungry applicationon the same machine, etc.
For this reason I’m not keen to run it in a VM or container because then the environment HA is in (outside the VM/container) is variable in a similar way, dependant on the other loads the machine is subjected to. I understand it’s possible for this to work OK, but it does increase the number of permutations that apply. There do seem to be a fair number of questions about aberrant behaviour in the VM or container contexts (although others are clearly having no issues). I cba to get into all that, tbh.

So, for reliability, an exclusive install seems favourite. You just get the curated content and the outcome is as predictable as possible. Because HA ha exclusive use of the platform, there’s nothing else competing for resources.

However, I can’t see why a dual boot installed HA wouldn’t work, if it could be achieved by somehow flashing the HA image into the appropriate partition. Once the BIOS and bootloader have run, the respective OSs in the dual boot have exclusive use of the platform and all its resources as if the other OS was not there (OK, there’s a partition that’s not available to each OS but ignoring that). So, if HA could be put in a separate partition somehow, and the bootloader arranged to launch whichever file is the first thing to run in HA, then HA would not “know” there was a W10 install on the same disk. Unless HA had a requirement to be in the first partition of the disk, there should be no difference to it, regardless of whether it’s in a dual boot setup or exclusively installed. Becasue it’s based on Debian, this seems unlikely.

As koying said above, the HA “partition” for my weird requirement could be another physical disk, launched by GRUB or just selected in the BIOS, so I could do my pointless swich back to Windows at some time. I don’t think a separate partition on just one disk is any different - the problems are only how to get the partition established, how to make the flash program put the HA image in there, and how to edit GRUB so it calls the appropriate file on that partition to boot HA (assuming that’s how it works).
I actually think that possibly if I were to install Debian dual boot, then successfully flash over the debian install with HA (somehow), it would just work - because the file that is launched first would be the same in each case. I might give that a go.

Soooo, I realise totally I have a minority interest here . . . I’ll have a play around with it and see if I can make it work. Or give up and use two disks :grinning:

Thanks again

Rob

1 Like

If you flash HA OS to a disk, you will see it actually creates 8 partitions.

1 Like

That is EXACTLY the intended use case and why it’s difficult.

I can see your logic here and add… What are you really going to be doing with the w10 side of this equation?

No really. Once you stand your HAOS up. It’s basically a server that you will come to rely on. You won’t want to shut it off. So what you were going to use w10 for on that box - you’ll need a different host - because you won’t be doing it.

If you’re doing it just for ‘testing’ then one of the VM options should be fine because you’re not in a production scenario anyway and performance doesn’t really matter.

Its not a garden variety Linux distro. Could probably manage to unwind it and make it work eventually but with a server workload I just don’t get WHY…

One of the benefits of Home Assistant is there are many install types, which gives people a lot of flexibility to install it in a way that works best for them. But with all these choices, there can be confusion as well. I think before moving forward it is important to fully understand how HAOS works. First off, you have multiple “layers” - you have the Home Assistant operating system as the first layer. This like other OS’s manages the hardware of the machine and booting it up. Then you have homeassistant core, the supervisor, and any addons you install. All of these actually run as docker containers - so you state you want to avoid “container”, yet you have docker running at some level with every Home Assistant install (x86 HAOS, VM, Home Assistant container) with the exception of doing a core install in a Python VENV. The difference with a “supervised” install versus a container install is that docker runs in the background, the user is basically unaware its even there, and the home assistant supervisor, a docker container itself running in a privileged mode, manages all parts of the process - updates, starting the other containers, etc. To do this, the supervisor needs to run in a way where there are no conflicts with other containers or the processes in the underlying OS. Try installing something like Watchtower on a supervised install along with the supervisor, and the whole thing will fail since something else is managing the containers, and you will be in an “unhealthy” state, and will need to resolve whatever is unhealthy to move forward.

It is, and the x86 instructions are linked above to do just that - run HAOS and its addons as the exclusive system on the machine, but you’re not doing an exclusive install because you still want to leave windows on the machine. This will complicate your install - I would avoid any installation that is not in the actual install documents. Sure, you might even get it to work, but something could come up down the line (and likely will), that will put your system in the “unhealthy” state and it will either stop working or not update. As noted by Francis, the HAOS install creates 8 partitions - it thinks it is the only thing running on the system, and would likely wipe out or conflict with a windows partition on the same drive.

If you insist on leaving Windows on the machine, and don’t want to manage docker on your own with the container install, then the advice Nick and Francis gave you to install supervised on Debian is the best path forward. They have both been on here longer then I have, they know what they are doing and talking about, and their advice over the years has not steered me in a wrong direction.

1 Like

I think this will be a tricky install, but it could be possible to flash the installation to the drive and then before the restart, where the install process would expand the primary partition, you might be able to break the boot and install Windows with enough left space for HA to expand into when it finally is allowed to boot.

Personally I think I would install an extra physical drive in the machine and just run HA on one drive and Windows on another.
The BIOS can usually set the boot drive on the fly and then there is no need for GRUB.
Ha only really need 32Gb, so the smallest and cheapest drive you can find would normally be fine.

1 Like

Thanks all again. That makes it much clearer what I would be getting into, it’s clearly a pointless exercise. I will just install directly onto the spare SSD I was able to blag, and go from there.
The W10 fallback was just if I got fed up with the whole HA idea and wanted to just use the machine for a (windows based) other purpose. It came preinstalled and I don’t have the key etc, I didn’t want to blow it away.
Now you have been kind enough to outline the deal with HA installation and also since I have the spare drive, I will just do as advised and keep them completely separate.

Thanks again

Rob

Why not run proxmox and install haos in a vm, and windows in another vm.

1 Like

Windows 10 use BIOS embedded keys to make the first online registration.
Once your hardware has been registered once, then it will always be registered.
Replacing motherboard might cause issues, but otherwise it will just be a reinstall and state that you already have a key registered during the installation.

1 Like