How to mount raidz2 on installer shell

Karl Denninger karl at denninger.net
Fri May 24 19:06:24 UTC 2019


On 5/24/2019 13:11, James B. Byrne via freebsd-questions wrote:
> I just installed 12.0 on a new host with new discs. The install went
> fine but the system will not boot because:
>
> gptfsboot: No ZFS pools found, can't boot
>
> I have booted into single user mode from the install stick. How do I
> mount bootpool so that the boot-loader finds it when I reboot?
>
> camcontrol devlist shows the drives:
>
> Code:
>
> TEAC DV-20E-V 1.AB>            at scbus0 target 0 lun 0 (cd0,pass0)
> <WDC WD80EFAX-68KNB0 81.00A81> at scbus1 target 0 lun 0 (pass1,ada0)
> <WDC WD80EFAX-68KNB0 81.00A81> at scbus2 target 0 lun 0 (pass2,ada1)
> <WDC WD80EFAX-68KNB0 81.00A81> at scbus3 target 0 lun 0 (pass3,ada2)
> <WDC WD80EFAX-68KNB0 81.00A81> at scbus4 target 0 lun 0 (pass4,ada3)
> <Kingston DataTraveler 2.0 PMAP> at scbus7 target 0 lun 0 (da0,pass5)
>
> gpart shows all the drives partitioned. zpool import shows nothing.
>
> I believe that the problem is that that the installer does not provide
> a link from /boot to /bootpool/boot and therefore the boot loader.conf
> file cannot be found.
>
> What I wish to do is to mount the raidz2 pool (zroot) and create a
> logical link between /boot and /bootpool/boot.
>
> Any help is appreciated.

Something else is wrong.

gptzfsboot will "taste" all the disks it can find and look for zfs
partitions.  It will assemble the pool(s) it can find (starting with the
disk gptzfsboot was loaded from, then in whatever order the BIOS
presents them.)

The first pool it can assemble that is usable is then checked for a
"bootfs" filesystem setting (this is how "boot environments" can be set
up so as to boot from one place or another on the same pool.)  If it's
set then that's the filesystem it attempts to boot.  If that's NOT set
on the pool then the root of the pool is attempted to be used as the
boot filesystem and the loader assumes there is a /boot directory there,
proceeding from that point.  /boot/loader.conf may contain a different
location for the root filesystem (prior to 12.x this was common if you
wanted to have root on geli where the boot was not encrypted; this is no
longer necessary as gptzfsboot can boot from an encrypted pool now.)

If it's not finding a pool *at all* that implies that either the zfs
filesystem isn't on the whole disk(s) or they aren't in a freebsd-zfs
partition (assuming GPT partitioned drives) on the disk(s) in question. 
That shouldn't happen if you used the installer assuming the BIOS is
presenting the disks in the same general way the installer saw them.

What you're reporting (that the disks are showing up when booted off the
install media, and that gpart show displays the correct partition
layout, including the freebsd-zfs partition, yet "zpool import" shows
nothing) doesn't make sense.  The only other thing I can come up with
off the top of my head is that you may have a mixup in machine's BIOS
boot mode setting between EFI and "Legacy" vis-a-vis what the installer
was loaded via originally and as a result the BIOS isn't presenting the
disks to gptzfsboot at all, thus it has nothing to "taste" since it
doesn't see any disks.

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4897 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20190524/c11b09fb/attachment.bin>


More information about the freebsd-questions mailing list