# FreeBSD's Boot Manager



## balanga (May 6, 2021)

I currently have a system with Windows 10 on it. My intension is to install FreeBSD (of course) and maybe two Linux distributions. Will FreeBSD's boot manger automatically add all bootable partitions to its boot menu?


----------



## SirDice (May 6, 2021)

Yes, but keep in mind that boot0cfg(8) only works for an old school BIOS (CSM) boot from an MBR partitioned disk and can only boot FreeBSD on UFS.

If you have GPT and UEFI boot then you can multiboot using efibootmgr(8) and using the BIOS/UEFI boot selector. Or use something like rEFInd.


----------



## debguy (May 7, 2021)

0)  My advice is to FIRST read microsoft's instructions about GPT.  My win10 USB refuses to intall/repair on GPT drives - but via advice can be "migrated to running on it" (though, that won't fix my purchased USB so little good)

1)  don't delete win10 your going to need it for Steam games or something else: and if you didn't get an OEM disk make sure you get it before going forward.

2)  know if your booting FreeBSD USB in uefi or bios mode.  win10 sucks they take 3 of 4 BIOS partitions (2 if you sacrifice backup and know which setting).  they are only supposed to use 1.  win10 can read+write GPT on a separate drive, good to know.  There are visual indications of which, and you'll very likely have to fidget in your bios settings so that you know which.

If you go for BIOS on the same drive OR EVEN A SECOND DRIVE IN THE SAME PC you _will_ run into problems you'd have to ask Sir Dice how to get a partition bootable (without Win10 stomping on it, which Win10 can and will do (and did to me) - and if you are not very savy - you "loose your FreeBSD and all on it").  Win10 isn't the only offender - RHEL refuses to install anything unless it "knows" it owns the whole drive as the primary boot loader ... how do you think forward with that in mind?

If you go UEFI then you still have the issue of playing the boot loader game (who's boot loader starts and if that boot loader knows about the other OS - and without allot of hacking it will NOT)

3)  consider a second drive or something so that the two OSes do not have to contend with each other about booting

reFind may alleviate unless IT BREAKS.  you then would wish you had a boot/rescue USB for each OS that knows "itself" (how to launch the OS it previously installed on the HD).  I firmware doubt reFind works in both boot modes and knows all OSes and versions - such as older linux or newer win10 revisions issues (like uefi changeovers).  but IDK good luck with it.  So be careful in treating it as a total solution.  You could put allot of time into it then find you still need a second HD right?


----------



## SirDice (May 7, 2021)

debguy said:


> My win10 USB refuses to intall/repair on GPT drives


You need to EUFI boot the Windows install media to be able to install Windows on a GPT partitioned disk.


debguy said:


> and if you didn't get an OEM disk make sure you get it before going forward.


You know you can just download the images from Microsoft these days, right?



debguy said:


> win10 sucks they take 3 of 4 BIOS partitions


One is the ESP (EFI System Partition), that's the same partition as FreeBSD's efi partition. 



debguy said:


> If you go UEFI then you still have the issue of playing the boot loader game (who's boot loader starts and if that boot loader knows about the other OS - and without allot of hacking it will NOT)


Complete nonsense. Guess what you can do with efibootmgr(8).


----------



## balanga (May 7, 2021)

My existing Windows 10 installation is on an MBR partition and I have now installed FreeBSD's boot manager. When I've done this before it normally shows two Windows partitions, but I only see one. Maybe the small one disappeared after I restored an image backed up by Clonezilla, but anyway it did boot up OK. Now with FreeBSD's boot manager I get a choice of F1 - Win, F2 - FreeBSD or F6 - PXE. F1  works fine but pressing F2 just shows a '#'.

Looks like I've overlooked something. Do I need to set the FreeBSD partition as bootable? I can always boot from another disk to get back into the configuration if needed.


----------



## SirDice (May 7, 2021)

balanga said:


> Do I need to set the FreeBSD partition as bootable?


Not sure if that's needed, but it's been quite a while since I last used boot0cfg(8). 

In the past I've used Window's boot manager to actually boot FreeBSD. You can do that with the BCDEdit tool. 

For reference, here are the instructions to restore the original Windows MBR: https://neosmart.net/wiki/fix-mbr/#Fix_the_MBR_in_Windows_10


----------



## debguy (May 7, 2021)

I'm unsure if you are right about my store bought win10 USB supporting GPT if booted UEFI.  MS docs say no:  therefore I didn't think to even try it.  I didn't know at the time my bios "ignores UEFI unless pre-selected" so I haven't tried it.

However I OEM disks are not like USB.  You cannot download them without paying.  That is why I gave the $$$ warning.

Complete nonsense. Guess what you can do with efibootmgr(8).

Not non-sense.  One must have to have TWO computers and two working internet connections to make that trick work:  one for reading, the other for doing.  I for instance don't have the forementioned.  Also efibootmgr is not fowardly available during install to someonw who is thinking about not using win10.  So I'm not wrong at all:  my perspective differs.

efibootmgr is "cool and capable" but it is not for newbies and takes significant time to make use of, and is not fowardly available (visible, with help, online to someone just installing from win10 on a single PC).  ehlo localhost?  someone deleted help.txt from my sendmail pkg.  Do you know what I'm talking about?  I'm sure you do.

Things change rapidly:  I just wrote in a blog "Steam/Linux quit and shame they don't run on BSD, win10 is getting too much".  I saw minutes later a youtube on "SteamBSD 13.0" !!  You can't blink these days without running into something big and new.

I think I was right in asking the person to:

1) check UEFI settings and Microsoft docs pertaining to them before beginning

