s scp -r /q/root/luks /q/root/shadow \
root@$faiserver_host:/srv/fai/config/distro-install-common
scp /a/bin/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
+# built this with mk-basefile -J BELENOS64. it's stored in it's own repo which
+# is published alongside this one called fai-basefiles due
+# to being a large binary file.
+scp /a/bin/basefiles/BELENOS64.tar.xz root@$faiserver_host:/srv/fai/config/basefiles
ssh root@$faiserver_host bash <<'EOF'
set -eE -o pipefail
set -x
}
-# not sure why I wanted to have this option before. oh well.
-redeploy=true
-
+new_disk=false
reboot=true
-temp=$(getopt -l opt o "$@") || usage 1
+temp=$(getopt -l help hnr "$@") || usage 1
eval set -- "$temp"
while true; do
case $1 in
done
-if [[ $1 == -r ]]; then
- redeploy=false
-fi
-
# change this to test different disk counts. 1 and > 1 should be the only
# important things to test.
disk_count=1
else
./pxe-server fai
sleep 2
- if $redeploy; then
- ./fai-redep
- fi
- variant=ubuntu16.04
+ # I don't think these variants actually make a diff for us, but I
+ # use the appropriate one when trying a new distro just in case.
+ variant=ubuntu14.04
+ #variant=ubuntu16.04
#variant=debian8
fi
MIRROR_DEBIAN=http://http.us.debian.org/debian
#MIRROR_DEBIAN=http://localmirror/debian/
MIRROR_UBUNTU=http://mirror.netcologne.de/ubuntu/
+MIRROR_TRISQUEL=http://mirror.fsf.org/trisquel/
MIRROR_CENTOS=http://mirror.netcologne.de/
#MIRROR_CENTOS=http://localmirror
#MIRROR_SLC=http://localmirror
EXCLUDE_SQUEEZE=isc-dhcp-client,isc-dhcp-common,info,tasksel,tasksel-data
EXCLUDE_WHEEZY=isc-dhcp-client,isc-dhcp-common,info,tasksel,tasksel-data
EXCLUDE_JESSIE=isc-dhcp-client,isc-dhcp-common,info,tasksel,tasksel-data
+EXCLUDE_BELENOS=dhcp3-client,dhcp3-common,info
EXCLUDE_TRUSTY=dhcp3-client,dhcp3-common,info
EXCLUDE_XENIAL=isc-dhcp-client,isc-dhcp-common,udhcpc,dibbler-client,dhcpcd5,info,tasksel,tasksel-data
}
+belenos() {
+ ln -sf gutsy /usr/share/debootstrap/scripts/belenos
+ local arch=$1
+
+ check
+ debootstrap --arch $arch --exclude=${EXCLUDE_BELENOS} --include=${INCLUDE_DEBIAN} belenos $xtmp ${MIRROR_TRISQUEL}
+ cleanup-deb
+ tarit
+}
+
unknown() {
echo "Unknown distribution. Aborting."
SLC7_64) slc amd64 7 ;;
TRUSTY32) trusty i386 ;;
TRUSTY64) trusty amd64 ;;
+ BELENOS64) belenos amd64 ;;
XENIAL32) xenial i386 ;;
XENIAL64) xenial amd64 ;;
SQUEEZE32) squeeze i386 ;;
--- /dev/null
+# a bit older distro, so get all backports
+Package: *
+Pin: release a=belenos-backports
+Pin-Priority: 500
--- /dev/null
+deb http://mirror.fsf.org/trisquel/ belenos main
+deb-src http://mirror.fsf.org/trisquel/ belenos main
+
+deb http://mirror.fsf.org/trisquel/ belenos-updates main
+deb-src http://mirror.fsf.org/trisquel/ belenos-updates main
+
+deb http://mirror.fsf.org/trisquel/ belenos-security main
+deb-src http://mirror.fsf.org/trisquel/ belenos-security main
+
+# Uncomment this lines to enable the backports optional repository
+deb http://mirror.fsf.org/trisquel/ belenos-backports main
+deb-src http://mirror.fsf.org/trisquel/ belenos-backports main
--- /dev/null
+# intentionaly left empty. only using sources.list.d
DISTRO=debianstable
elif ifclass XENIAL64; then
DISTRO=ubuntuxenial
+ elif ifclass BELENOS64; then
+ DISTRO=trisquelbelenos
else
echo "PARTITIONER ERROR: no distro class/var set" >&2
exit 1
if ! ifclass STABLE; then
if ifclass VM; then
- # For a vm, we only get ID_NET_NAME_MAC from below,
- # but when it reboots, it uses ID_NET_NAME_SLOT.
- NIC1=ens3
+ # older distro still uses eth0
+ if ifclass BELENOS64; then
+ NIC1=eth0
+ else
+ # For a vm, we only get ID_NET_NAME_MAC from below,
+ # but when it reboots, it uses ID_NET_NAME_SLOT.
+ NIC1=ens3
+ fi
else
# get persistent interface name. Note, these class conditions
# will need to get modified for new oses. testing vm doesn't use
chown -R root:root /root/.ssh
chmod 700 /root/.ssh
+
# default jessie groups + kvm, systemd-journal, adm
-usermod -aG adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,systemd-journal ian
+usermod -aG adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev ian
+if getent group systemd-journal >/dev/null; then
+ usermod -aG systemd-journal ian
+ # makes the journal be saved to disk.
+ mkdir -p /var/log/journal
+ chmod 755 /var/log/journal
+fi
# https://askubuntu.com/questions/33416/how-do-i-disable-the-boot-splash-screen-and-only-show-kernel-and-boot-text-inst
# it suggests not having plymouth-theme-ubuntu-text, but
# making it not installed then kills plymouth, then makes
$ROOTCMD usermod -a -G $g traci
done
-# makes the journal be saved to disk.
-$ROOTCMD mkdir -p $FAI_ROOT/var/log/journal
-$ROOTCMD chmod 755 $FAI_ROOT/var/log/journal