STEPS FOR FRESH INSTALL

CONTEXT

. a Devuan 1.0 basic system; should work on previous supported
  systems, too (Ubuntu 12.04), but not tested, since ubuntu is
  obsoleted and replaced by Devuan we don't have installed any
  ubuntu fresh machine lately

. network running, static or dhcp, with internet access (or
  at least access to an internal repository from which install
  the needed packages)

. ssh server installed whould be nice, but you can perform the
  first steps of installation directly from console, provided
  that you can transfer needed files in some way (eg: usb stick)



FILESYSTEMS

. there isn't a required filesystem layout for a kusa system,
  and the presence and layout of various layers (raid, lvm, etc)
  depends on purpouse of the machine, it's your choice

. for historycal reasons a canonical kusa layout is something
  like this:

  	- /	the root, varying from 5 to 16 Gb; note that
		we usually don't use a separate /var (see below)
	- /w	the data filesystem; note that a few /var
		directories will be redirected (symlinked) here


BETTER TO KNOW BEFORE STARTING

. the main configuration command to use is "kusa"; the real
  program used is "kusa-reconf", kusa is a fronted that will call
  kusa-reconf recording all output in files under numbered directories
  /var/log/kusa/NNNN

. use kusa-reconf alone just to little, basic steps, usually is
  better use "kusa" wrap to have a log record for troubleshooting

. use kusa-conf command to examine the kusa definitions db; the db
  entries are defined, and ovverided when needed, in order from:

  	. kusa defaults
	. /etc/kusa/conf.d/ dir snippets
	. /etc/kusa/kusa.conf file
	. /etc/kusa/kusa.debug file

. to see the config database use the kusa-conf command, eg:

	# kusa-conf --dump --regexp .   (the full db)

	# kusa-conf --dump section_name

  add --no-parse as first option if you want to disable the
  recursive internal variables replacement, and discover where
  a definition will get his value

. each kusa module have its own defaults settings, you can override
  or integrate them adding your definitions in /etc/kusa/kusa.conf
  file, or writing config snippets in /etc/kusa/conf.d/ directory;
  do not use the "auto" prefix in this directory, is reserved
  for auto and/or downloaded config snippets by kusa itself

. to see which modules will be installed use the kusa-conf command
  like this (eg: for "server" class):

  	# kusa-conf --dump class.server.modules

. another way see which modules will be installad is to run
  kusa-reconf in dry-run / keep tempdir mode:

  	# kusa-reconf -b

  the advantage of this approach is that you can also see the
  precedence of modules installation



STEP 1: INSTALL KUSA PACKAGES

. from an installed kusa system copy /bin/ku-distroenv and
  /usr/sbin/kusa-bootstrap scripts in a temporary location
  (eg: /tmp), and make them executable

. run ./kusa-bootstrap: this will add a temporary apt entry
  (in /etc/apt/sources.list.d) for our repositories and install
  "kusa" package

. debconf: since almost all aspect of the system will be auto
  configured by kusa, the debconf dialogs are useless and
  annoying, kusa-bootstrap will reconfigure debconf and you
  have the choiche to hide the dialogs, selecting the option
  Noninteractive


STEP 2: NETWORK AND BASIC TOOLS

. a default, example kusa main config file /etc/kusa/kusa.conf
  is installed by kusa package; edit it to suite your needs

. if your use the centralized config approach (recommended)
  you just have to define the machine class, the network
  settings and the remote config urls

. otherwise, if you are performing a standalone configuration
  you need to define each setting by hand; what setting depends
  on which modules you have requested

. the modules installed depends on which class(es) you have
  declared in /etc/kusa/kusa.conf file; you can add additional
  modules using the "extramodules" definition, or remove them
  using the "skiplist" definition

. configure the basic modules: network, reposities, basic stuffs:

	# kusa net base-service base-repos base

. perform a system upgrade, just to have a good starting point:

	# apt-get upgrade


STEP 3: USERS

. kusa works better with a normalized system userbase, this step
  is optional but recommended

. if you want to perform a full, clean normalization you need to
  remove "exim" packages first, since kusa systems uses postfix
  instead of debian/devuan default; if you have correctly set up
  the kusa-db definitions, the better way is to install the
  srv-smail module:

  	# kusa srv-smail

. run the system users normalization:

	# kusa -s base-users base-users

. you need to reboot your machine at this point

. WARNING! before a reboot, make sure that all was gone well, if
  working on a remote machine doble check the network settings 
  (/etc/network/interface) and the ssh server settings
  (/etc/ssh/sshd_config); make sure that you can remotely access
  with root (PermitRootLogin yes in sshd_config, or ssh credentials
  correctly setup and tested, or sudo available for a low privileged
  user)


STEP 4: CONFIGURE THE WHOLE SYSTEM

. before proceed, you may want to cleanup some things:

	- /etc/fstab (if you prefer to use real devices or label
	  approach, instead of uuid)

	- /etc/aliases: wipe out all default entries, will be filled
	  by kusa


. run kusa on all needed modules:

	# kusa



