X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=arch-pxe;h=78205442c62e4b3fe9f1623e43ce6f3c6cf1d31d;hp=68b288f71269e5f21aa15c7f8f20423c318f467e;hb=5ccaac3779f6bcf991e6ab0f7d545b37e3a4db63;hpb=affd7d3cdd0671dcca07f29de9c86b5e3b57ea1f diff --git a/arch-pxe b/arch-pxe index 68b288f..7820544 100755 --- a/arch-pxe +++ b/arch-pxe @@ -1,22 +1,61 @@ #!/bin/bash -lx +# Copyright (C) 2016 Ian Kelling + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Setup arch pxe boot server from the base image. -# Requires manually downloading image to /a/opt, and set it's name below. +# set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +usage() { + cat < airootfs.md5; b +rm -f $iso/$n/i686/airootfs.sfs $iso/$n/boot/i686/${n}iso.img +pushd $(dirname $sfs); md5sum ${sfs##*/} > airootfs.md5; popd # seems if you've done a pxe boot, mounted the nfs, # then shutdown, it's still busy. @@ -44,12 +83,10 @@ ssh wrt "cd /mnt/usb && rm -f tftpboot && ln -s $iso tftpboot" # The default settings in the installer expect to find the NFS at /run/archiso/bootmnt -pxe-server arch - -# background: -# great documentation at https://wiki.archlinux.org/index.php/PXE -# background: arch can do netboot like ubuntu etc, but the docs look a little complicated, so fuck it, -# we use nfs cuz it's easy +# background: great documentation at +# https://wiki.archlinux.org/index.php/PXE +# arch can do netboot like ubuntu etc, but the docs look a little +# complicated, so fuck it, we use nfs cuz it's easy rm -rf $iso s rm -rf squashfs-root