How to make a boot from a specific hard disk with a zfs?

Dear

When I had a hard disk formated with ufs system (name as, e.g., a /dev/ada0) and move this disk to another SATA/computer it was recognized as, e.g., /dev/ada1, what did not allow to boot. I use to solve this problem booting from a pendrive, mounted / and edited /etc/fstab changing entries from ada0 to ada1. It was easy.
But now, I have a hard disk (it was a internal hard disk in my laptop and was named /dev/ada6) with a zfs standard setup (zroot is the pool name) that was put in a case to be used as a external hard disk (normally it is recognized as da0). When I tried to boot from this disk, choosing it in BIOS, boot process started but the pool is not found. Of course, I need to change something in /boot or /etc to specify where (in which disk) zroot is located. I try to find this simple, I guess, information on handbook and forums, and I believe that certainly it is there, but I couldn't find. Please, could you give directions or hints do solve it?

Thank you in advance for your attention
My best wishes
Eduardo
Universidade Federal do Paraná
Chemistry Department
 
I guess you are booting in legacy mode (BIOS, not UEFI), is that true?
(If you were booting in EFI mode, the bootloader would search all disks for both bootable UFS partitions and zfs pools.)

The zfs bootloader for legacy booting though, gptzfsboot(8), will only search for bootable zfs pools, starting the search on the disk it was invoked from.

The same is true for the legacy bootloader for UFS, gptboot(8), it will only search for bootable UFS partitions.
You might have one sitting on another harddisk or pendrive and thought you booted from your zfs disk, but actually didn't. So it failed to find your pool.
Depending on your BIOS, the configuration of booting from USB, might have a separate section to prioritize different USB devices, so I would check that twice.

You could boot from a pendrive and post the output from gpart show with all the disks connected. That would help a lot.
 
Back
Top