2) be aware win10 has a history if disabling FreeBSD

3) consider buying hardware as an alternative sticky "sharing situations"

4) to know that win10 can and will WRITE OVER FreeBSD information on secondary drive in the system that has no win10 partitions on it that is of GPT type (happened to me)

I DO NOT believe UEFI has helped consumers it's been a contention of who owns the primary boot menu, way too much hacking to support it, failures (to install).  If I could count for you the number of problems people have with it I can google?  MBR ... that always worked, but of course is outdated.  Also who says whether or not an EUFI shell is presented on all motherboard the asians board makers dont all agree what it is?  Ok never mind.  I am not a fan of things that are complicated yet are demanded of newbies to know before beginning and require a 2nd PC purchase for reference.  I'm simply not going to say "I like UEFI" or it's great.  For some yes for others it's a kinda terror.  Ok?


----------



## debguy (May 7, 2021)

My "2nd PC" is a 2006 32bit "cannot boot by USB" with GNU/Linux installed running a custom linux.

When I go online almost every website says my https is not allowed (including freebsd).  This happened exactly when they did the big 32/64 changeover and so many linux were like ... how do I upgrade, and many had to switch to a brand of linux already upgraded since they they couldn't web browse as they're HTTPS was disabled (due to Google and Microsoft "upgrades").

That is my "2nd PC".  I don't have cash for cows infact I could barely eat to stay alive for years.


----------



## SirDice (May 7, 2021)

debguy said:


> However I OEM disks are not like USB. You cannot download them without paying.


Yes, you can and no, you don't have to pay for it.


----------



## balanga (May 7, 2021)

debguy said:


> My "2nd PC" is a 2006 32bit "cannot boot by USB" with GNU/Linux installed running a custom linux.


I just fired my 2006 32bit pc - it's a wonderful ThinkPad X41 which I bought from a car boot sale for a few pounds two years ago. It boots FreeBSD 13.0 i386  an external USB drive and I can even PXE boot it.

If all else fails can't you put in a different disk with FreeBSD already installed?


----------



## debguy (May 7, 2021)

balanga said:


> I just fired my 2006 32bit pc - it's a wonderful ThinkPad X41 which I bought from a car boot sale for a few pounds two years ago. It boots FreeBSD 13.0 i386  an external USB drive and I can even PXE boot it.
> 
> If all else fails can't you put in a different disk with FreeBSD already installed?


Does it come with $1,2000 professionally licensed CAD software pre-installed?


----------



## debguy (May 7, 2021)

It's easy to correct someone if you have 0 idea what their background is, why they are saying what they are saying, or problems are.  It's not so easy.


----------



## SirDice (May 7, 2021)

balanga said:


> If all else fails can't you put in a different disk with FreeBSD already installed?


Sure, you can take the drive out, do the install on a desktop PC for example, then put the disk back. There's nothing "hardware" specific on a FreeBSD install. Most common drivers are already baked into the GENERIC kernel. Certainly the drivers you might need to boot the machine. Everything else can simply be customized by loading the appropriate kernel module.


----------



## SirDice (May 7, 2021)

debguy said:


> If I could count for you the number of problems people have with it I can google?


Common pitfall. When you go to a bakery you will notice that every customer orders bread or bread related products. When you go to a butcher you will notice that all customers are ordering meat or meat related products. If you go online and search for problems you're going to find a lot of problems. People that _don't_ have issues generally don't post about it on the internet and they won't show up in your search results.









						Survivorship bias - Wikipedia
					






					en.wikipedia.org
				




This reminds me of how I fell for that same trap. When I fist started working in IT I worked for a large computer shop on their technical support. I had to repair brought in customer systems and fix common issues. At that time CD-ROMs were starting to become more prevalent and most systems required an additional IDE controller for it. So the shop sold a lot of these IDE controllers. And some of them eventually ended up on my desk as broken. We had maybe one or two per week of a certain brand. Then all of a sudden we were receiving dozens a week that were broken from a newer brand. So the obvious conclusion was, these new cards must be crap. We only got one or two from that other brand and these new ones come back broken dozens of times a week. But the fact was, that newer brand card was sold 20 times more than the first cards. When you do the actual calculations; broken vs. numbers sold; that newer card was in fact more reliable because a lower percentage of them came back as broken. If you only looked at the absolute numbers from broken old vs. broken new; you would have gotten the wrong impression.


----------



## balanga (May 7, 2021)

debguy said:


> Does it come with $1,2000 professionally licensed CAD software pre-installed?


Is this your 2006 32bit pc? I hope you have a backup of it.


----------



## astyle (May 7, 2021)

SirDice said:


> Yes, you can and no, you don't have to pay for it.


That only works if you have the OEM license key that came with the Windows Rescue disk that came with your PC/Laptop. M$ still plays the license game (free download/upgrade if you already have a valid license). I've also seen pop-up messages that say I have 30 days to use the downloaded image. Total crapshoot, which is why I went for FreeBSD.


----------

