From 8d5ef1a7a61d7475823452f47f5b4cd7a06722e8 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 21 Mar 2019 21:47:00 -0400 Subject: [PATCH] minor files --- README | 3 +++ fai/config/distro-install-common/end | 13 ++++++++----- .../stretch.list/{STRETCH => STRETCH_FREE} | 0 fai/config/hooks/partition.DEFAULT | 5 ++++- lk | 4 +++- mymk-basefile | 5 ++++- 6 files changed, 22 insertions(+), 8 deletions(-) rename fai/config/files/etc/apt/sources.list.d/stretch.list/{STRETCH => STRETCH_FREE} (100%) diff --git a/README b/README index c61f189..3287514 100644 --- a/README +++ b/README @@ -68,6 +68,9 @@ Before doing a fai install, you will need to populate a class file. I use one called 5-multi-boot, which you can see example of in fai/config/class/50-host-classes. +Before doing a fai install, you will need to populate /q/root/luks and +/q/root/shadow, see their references. + All scripts meant to be used directly are listed here: diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index a7745b7..3948073 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -17,10 +17,6 @@ if [[ -e $src && -e $dst ]]; then cp -rT $src $dst fi -if ifclass VOL_STRETCH_BOOTSTRAP; then - exit 0 -fi - TPW=/q/root/shadow/traci-simple if ifclass tp; then ROOTPW=/q/root/shadow/standard @@ -51,7 +47,14 @@ au() { # add user. i don't use adduser for portability } chpw root "$ROOTPW" -# 9 = user already exists. so we are idempotent. + +# only setup root pass for bootstrap vol +if ifclass VOL_STRETCH_BOOTSTRAP; then + exit 0 +fi + + +# return of 9 = user already exists. so we are idempotent. au iank chpw iank "$ROOTPW" diff --git a/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_FREE similarity index 100% rename from fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH rename to fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_FREE diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index ddcf53d..63537c2 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -145,7 +145,10 @@ $(cat $disk/queue/rotational)"; exit 1 ;; esac done -# install all ssds, or if there are none, all hdds +# install all ssds, or if there are none, all hdds. +# Note, usb flash disks are seen as rotational, which is +# very odd, but convenient for ignoring them here. +# TODO: find a reliable way to ignore them. if ! ifclass ROTATIONAL && (( ${#ssds[@]} > 0 )); then short_devs=( ${ssds[@]} ) else diff --git a/lk b/lk index 51b91d9..dbe9d2e 100644 --- a/lk +++ b/lk @@ -23,7 +23,9 @@ fai kexec from upstream live cds, i.e. curl|bash You can copy this to a http server, then wget -O- url|sudo bash curl is sometimes not preinstalled on a live cd. -This has been tested on trisquel belenos and ubuntu xenial. +This has been tested on trisquel belenos and ubuntu xenial & 18.10. +With 18.10 on an x200, kexec was unreliable, resulting in freezes and +kernel panics. If the screen just sits in a weird color inverted, corrupted looking state, it's probably nothing wrong with the computer, but a problem diff --git a/mymk-basefile b/mymk-basefile index 2a7f453..4136bb8 100755 --- a/mymk-basefile +++ b/mymk-basefile @@ -23,7 +23,10 @@ Args I've used before: -h|--help Print help and exit. -Note: Uses GNU getopt options parsing style +Note: Uses GNU getopt options parsing style. + +Usage of mk-basefile: + EOF $script_dir/fai/config/basefiles/mk-basefile -h exit $1 -- 2.30.2