Can't force specific drive to boot from?

Flybye

Dabbler
Joined
Jan 6, 2020
Messages
15
From disabling a drive in the boot menu in the BIOS to manually selecting the drive I want to boot from with the boot selector from the BIOS to even swapping the drives between SATA ports, I can't ever boot from the specific drive I want.

So I have 3 hard drives.
Drive A
Drive B
Drive C

I had installed FN on A just as a quick experiment to see and play around with FN, but I had no plans to keep it as a boot drive since it is a 1TB drive. I then decided I want to use B for the boot and installed FN on it. Problem is, the system always wants to boot from A. Even if I select B from the boot menu, the box ends up booting up from A. I know B is bootable into FN because I physically disconnected A, and the system boots right up into B. C just sits in there looking pretty and always being recognized by FN regardless of either booting up from A or B.

So technically, I have 2 drives with FN installed on them. Even manually selecting to boot from B, why does the box always choose to boot from A when I know B boots up into FN when A is physically disconnected? I know it sounds like a weird BIOS issue of perhaps it is deciding it prefers to boot from A for whatever reason.
 

Flybye

Dabbler
Joined
Jan 6, 2020
Messages
15
Oh I forgot to mention, is there a way to nuke the FN install on A? I didn't see any format/del commands in the shell command list. Yeah, I could always just format it on another PC, but figured there must be a way in the shell to do so.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
You've not mentioned your system specs/model at all, so we're flying in the dark. Is it a domestic motherboard? They're tremendously dumb when it comes to booting.

Switch the SATA cables around so the cable that goes to A is moved to B. That'll probably be entirely sufficient.

If not, give us more info to work on.
 

Flybye

Dabbler
Joined
Jan 6, 2020
Messages
15
I didn’t bother with specs because I was mostly curious if, in an odd way, 2 bootable drives with FN installed are in a system, would FN boot from a drive then oddly finish loading up on the other drive. That makes zero sense to me, but I figured Id ask the possibility of that.

Ive never had this happen with 2 drives each with windows boot sectors. A system would boot from the drive I select with boot manager.

Ive changed sata cables around and always made B the ONLY bootable drive, and FN STILL manages to boot from A.

I am testing this on:
Asrock fm2a88x-itx+
Drive A is a WD 1tb
Drive B is a 2.5” Hitachi 180gb drive
Drive C is a 2tb Seagate
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
FreeNAS doesn't have much in the way of strange boot behaviours - I'm sure this is entirely down to your motherboard being annoying. Given what you've said here I'm really not sure what to recommend as the mobo is already misbehaving according to its settings. Have you updated the BIOS?

Blanking the boot sector on A seems like it would be helpful, but damned if I know why the Asrock is doing what it's doing.

When booted, work out which /dev/dXXX is disk A (you can do this in the GUI, Storage/Disks). Wipe it out with this command, replacing dXXX of course:

dd if=/dev/zero of=/dev/dXXX bs=512 count=1
 

Flybye

Dabbler
Joined
Jan 6, 2020
Messages
15
Fixed! I will let you decide if you still think it is my motherboard being annoying or if it was FreeNAS.

I booted up with GParted. Nuked all partitions on the drive that kept booting into FreeNAS which I did NOT want to boot into. Keep in mind I had always selected the other drive to boot into, but FreeNAs kept booting into the FreeNAS on this drive I did not want to boot from. One of those partitions was a FreeNAS boot, of course. Rebooted. System now only boots from drive I wanted to boot from. And the drive I nuked all the partitions on shows up us a drive to be able to create pools on.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
FreeNAS boots into the first zpool named freenas-boot, even if the bootloader comes from a different drive. You really need to wipe installations you do not want anymore. This is intended and documented behaviour - not so much on the FreeNAS side but the underlying FreeBSD operating system.

Sorry you had trouble with that.

Patrick
 

Flybye

Dabbler
Joined
Jan 6, 2020
Messages
15
Now worries. One of those little quirks with a 2 minute fix once educated about it. :)
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
FreeNAS boots into the first zpool named freenas-boot, even if the bootloader comes from a different drive.

Thanks Patrick - that was confusing! I'm surprised switching the SATA cables A<-->B didn't fix the issue, does that mean it's a "whichever disk first responds to the bootloader looking" sort of issue rather than SATA0 priority over SATA1 etc?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks Patrick - that was confusing! I'm surprised switching the SATA cables A<-->B didn't fix the issue, does that mean it's a "whichever disk first responds to the bootloader looking" sort of issue rather than SATA0 priority over SATA1 etc?
Sorry, I don't know. Just don't have more than one pool with one particular name, ok?
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Sorry, I don't know. Just don't have more than one pool with one particular name, ok?
Yes boss! :D

It'd be nice if FreeNAS did something clever about it though - I can imagine this situation causing confusion if a boot mirror breaks and you end up with two slightly different boot volumes, and don't know which one is actually coming up. Although maybe such a mirror break isn't possible in ZFS, since it should heal if a missing drive comes back.
 
Top