OPNsense Forum

English Forums => General Discussion => Topic started by: stormy on January 24, 2017, 02:13:24 pm

Title: [SOLVED] Multi-boot / running 16.7 & 17.1 on same box
Post by: stormy on January 24, 2017, 02:13:24 pm
I was running into several issues on 17.1RC1, and wanted to test on 16.7, so kept re-imaging, but that got tired after the 3rd time :) :)  Since I got one box, thought how to run them "in dual boot".

My box has a builtin SSD (128GB) with 17.1 now installed, and there is no way to install on a partition is my understanding.

Folks suggested to install the 16.7 on a USB stick, so took a 32GB and installed, but, during boot, the menu clearly shows version 16.7, i.e. from the USB, then selecting "1", and it boots, but eventually I get into the 17.1 login prompt.. There is no crash or restart, and I'm pretty certain I did install the 16.7 into that USB stick, otherwise how would it show that 16.7 boot prompt :)

running "df" and all shows as if it's the 17.1rc1...

not sure why that is the case, and how to simply run both in dual mode, appreciate any experiences from others.
Stormy./
Title: Re: [puzzle] Multi-boot / running 16.7 & 17.1 on same box
Post by: franco on January 24, 2017, 06:18:36 pm
Hi Stormy,

The installations will likely use the same UFS/GPT labels... This is definitely a first time for someone running into this.

You can edit the /etc/fstab root entry to match the real device, not the label.

Is this amd64 or i386? If it's not i386 you could also install one disk as GTP, the other one as MBR. Or use the Nano image on the USB stick, it has a different label.


Cheers,
Franco
Title: [SOLVED] Multi-boot / running 16.7 & 17.1 on same box
Post by: stormy on January 24, 2017, 07:20:54 pm
This is x64.. 

First time someone hit this?? that may not a good sign :) :)

Seems like a pretty basic and useful thing, to be able to boot multiple versions w/o wiping the box :) testing/qa/perf comparisons :)

I'm new to freebsd (from linux, no /proc/partitions, etc.), so here it is for the benefit of others who were as clueless as I was :)

16.7 fstab:

Code: [Select]
root@OPNsense:/mnt/etc # cat fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/rootfs /               ufs     rw,noatime      1       1

and, by comparison, this is the 17.1:

Code: [Select]
root@OPNsense:/mnt/etc # cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/rootfs /               ufs     rw              1       1
/dev/gpt/swapfs         none            swap    sw              0       0

so, the "label" is that "/dev/gpt/rootfs", and the fix was "simply" to replace that on the USB with the specific uuid for that USB, e.g.

Code: [Select]
root@OPNsense:~ # cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gptid/9088a5eb-e1ba-11e6-a89f-000ec4cf493f /               ufs     rw,noatime      1       1

now, can easily boot multiple versions on the same box.

Thanks Franco!
Title: Re: [puzzle] Multi-boot / running 16.7 & 17.1 on same box
Post by: franco on January 25, 2017, 06:46:47 pm
Hi there,

First time hit meaning nobody ever wanted to dual boot before *and* reported the issue. The labels are also relatively new, we had an annoying transition on Hyper-V because devices were changed.

Labels are good.  :)


Cheers,
Franco