# install keeps booting zfs not usb



## Don9999 (Dec 28, 2020)

New to freebsd and zfs but a fair amount of experience with unix/linux. 

I did a test install of zfs from freebsd 11 and now I can't fully boot off the usb drive to try different installs.  It always switches to the previous zfs install on the ada0 disk. Bios is set to boot usb, at the Welcome to FreeBSD menu tried a few different boot options  with no luck. If I login I can't do a "gpart destroy -F ada0" as I get a device busy or say "camcontrol format ada0" or even a "zpool destroy zroot". I think when I did some test installs with freebsd 12 I could do the gpart destroy with the -F force option. 

Seems like my options are to use dd to try to destroy the partition or disconnect that drive and install to one of the 2 data disks I'll eventually use as a zfs mirror and then use gpart destroy of the ssd root drive but am I missing something here?


----------



## Don9999 (Dec 28, 2020)

And of course just about the next thing I try worked, "dd if=/dev/zero of=/dev/ada0p1" and then an init 6.


----------



## SirDice (Dec 28, 2020)

What partition scheme did you use on the USB stick? I think you may have put gptzfsboot(8) instead of gptboot(8) in the freebsd-boot partition of the stick. That would cause it to boot from the first ZFS pool it can find. 

You can probably force the boot if you hit a key during the BTX boot phase (that's before the menu even appears).

If you want to try different FreeBSD versions on the same ZFS pool you might want to checkout bectl(8) (only available on 12+) or sysutils/beadm (should work with any supported version).


----------

