# FreeBSD does not boot on disk sdb,even if it has been installed on the first partition of the disk.



## ziomario (Jul 19, 2021)

Hello.

I've installed FreeBSD on my secondary disk (sdb : mbr disk) that I have partitioned like this :


/dev/sdb1 : ufs of 130 GB,(where I have installed FreeBSD)

unallocated space of 225.97 Mb

/dev/sdb3 : unknown fs of 1.65 Gb

/dev/sdb4 : ext4 partition of 98.16 Gb (where I have installed Ubuntu 18.04)

/dev/sdb2 : ext4 partition of 235.73 Gb (where I have installed nixos)


The problem is that FreeBSD does not boot,even if I have installed it on sdb1. Can someone tell me the reason ? When my PC restarts and I choose to boot it,only nixos is able to boot (because I have installed it before Freebsd). What to do in this scenario ?


----------



## Alain De Vos (Jul 19, 2021)

The bios starts always reading the mbr of the first disk. If that one is not ok, or does not reference via a loader to the mbr of the second disk many bioses bail out in error. E.g. my HP BIOS.
For this reason i had to install a little linux partion on my first disk to load the freebsd loader on the second disk.
If your bios is however "intelligent" it should be able to boot from the second disk. Notethat there can be disk renumbering by the bios.


----------



## ziomario (Jul 19, 2021)

I don't see any error. It's only nixos that's able to boot (and ubuntu 18.04) and not freebsd. what can I do ?


----------



## Alain De Vos (Jul 19, 2021)

A bios is "stupid" software. It just halts when it can't continue.
If it's a PC it can boot freebsd.
I use freebsd-on-zfs on my second disk using linux-grub bootloader on a small void-linux on the first disk.


----------



## ziomario (Jul 19, 2021)

I presume that I should install Linux on the first partition and Freebsd on the second one ? what about to convert the disk from mbr to efi and to install freebsd in efi mode on the first partition ?


----------



## Alain De Vos (Jul 19, 2021)

That is a possible and flexible solution which i use.  What works is good.


----------



## Emrion (Jul 20, 2021)

There are several questions to understand what occurs:
- What is the disk that BIOS boots, sdb or sda?
- What do you have on sda?
- You wrote that you can boot either on nixos or ubuntu, have you installed a boot manager?


----------



## grahamperrin@ (Jul 21, 2021)

Emrion said:


> … boot manager?





ziomario said:


> … install freebsd in efi mode …



I haven't done any dual boot stuff in a long time but rEFInd might be useful in this situation. 

<https://www.rodsbooks.com/refind/>


----------

