Bug 210804 - installerconfig - using ZFS create in custom script mounts the dataset in the wrong directory
Summary: installerconfig - using ZFS create in custom script mounts the dataset in the...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2016-07-04 05:13 UTC by Laurie Odgers
Modified: 2016-08-30 08:12 UTC (History)
1 user (show)

See Also:
taropalo: maintainer-feedback+
taropalo: mfc-stable10?


Note You need to log in before you can comment on or make changes to this bug.
Description Laurie Odgers 2016-07-04 05:13:16 UTC
If I run "zfs create" in the script part of installerconfig (after #!/bin/sh shebang), the mountpoint for the new dataset is /mnt/mnt/datasetname instead of /mnt/datasetname. I'm guessing this has something to do with the fact that the new install is chrooted to /mnt?
Comment 1 taropalo 2016-08-26 07:54:50 UTC
Affected the same problem. Tested FreeBSD 10.3 RELEASE and STABLE versions.
FreeBSD  10.3-STABLE FreeBSD 10.3-STABLE #0 r302791: Thu Jul 14 01:16:15 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

FreeBSD  10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

If you break installation and umount dataset and mount it again it mounts correctly. 

#zfs umount zroot/dataset
#zfs mount zroot/dataset

now mount shows
zroot/dataset on /mnt/dataset (zfs, local, noatime, nfsv4acls)