autoinst

scripts to make installation of custom debian easier and more automated
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

commit 56f563500c56798972ec79491d1c09fc7a4368c6
parent c9fb62f12a41750e7e933d360460bf1cf51cf213
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Wed, 29 Jul 2020 08:37:51 +0200

add some doc into README

Diffstat:
MREADME | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -22,3 +22,89 @@ It targets powerusers. If you don't know how to script, don't use this. * busybox * debootstrap * xorriso (if willing to build an iso) +* fakechroot (for non-root usage, fakeroot-ng might be supporter too, some day) + +== Usage + +./install.sh [TARGET] [SOURCE] + +TARGET: file where the installation will be done. Must either be an +existing file (block file or normal file with fixed allocated size) or +non-existing folder. +If TARGET does not exists, a folder will be created, and installation +will proceed in it. + +SOURCE: folder where instructions to build the system will be found. + +== Resulting system + +The script enforces some particularities that can currently not be +changed (whithout hacking it): + +* syslinux is used for boot management; +* a GPT partition system *must* be used; +* the boot partition *must* have the partition label "BOOTLOADER"; +* "BOOTLOADER" will be a vfat partition; + +== Modifying defaults + +The script should be built to facilitate configuration changes. +Thus, it fetches it configuration from a subfolder named 'src'. In +practice, most of this folder is simply copied to target, except for +the following: + +* src/partitions +* src/users +* src/users.d/* +* src/pkglist.d/* +* src/encryption.d/* + +=== src/partitions + +This file describes the partitions to build, it is fed into sfdisk. +etc/fstab is used to determine where the system will be installed, so +be certain to have a way to have a way to link those informations. + +If absent, the script will attempt to create a chroot (this, for now, +imply it needs root rights) in a new folder named (for now) 'distro'. +If the script cannot create the folder or does not run as root, it will +fail. + +=== src/users and src/users.d + +This file describes the users to create, their passwords and their +groups. Passwords are clear-text, so you might want to pre-configure +something to force or encourage the final user to fix that. +Except for the user "root" (which is always created, without password +if none was speficied): + +* a $HOME directory will be created; +* if src/users.d/$USER/ exists, it will be used as the --skel parameter + of useradd; +* a group will be created and the user will be added to it; + +Currently, the groups *must* exist before the users are created. They +can be created by the package selection you provided. + +Syntax is: +USER:PASSWORD:GROUP_1:GROUP_2:...:GROUP_N + +TODO: create groups before creating users if those does not exists yet + +=== src/pkglist.d/* + +The concatenation of the files here is used as a package list. + +=== src/encryption.d/* + +This folder contains files named after an existing partition. Those +files must define following variables: + +* CIPHER +* KEY_SIZE +* KEY_PASS +* HASH_TYPE +* FILE_SYSTEM + +Those variables are provided to cryptsetup like this: +`echo $KEY_PASS | cryptsetup -v -c $CIPHER -s $KEY_SIZE -h $HASH_TYPE luksFormat $PARTITION -`