Solved Unable to fully boot from crypted zfs root with entries in fstab

Greetings

I have a problem with FreeBSD 10.2 and booting from a GELI encrypted zfs root (default install, with /usr/local added as a seperate datasheet)
zfs list output:
Code:
NAME                 USED  AVAIL  REFER  MOUNTPOINT
bootpool             510M  1.42G   509M  /bootpool
zroot                792M  16.5G    96K  /zroot
zroot/ROOT           338M  16.5G    96K  none
zroot/ROOT/default   338M  16.5G   312M  /
zroot/tmp            176K  16.5G   112K  /tmp
zroot/usr            451M  16.5G    96K  /usr
zroot/usr/home       136K  16.5G   136K  /usr/home
zroot/usr/local      451M  16.5G   451M  /usr/local
zroot/usr/ports       96K  16.5G    96K  /usr/ports
zroot/usr/src         96K  16.5G    96K  /usr/src
zroot/var            920K  16.5G    96K  /var
zroot/var/audit       96K  16.5G    96K  /var/audit
zroot/var/crash       96K  16.5G    96K  /var/crash
zroot/var/log        296K  16.5G   200K  /var/log
zroot/var/mail       176K  16.5G   112K  /var/mail
zroot/var/tmp        160K  16.5G    96K  /var/tmp

I then went ahead and added this to /etc/fstab
Code:
tmpfs /usr/local/www/munin tmpfs rw,mode=777,size=150000000 0 0

When I boot the VM I get the following error:

Code:
Mounting local file system:mount: /usr/local/ww: No such file or directory.
Boot is aborted and I am dropped into sh.
The problem is, as it seems to me, that at the time /etc/fstab is read and the filesystems in there mounted, zfs has not fully mounted all its datasheets yet.

zfs get mounted confirmes this:
Code:
NAME                        PROPERTY  VALUE    SOURCE
bootpool                    mounted   no       -
zroot                       mounted   no       -
zroot@install               mounted   -        -
zroot/ROOT                  mounted   no       -
zroot/ROOT@install          mounted   -        -
zroot/ROOT/default          mounted   yes      -
zroot/ROOT/default@install  mounted   -        -
zroot/tmp                   mounted   no       -
zroot/tmp@install           mounted   -        -
zroot/usr                   mounted   no       -
zroot/usr@install           mounted   -        -
zroot/usr/home              mounted   no       -
zroot/usr/home@install      mounted   -        -
zroot/usr/local             mounted   no       -
zroot/usr/local@install     mounted   -        -
zroot/usr/ports             mounted   no       -
zroot/usr/ports@install     mounted   -        -
zroot/usr/src               mounted   no       -
zroot/usr/src@install       mounted   -        -
zroot/var                   mounted   no       -
zroot/var@install           mounted   -        -
zroot/var/audit             mounted   no       -
zroot/var/audit@install     mounted   -        -
zroot/var/crash             mounted   no       -
zroot/var/crash@install     mounted   -        -
zroot/var/log               mounted   no       -
zroot/var/log@install       mounted   -        -
zroot/var/mail              mounted   no       -
zroot/var/mail@install      mounted   -        -
zroot/var/tmp               mounted   no       -
zroot/var/tmp@install       mounted   -        -

Only zroot/ROOT/default is mounted at that point in the boot sequence. Should not zfs automount every dataset with a mountpoint asap?

Any suggestions would be appreciated.
 
Add late to your fstab entry to mount it after other filesystems:
Code:
tmpfs /usr/local/www/munin tmpfs rw,mode=777,size=150000000,late 0 0
 
Just out of curiosity, what would happen if I made /etc or /bin a separate dataset? Would I be unable to boot?
 
Back
Top