I followed the menu to install FreeBSD 11 with encrypted ZFS. After using the system fine for some days, I messed something in /boot/loader.conf so can not boot. I searched and the way to recover is to boot from live CD and type:

# cd /tmp/
# mkdir mounted
# geli attach /dev/ada0p3
# zpool import -f -R /tmp/mounted zroot

it worked, and here is what ZFS look like

# zfs list
zroot               5.64G   223G    96K  /tmp/mounted/zroot
zroot/ROOT          4.05G   223G    96K  none
zroot/ROOT/default  4.05G   223G  4.05G  /tmp/mounted
zroot/tmp            124K   223G   124K  /tmp/mounted/tmp
zroot/usr           1.58G   223G    96K  /tmp/mounted/usr
zroot/usr/home       373M   223G   373M  /tmp/mounted/usr/home
zroot/usr/ports      642M   223G   642M  /tmp/mounted/usr/ports
zroot/usr/src        608M   223G   608M  /tmp/mounted/usr/src
zroot/var           1020K   223G    96K  /tmp/mounted/var
zroot/var/audit       96K   223G    96K  /tmp/mounted/var/audit
zroot/var/crash       96K   223G    96K  /tmp/mounted/var/crash
zroot/var/log        512K   223G   512K  /tmp/mounted/var/log
zroot/var/mail       120K   223G   120K  /tmp/mounted/var/mail
zroot/var/tmp        100K   223G   100K  /tmp/mounted/var/tmp

However, I can not find /boot/loader.conf ! The following directories are empty (other than other ZFS mount points):

# ls /tmp/mounted/
tmp usr var zroot
# ls /tmp/mounted/zroot/

I believe I also tried to zfs mount zroot/ROOT somewhere else but also found nothing there.

other ZFS partitions all appear fine, for example:

# ls /tmp/mounted/usr/ports/
.arcconfig .gitattributes .gitignore CHANGES CONTRIBUTING.md ...

Where can I find /boot/loader.conf?


A developer on FreeBSD forum provided the solution, at mount FreeBSD encrypted ZFS from live CD AND find the root partition

Turned out, that root folder in ZFS was labelled NOT to be automounted when imported, even though all the other ZFS slices were automounted. So mounting it by hand resolved it:

zfs mount zroot/ROOT/default

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.