X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=inline;f=mk-basefile-big;fp=mk-basefile-big;h=eee1a4c5573d3ee0a0753987694d6d3c224bd459;hb=ac4e0089e245c96a388b8fcdd92fc05da3399694;hp=0000000000000000000000000000000000000000;hpb=34839ddd0fbddfe203a3aa5b3387186a273e31df;p=automated-distro-installer diff --git a/mk-basefile-big b/mk-basefile-big new file mode 100755 index 0000000..eee1a4c --- /dev/null +++ b/mk-basefile-big @@ -0,0 +1,105 @@ +#!/bin/bash +# Copyright (C) 2018 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. + + +[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" + + +x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" +x="$(readlink -f -- "$BASH_SOURCE")"; PATH="${x%/*}:$PATH" # directory of this file + +usage() { + cat < /srv/fai/config/class/51-multi-boot + +rm -rf $t; mkdir -p $t + +LANG= fai -N -u hostname_does_not_matter dirinstall $t + +# Turn a dirinstall into a basefile. taken from mk-basefile +chroot $t apt-get clean +rm -f $t/etc/hostname $t/etc/resolv.conf \ + $t/var/lib/apt/lists/*_* $t/usr/bin/qemu-*-static \ + $t/etc/udev/rules.d/70-persistent-net.rules +echo | dd of=$t/etc/machine-id +tar --one-file-system -C $t -cf - . | gzip > /a/bin/fai-basefiles/basefiles/${distver^^}64BIG.tar.gz + + +cleanup +exit 0