Only one of two mirrored USB Drives is booting

Status
Not open for further replies.

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
-------------------------------------------------------------------------------
EDIT: solved using suggestion in #4 by doing things detailed in #7.
-------------------------------------------------------------------------------

Hello.

I had USB sticks A and B in my system in a mirrored freenas-boot pool. B broke according to zpool status -v so i bought two new and equal USB drives C and D.

The task is to replace both A and B with C and D. I removed B physically and added C. I attached (https://doc.freenas.org/9.3/freenas_system.html#mirroring-the-boot-device) C to the pool and removed B from the pool. Afterwards i let it resilver the thing, zpool clear ed the error and scrubbed the pool -> no known errors while A and C are in the pool and connected. So from my understanding A and C should now be equal.

I powered the system down and removed A physically (in order to insert D and mirror from C to D) -> systems wouldnt boot from C alone. I tripple checked that the BIOS is booting from USB. So the bootsector doesnt seem to be part of what is mirrored. First thing that came to mind is "WHY?" as that is a none reported missmatch between A and C that would leave my system unbootable if A suddenly explodes and imo contradictionar to the purpose of a mirrored boot drive.

Second thing is of course the question how to solve it. create an image of A like so (http://pleasework.robbievance.net/howto-backup-and-restore-freenas-bootable-usb-keys/) and flash that on C and D in the hope that this process duplicates the bootsector? afterwards sync A on C (https://doc.freenas.org/9.3/freenas_system.html#mirroring-the-boot-device), remove A, add D and sync C on D?

Or do i have to go through the hassle of backing up the config (which i do all the time ofc...) and reinstalling the whole OS from scratch?

Thank you very much for your time investing reading and any advice. Also have a nice weekend!
 
Last edited:

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Are A and C the same USB drives? Or are they a different brand/model? If the latter, I would say it's highly likely that the problem is C and D can't boot because of some incompatibility between them and your motherboard.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
Model of C equals D. apart from that A,B,and C are different models.

That might be possible. never had that before though and it seems unlikely as long as the bios detects it and reads some meta info which it does. i.e. the name of the device. at least thats my impression. well... stuff not working out of the box as exspected (as usual)...
 

ttabbal

Dabbler
Joined
Oct 9, 2015
Messages
35
You need to install grub on the new device. ZFS doesn't do booting directly, so the mirroring won't do that for you. This is true of most software RAID solutions. I'm surprised that the freenas docs don't seem to mention this. I don't recall the command syntax, but Google "grub-install", that should be what you need.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
That might be possible. never had that before though and it seems unlikely as long as the bios detects it and reads some meta info which it does. i.e. the name of the device.

Depending on your motherboard (which we would know if you had posted your hardware specs ;)), that may be exactly what's going on. I have experienced this many times. Certain motherboards are very picky, and USB drives that would boot on pretty much any other computer wouldn't work, or it may boot with a USB drive that no other computer can boot from. It has been less and less of a problem with new motherboards/USB drives, but without knowing what you're using, it's difficult to say with certainty.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
AH! you got me with not following the rules :). i bought the same components as in the freenas-mini (AsRock C2750D4I?).

USB drives C and D are SanDisk Ultra Fit 16GB USB 3.0

install grub seams likely. ill hit that now and will report.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
from the manual of grub-install: Installing a boot loader on a running OS may be extremely dangerous. Perfect!

my boot partition usb names under system-boot-status-name are da0p2 and da1p2.
i executed
$ grub-install /dev/da0
and
$ grub-install /dev/da1

which worked - both drives boot correctly and independently now. i flashed both ... well i didnt know which was which but hey it shows that this works as well.

if you have this problem or maybe just replaced one of your USB sticks and didnt even check afterwards if it boots - find your device names under /dev/ and be sure to flash the MBR located at /dev/da0 respectively /dev/da1 in my case and not to the partitions on that device (like i.e. /dev/da0p1 /dev/da0p2). system-boot-status-name gives you the name of the partitions! so dont just copy and paste them.

thanks a lot for the fast response and helpfull info guys!
have a nice weekend!

p.s.: I think a copy of the MBRs should be included via the GUI mirroring solution or at least none bootable devices in a mirrored boot partition should be checked for and labeled as such in RED.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I think a copy of the MBRs should be included via the GUI mirroring solution
I'd agree. If the mirroring code does not result in each device being bootable, I'd consider it a bug. Perhaps you could report it?
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
i have to shell out some things in overwatch now and just started my vacation - if you would excuse me - PEW PEW PEW! :) (sorry, i already triied to label this problems solution in detail here. if an admin/mod would be so kind to put that in the right place ? thanks a lot)
 
Status
Not open for further replies.
Top