set -eE -o pipefail
chmod 644 /srv/fai/config/files/home/ian/.ssh/authorized_keys/GRUB_PC
chmod -R a+rX /srv/fai/config/distro-install-common
+cd /srv/fai/config/basefiles
+u=http://fai-project.org/download/basefiles/XENIAL64.tar.xz
+wget -nv -O /srv/fai/config/basefiles/${u##*/} $u
EOF
redeploy=false
fi
-disk_count=2
+# change this to test different disk counts. 1 and > 1 should be the only
+# important things to test.
+disk_count=1
if [[ $script_dir == /a/bin/* ]]; then
if $redeploy; then
./fai-redep
fi
- variant=debian8
+ variant=ubuntu16.04
+ #variant=debian8
fi
name=demohost
# We check the reverse condition in 51-multi-boot,
# and set what os we are installing, but don't check it
# into git since it changes regularly. Each host needs
-# to have a class of either STABLE or STRETCH64.
+# to have a class of either DEBIAN + STABLE or STRETCH64,
+# or UBUNTU + XENIAL64.
#
# It's shell looks like this:
# if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
# case $HOSTNAME in
-# tp) STABLE ;;
+# tp) DEBIAN STABLE ;;
# # add more multi-boot hostnames here
# esac
# fi
fi
# use a list of classes for our demo machine
-echo "FAIBASE DEBIAN PARTITION_PROMPT"
+echo "FAIBASE PARTITION_PROMPT"
case $HOSTNAME in
x2|frodo|treetowl)
- echo "NON_FREE"
+ echo "DEBIAN_NON_FREE"
if [[ -e /a/bin/fai/fai-wrapper ]] && isdebian-stable; then
echo "STABLE_NON_FREE"
fi
# if you have enough RAM (>2GB) you may want to enable this line. It
# also puts /var/cache into a ramdisk.
-# uncommented from upstream
+# ian: uncommented
FAI_RAMDISKS="$target/var/lib/dpkg $target/var/cache"
# if you want to use the faiserver as APT proxy
+++ /dev/null
-ubuntudist=xenial
--- /dev/null
+DEBIAN.var
\ No newline at end of file
--- /dev/null
+###### Ubuntu Main Repos
+deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe
+deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main universe
+
+###### Ubuntu Update Repos
+deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe
+deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe
+deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main universe
+deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe
+deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe
+deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main universe
# these 2 are alternative ways to identify a subvol, i think i prefer the 2nd.
if ifclass treetowl; then
cat >> /tmp/fai/fstab <<'EOF'
+$first_root_crypt /i btrfs noatime,subvol=i 0 0
UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs noatime 0 2
EOF
fi
+++ /dev/null
-#! /bin/bash
-
-# use external mirror, remove this script when using a mirror from CD
-
-cat <<EOM > $target/etc/apt/sources.list
-# external mirror
-deb MIRRORURL $ubuntudist main restricted universe multiverse
-deb MIRRORURL $ubuntudist-updates main restricted universe multiverse
-deb MIRRORURL $ubuntudist-security main restricted universe multiverse
-EOM
-
-# determine a fast mirror for Ubuntu
-list=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
-mirror=$(netselect $list | awk '{print $2}')
-sed -i -e "s#MIRRORURL#$mirror#" $target/etc/apt/sources.list
--- /dev/null
+updatebase.DEBIAN
\ No newline at end of file
-PACKAGES aptitude DEBIAN
+PACKAGES aptitude DEBIAN UBUNTU
fai-client
cron
debconf-utils
isc-dhcp-client
PACKAGES install GRUB_PC
-grub-pc
+grub-pc cryptsetup btrfs-tools bridge-utils
PACKAGES aptitude-r XORG
ubuntu-desktop
if ifclass DEBIAN; then
fcopy -M /etc/apt/preferences.d/unstable
- fcopy -riM /etc/apt/sources.list.d
- $ROOTCMD apt-get update
fi
+fcopy -riM /etc/apt/sources.list.d
+$ROOTCMD apt-get update
+
# note:
# default jessie groups + kvm, systemd-journal, adm
usermod -aG adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,systemd-journal ian
+
+# 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
+# the system not boot.
+sed -ri 's/(^ *GRUB_CMDLINE_LINUX.*)quiet splash/\1/' /etc/default/grub
+# on xenial, no grub is displayed at all. fix that.
+# found just by noticing this in the config file, and a
+# warning about it in error.log
+sed -i '/^ *GRUB_HIDDEN_TIMEOUT/d' /etc/default/grub
+update-grub2
EOF
fi
# Make sure everything is configured properly
-if ifclass DEBIAN ; then
+if ifclass DEBIAN || ifclass UBUNTU; then
echo "Running \"apt-get -f install\" for the last time."
$ROOTCMD apt-get -f install
fi
--- /dev/null
+../DEBIAN/10-rootpw
\ No newline at end of file
--- /dev/null
+../DEBIAN/30-interface
\ No newline at end of file
+++ /dev/null
-#! /bin/bash
-
-# check if we already use an external mirror
-grep -q "external mirror" $target/etc/apt/sources.list && exit 0
-
-cat <<EOM > $target/etc/apt/sources.list
-# external mirror
-deb MIRRORURL $ubuntudist main restricted universe multiverse
-deb MIRRORURL $ubuntudist-updates main restricted universe multiverse
-deb MIRRORURL $ubuntudist-security main restricted universe multiverse
-EOM
-
-# determine a fast mirror for Ubuntu
-list=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
-mirror=$(netselect $list | awk '{print $2}')
-sed -i -e "s#MIRRORURL#$mirror#" $target/etc/apt/sources.list