git: installer - use a more modern mount setup for UFS and HAMMER.

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Dec 13 23:08:46 PST 2015


commit f9602a12d5f0345feed0941d0b9e3b4e1816a411
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Dec 13 19:18:47 2015 -0800

    installer - use a more modern mount setup for UFS and HAMMER.
    
    * Rewrite a large chunk of the disklabeling and mount point code.
      UFS now gains a separate /boot partition, avoiding issues with
      the boot loader if the user desires to install a large UFS root on
      a drive.
    
    * Normalize the mount mechanics for both UFS and HAMMER.  Instead of
      using PFSs on HAMMER, we create two large partitions by default:
      One is the root partition, the other is /build.
    
      The /build partition holds major elements of the system which would
      normally not have to be backed up:
    
    	/var/tmp	(from /build/var.tmp)
    	/var/cache	(from /build/var.cache)
    	/var/crash	(from /build/var.crash)
    	/var/spool	(from /build/var.spool)
    	/var/log	(from /build/var.log)
    	/usr/obj	(from /build/usr.obj)
    
      The root partition holds all remaining major directories, including the
      base /var.
    
      There are several reasons for this.  Generally speaking, stuff in /home,
      /usr and most of the stuff in /var is critical to system operation and
      user happiness, and it makes little sense to separate it out from the root
      mount.
    
      We pick-out the less critical directories and place them on /build,
      using NULL mounts to mount them in their expected locations.
    
    * Users can easily make adjustments post-install without having to mess
      around with PFSs, and can make simple adjustments pre-install.
    
    * Drives smaller than around 40GB will not create a separate /build
      partition by default, but will still create a /build directory in the
      root partition and generate the same nullfs mounts.  This makes it easier
      for the user to adjust to a larger configuration later on if desired.
    
    * This also improves crash recovery mechanics, increasing the chance that
      the root partition will be able to mount with minimal recovery work.
    
    * We now use a tmpfs filesystem for /tmp by default.  /var/tmp is mounted
      from storage.  Again, the user can change this easily post-install.
    
    * Calculate better values for swap, root, and /build, based on the size
      of the slice being installed to.  The /build directory will cap-out
      at around 20GB leaving.  Swap will be made smaller if the root partition
      seems to small, and so forth.
    
      Some swap is always configured.  Swap is a very useful thing to have,
      even if you have tons of memory, because there will always be a certain
      number of always-idle pages from idle services laying around.
    
    * Remove /dev from sources.conf, it is no longer appropriate to try to
      cpdup /dev.  Fixes a cpdup error.
    
    * UFS root can now be encrypted (it couldn't before), because the UFS
      install now splits out a separate /boot partition.
    
    * Tested w/non-crypto UFS and HAMMER install, crypto UFS and HAMMER install,
      and with small and large drives.

Summary of changes:
 etc/mtree/BSD.root.dist                            |   2 +
 etc/mtree/BSD.var.dist                             |   2 +
 share/installer/sources.conf                       |   1 -
 usr.sbin/installer/dfuibe_installer/flow.h         |  13 +-
 usr.sbin/installer/dfuibe_installer/fn.h           |   1 +
 usr.sbin/installer/dfuibe_installer/fn_configure.c | 211 ++++------
 usr.sbin/installer/dfuibe_installer/fn_install.c   | 462 ++++++++++++---------
 .../installer/dfuibe_installer/fn_subpart_hammer.c | 209 +++++++---
 .../installer/dfuibe_installer/fn_subpart_ufs.c    | 197 ++++-----
 usr.sbin/installer/libinstaller/diskutil.c         |  65 +--
 10 files changed, 633 insertions(+), 530 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f9602a12d5f0345feed0941d0b9e3b4e1816a411


-- 
DragonFly BSD source repository



More information about the Commits mailing list