Bug 229628 - Can't import bootpool in ZFS installation with installerconfig
Summary: Can't import bootpool in ZFS installation with installerconfig
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-07-09 07:00 UTC by Kazuhiko Kiriyama
Modified: 2018-07-09 11:43 UTC (History)
2 users (show)

See Also:


Attachments
bsdinstall,zfsboot and script patch of 12.0-CURRENT-r335317 (3.04 KB, patch)
2018-07-09 07:00 UTC, Kazuhiko Kiriyama
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kazuhiko Kiriyama 2018-07-09 07:00:39 UTC
Created attachment 194980 [details]
bsdinstall,zfsboot and script patch of 12.0-CURRENT-r335317

In bsdinstall using installerconfig, if you divide the ZFS file system into
bootpool and zroot, there are the following problems. 

(1) Since /boot is symbolically linked to /bootpool, it is  
expanded by

tar - xf distrubution_tarball - C chroot_directory 

in script so it will not be expanded to /bootpool. This 
can be solved by adding the -P option to tar. 

(2) bootpool's zpool.cache information does not contain bootpool information
and zroot's zpool.cache does not exist, bootpool will not be imported at
boot time and will not boot properly. To solve this problem create
zpool.cache with bootpool and zroot in /boot/zfs/zpool.cache with
zpsboot on bootpool after creating bootpool, and on zroot as well
zpool.cache in /boot/zfs/zpool.cache. 

If you try to output debugging information to the display and the file at
the same time, it will not be output to the specified file normally . This
is because tee does not have the -a option in bsdinstall.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2018-07-09 11:43:06 UTC
Add a couple of reviewers who work in this area.