# single disk Linux/FreeBSD dual/tri-boot (rebooted), now with VM access too



## RJVB (Mar 31, 2018)

It's about 2 years ago that I asked about creating a dual-boot set-up on a notebook with an Intel N3150 and Intel WiFi:
https://forums.freebsd.org/threads/dual-boot-freebsd-and-linux-on-a-single-disk.55260/

The system is used mostly under Linux (Ubuntu 14.04 with home-built updates) and at the time it refused to boot back into FreeBSD after I ran Linux grub (despite following the instructions and the fact the BSD partition was detected correctly). FreeBSD didn't support my hardware properly anyway, so I left the partition alone for the time being. In the meantime I also installed a modern, rolling Linux distro on another partition (KaOS); in practice I mostly use that via VirtualBox with raw-disk access because KaOS turns out to have very strict requirements for its boot environment.

The Ubuntu 14.04 install runs off a ZFS pool (ZoL 0.7.6), with /boot hosted on a good-old-ext4 partition.

I'm back now to check if there is proper support for the N3150 with its embedded GPU as well as for the Intel WiFi subsystem.

If so, how can I get back into the FreeBSD install and upgrade it in a way that isn't going to put my Linux install at risk? Can a 2y old FreeBSD install be upgraded to the current version or am I going to have to uninstall/reinstall "manually"?
Has any progress been made in grub so it creates bootloaders that actually serve all installed OS types, both Linux and *BSD, no matter from where it's called?

I could probably boot into my current FreeBSD install by making its partition accessible to a VirtualBox VM via raw disk access just as I do for the KaOS install. Will that work? I seem to recall that VirtualBox had guest extensions for the OS, so this should avoid the unsupported hardware problem my current install has.

Thanks for any pointers!


----------



## ShelLuser (Mar 31, 2018)

Some time ago I wrote a guide which explains how you can install FreeBSD without the installer; so only booting into the disc1 live cd and performing several commands manually. Check this link, it might give you some useful pointers.

As to upgrading: what FreeBSD version is it anyway? Two years ago could still be a 10 version I suppose which could make things easy enough. I'd probably use a rescue cd to boot into the system (see that guide I wrote for details) and once you're in and also got network support then you can proceed to running freebsd-update to actually get up to speed with the currently supporter versions. You'll probably need to run the upgrade cycle (-r). 

The advantage of manually booting using a rescue CD is that you can try this whole thing out without any risk of damaging your system.


----------



## ronaldlees (Apr 1, 2018)

This is a thorn for new FreeBSD users, that sometimes keeps them from smelling the rose.   It makes me sometimes long for the days of automatic LILO.  Anyway, when I want a dual boot, or a triple boot, etc, I often install any OS specific bootloaders into a partition.

So, I may install Haiku-OS in partition one, but not install any bootloader yet,  and then install Linux in partition two, but in the _grub bootloader _section of the installer wizard I make the selection to install grub into a partition rather than the drive as a whole (the selection is usually listed under the disk devices in the combo list in Lbuntu).  I may install FreeBSD in a third partition (again without installing any bootloaders).

Finally, I install the "whole disk" bootloader as a _last step_.  For me, the very easiest way to do this is to use the USB HaikuOS boot stick.  It boots to an installation menu in seconds.  I don't bother installing Haiku at this point (it's already installed into the first partition (see above).  But, I select its installer wizard's "bootloader" menu item.  I click about three times and the bootloader is installed, having picked up all partitions and operating systems, and allowing me to give names to what the _boot-select _screen should call each of them.  It also allows me to change the order of them, and decide which is autobooted after x seconds.

HaikuOS is still "alpha" software at this point, so it's a use-at-your-own-risk sort of thing, but it makes installing a bootloader very painless.  I'm not supposed to plug another OS, so I'll just say I like it. It's OK to have more than one favorite open source operating system.   I think it's just about to go "beta".   As far as I remember, its bootloader setup has never failed me when I use MBR.  I don't know about GPT, although it has it.  The whole thing takes less than thirty seconds.


----------



## ronaldlees (Apr 1, 2018)

Now that I think about it, the installer may have gotten tripped up one time when there was junk in the MBR and bootloader areas of a disk.  So, to be sure that everything is kopecetic, now I use "dd" to zero the first couple megs of the target drive before installing any operating systems.


----------



## tingo (Apr 3, 2018)

FWIW, you can use a usb memory stick with a FreeBSD install image on to boot a FreeBSD partition on a hard drive. Simply abort the automatic boot, and set the correct device to boot from in the bootloader environment. The commands may look difficult at first, but there are only about 3 - 4 commands before you are booting into FreeBSD.


----------

