From: Ian Kelling Date: Fri, 28 Oct 2016 15:29:01 +0000 (-0700) Subject: add helper scripts, docs X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=bcdb96792264d6cda20e6d2fa176728a67c87862;p=automated-distro-installer add helper scripts, docs --- diff --git a/README b/README index b7bfa78..a3b16b7 100644 --- a/README +++ b/README @@ -40,11 +40,14 @@ Main scripts meant to be called interactively: arch-init-remote # install arch (after it's been booted into it's setup env) chboot # Set grub to boot into a different distro (installed earlier) dsfull # install & setup a new fai distro (if data partition already synced) +eboot # reboot and keep disks encrypted +fai-kexec # kexec to fai tftp server that pxe would normally point to fai-revm # test fai on a fresh vm faiserver-revm # create a vm which is a fai server using pxe & preseed file faiserver-uninstall # uninstall fai-server faiserver-setup # install fai-server on the current machine fresize # resize swap or boot partitions in a host +myfai-chboot # Sets up tftp pxe config on fai server pxe-server # temporarily enable (usually) fai or arch boot server wrt-setup-remote # setup my router ubuntu-xenial-live-fai-kexec # do fai install from xenial live cd using kexec diff --git a/dsfull b/dsfull index e24c549..06af7f8 100755 --- a/dsfull +++ b/dsfull @@ -1,10 +1,17 @@ #!/bin/bash -l # Copyright (C) 2016 Ian Kelling -# distro setup full using fai. (assuming we already synced data files to the host) -# Usage: dsfull [-r] HOST -# -r for no reboot. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. set -eE -o pipefail cleanup() { :; } @@ -16,27 +23,63 @@ if [[ $1 == -r ]]; then shift fi +usage() { + cat <&2' ERR + +if [[ $1 ]]; then + prefix="ssh root@$1" +fi +$prefix touch /tmp/keyscript-off +$prefix pxe-kexec -n --ignore-whitelist -l fai-generated faiserver diff --git a/pxe-server b/pxe-server index bac22c1..9c3f917 100755 --- a/pxe-server +++ b/pxe-server @@ -34,7 +34,8 @@ One line description TYPE is one of arch, plain, fai. HOST is a hostname known to the dhcp server, or default for all, or none to disable --r Don't redeploy fai config. +-r Don't redeploy fai config. For example, if there is a different host + that is mid-install. -a Wait for 2 dhcp acks, then disable the pxe server after a delay. First ack is for pxe boot, 2nd ack is for os boot. Sometimes on debian, there is a 3rd one shortly after the 2nd. I can't remember