# 10.1 installation with MBR fails to boot



## zwieblum (Nov 17, 2014)

Maybe I'm doing something wrong, but I can't get 10.1 installed with MBR. I use FreeBSD-10.1-RELEASE-amd64-memstick.img.

I'd like Debian and FreeBSD on the same hard drive. As Debian miserably fails on on the GPT partition table, I try to install BSD FreeBSD first on the empty disk. I'd like the installer to create the MBR, create a partition for FreeBSD that takes half of the disk and install FreeBSD there. Debian should be installed later.

Now the installation with "Auto UFS" and "Auto ZFS" works when using GPT - i.e. the bootloader is installed and the OS boots properly. But when selecting "MBR" instead of "GPT" the OS does not boot. I get the error message 
	
	



```
Missing operation system
```

Any idea what I could do about that?


----------



## Juanitou (Nov 17, 2014)

I have already seen that with IDE disks on an old motherboard. YMMV, but you can try playing with IDE Access Mode in your BIOS: Large instead of Auto worked here.


----------



## zwieblum (Nov 17, 2014)

Indeed it's an older T61, but it has SATA and the error is the same in "AHCI" and "Compatibility" mode.


----------



## wblock@ (Nov 17, 2014)

Generally, that error means missing boot blocks.  Boot the install CD, go to Shell mode, and run `boot0cfg -B ada0`.  Or probably `gpart bootcode -b /boot/boot0 ada0`.


----------



## zwieblum (Nov 17, 2014)

`#  boot0cfg -B ada0` and rebooting brings a new bootloader:

```
F1   FreeBSD

F6  PCE
Boot: F1
```
Pressing Enter or F1 just adds a # to the last line, but does not boot anything:

```
Boot: F1 #####
```


----------



## wblock@ (Nov 17, 2014)

Please boot into the Shell mode again and show the output of `gpart show ada0`.


----------



## zwieblum (Nov 17, 2014)

`# gpart show` - I just copy the part of ada0:

```
=>       63  468862065  ada0  MBR  (224G)
         63  468862065     1  freebsd  [active]  (224G)

=>        0  468862065  ada0s1  BSD  (224G)
          0    4194304       1  freebsd-zfs  (2.0G)
    4194304    4194304       2  freebsd-swap  (2.0G)
    8388608  460473457       4  freebsd-zfs  (220G)
```
I selected Auto ZFS in the installer and changed GPT to  MBR.


----------



## zwieblum (Nov 17, 2014)

Now this is funny. The same setup succeeds when installing FreeBSD on a VM (KVM in my case).


----------



## wblock@ (Nov 17, 2014)

You've got MBR slices which contain FreeBSD partitions which contain ZFS filesystems.  That needs the zfsboot(8) bootcode installed, although it should already have been installed.  See the last example in zfsboot(8).  Skip to the `gpart bootcode` command there, but the commands will have to be adjusted to use the slice and partition.

An easier alternative would be to set up GRUB2 to boot from GPT to use either FreeBSD or other operating systems.  I think I saved notes on how to do that.

Easier yet is to avoid this terrible multiboot stuff.  Install an operating system, and install the others as VMs using that operating system as a host.


----------



## zwieblum (Nov 17, 2014)

Thank you for your advice. I have dedicated the whole disk to FreeBSD + GPT + ZFS. It would not make much sense anyway to stick with Debian on the disk when I'm just leaving Debian, would it?


----------



## wblock@ (Nov 17, 2014)

I just created a new thread showing how to set up GRUB2 for multiboot on GPT.  It uses UFS on FreeBSD, but ZFS should also be possible: Thread gpt-multiboot.49055.


----------



## SirDice (Oct 4, 2018)

Please don't resurrect 4 year old threads.


----------

