Skip to content

Commit

Permalink
Merge tag '5.1' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Jun 28, 2016
2 parents 171b63b + 62de3bf commit e41aee1
Show file tree
Hide file tree
Showing 37 changed files with 154 additions and 114 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -53,4 +53,4 @@ Institut fuer Informatik mailto:lange@informatik.Uni-Koeln.DE

4096R/074BCDE4 B11E E327 3F6B 2DEB 528C 93DA 2BF8 D9FE 074B CDE4
----------------------------------------------------------------------
Copyright (c) 1999-2015 Thomas Lange. All rights reserved.
Copyright (c) 1999-2016 Thomas Lange. All rights reserved.
2 changes: 1 addition & 1 deletion bin/dhcp-edit
Expand Up @@ -58,7 +58,7 @@ if ($opt_r) {
# grep all lines if the entry already exists
foreach (@dhcpd) {
next if /^\s*#/; # do not change comments
merror(7,"$hostname already exists in dhcpd.conf") if m/host\s+$hostname\b/;
merror(7,"$hostname already exists in dhcpd.conf") if m/host\s+$hostname\s/;
merror(7,"MAC address $mac already exists in dhcpd.conf") if m/hardware\s+ethernet\s+$mac[\s+;]/i;
}
}
Expand Down
7 changes: 4 additions & 3 deletions bin/fai
Expand Up @@ -5,7 +5,7 @@
# fai -- main installation script executed after booting
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 1999-2015 by Thomas Lange, lange@informatik.uni-koeln.de
# (c) 1999-2016 by Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
# (c) 2001-2005 by Henning Glawe, glaweh@physik.fu-berlin.de
# Freie Universitaet Berlin
Expand Down Expand Up @@ -99,6 +99,7 @@ fai_init() {

if [ $do_init_tasks -eq 1 ]; then
eval_cmdline
define_fai_flags
[ -d /sys/kernel ] || mount -t sysfs sysfs /sys
# we really need to start udev
if [ -x /etc/init.d/udev ]; then
Expand All @@ -108,7 +109,7 @@ fai_init() {
test -f /etc/init/udevtrigger.conf && udevadm trigger --action=add && udevadm settle
fi
fi
mkdir -p /var/run/network /dev/shm/network # when using initrd kernels
mkdir -p /var/run/sshd /var/run/network /dev/shm/network # when using initrd kernels
ifup lo
[ -x /sbin/portmap ] && /sbin/portmap
if [ -x /sbin/rpcbind ]; then
Expand Down Expand Up @@ -146,7 +147,7 @@ fai_init() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
usage() {
cat <<-EOF
fai $FAI_VERSION. Copyright (C) 1999-2015 Thomas Lange
fai $FAI_VERSION. Copyright (C) 1999-2016 Thomas Lange
Usage: $0 [options] [action]
Options:
Expand Down
5 changes: 3 additions & 2 deletions bin/fai-chboot
Expand Up @@ -5,7 +5,7 @@
# fai-chboot -- manage configuration for network boot
#
# This script is part of FAI (Fully Automatic Installation)
# Copyright (C) 2003-2015 Thomas Lange, lange@informatik.uni-koeln.de
# Copyright (C) 2003-2016 Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
Expand Down Expand Up @@ -467,7 +467,8 @@ if ($opt_i || $opt_s) {
if ($opt_i) {

my $bopt;
$bopt="aufs";
-d "$nfsroot/lib/modules/$kernelsuffix/kernel/fs/aufs" and $bopt="aufs";
-d "$nfsroot/lib/modules/$kernelsuffix/kernel/fs/overlayfs" and $bopt="rootovl";

# create config so host will boot the install kernel
$kernelname = "kernel ${opt_U}vmlinuz-$kernelsuffix";
Expand Down
4 changes: 2 additions & 2 deletions bin/fai-deps
Expand Up @@ -16,7 +16,7 @@
fai-deps uses files $FAI/class/*.deps to sort the classes in $LOGDIR/FAI_CLASSES and define additional ones. While doing so, it retains the original order as much as possible.
*.deps files may contain class names, seperated by whitespace. Comments ( after # or ; ) are ignored
*.deps files may contain class names, separated by whitespace. Comments ( after # or ; ) are ignored
e.g. you have a class WORDPRESS that depends on the classes VHOST and POSTGRES . VHOST again may depend on WEBSERVER.
So if you want to install the blogging software wordpress, you add a file
Expand Down Expand Up @@ -48,7 +48,7 @@ One non-standard perl module is required:
Graph::Directed;
On debian install libgraph-perl
The following enviroment variables are used:
The following environment variables are used:
$LOGDIR : path to fai temporary files
$FAI : path to fai config space
Expand Down
11 changes: 6 additions & 5 deletions bin/fai-make-nfsroot
Expand Up @@ -5,7 +5,7 @@
# fai-make-nfsroot -- create nfsroot directory and add additional packages
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2000-2015 by Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2000-2016 by Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
# (c) 2004 by Henning Glawe, glaweh@physik.fu-berlin.de
# Freie Universitaet Berlin
Expand All @@ -32,7 +32,7 @@
usage() {

cat <<-EOF
Copyright (C) 1999-2015 Thomas Lange
Copyright (C) 1999-2016 Thomas Lange
Usage: fai-make-nfsroot [OPTIONS]
Create an NFSROOT for FAI.
Expand Down Expand Up @@ -384,7 +384,7 @@ EOF
echo 'hostonly="no"' > $NFSROOT/etc/dracut.conf.d/20-generic-image.conf
cat <<EOF > $NFSROOT/etc/dracut.conf.d/01-omit.conf
omit_dracutmodules+=" btrfs lvm resume usrmount mdraid shutdown dracut-systemd systemd systemd-initrd systemd-networkd systemd-initrd "
filesystems="aufs nfs lockd ext4"
filesystems="nfs lockd ext4"
EOF

local fname=$(readlink -f $cfdir/apt/sources.list)
Expand All @@ -409,8 +409,8 @@ EOF
set_root_pw

# set timezone in nfsroot
cp -H /etc/timezone etc/timezone
cp -H /etc/localtime etc/localtime
cp -fH /etc/timezone etc/timezone
cp -a /etc/localtime etc/localtime
ln -sf /proc/mounts etc/mtab

[ -f etc/init/tty1.conf ] || ln -s /usr/sbin/fai etc/init.d/rcS
Expand Down Expand Up @@ -498,6 +498,7 @@ umount_dirs() {

if [ -n "$FAI_DEBMIRROR" ]; then
test -d $NFSROOT/$MNTPOINT && umount $NFSROOT/$MNTPOINT || true
rmdir $MNTPOINT || true
fi
# show directories still mounted on nfsroot
mount | grep " on $NFSROOT " || true
Expand Down
10 changes: 6 additions & 4 deletions bin/ftar
Expand Up @@ -5,7 +5,7 @@
# ftar -- extract tar files using FAI classes
#
# This script is part of FAI (Fully Automatic Installation)
# Copyright (C) 2001-2015 Thomas Lange, lange@informatik.uni-koeln.de
# Copyright (C) 2001-2016 Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
Expand Down Expand Up @@ -65,7 +65,7 @@ usage() {
cat <<EOF
ftar, extract tar files using classes.
Copyright (C) 2001-2015 by Thomas Lange
Copyright (C) 2001-2016 by Thomas Lange
Usage: ftar [OPTION] ... SOURCE
Expand All @@ -92,6 +92,10 @@ tardone=0
single=0
ignore=0

if [ -n "$classes" ]; then
[ -f $LOGDIR/FAI_CLASSES ] && classes=$(< $LOGDIR/FAI_CLASSES)
fi

while getopts 1hDdrvs:t:c:i opt ; do
case "$opt" in
d) deletefiles=1 ;;
Expand All @@ -118,9 +122,7 @@ else
xattrs=
fi

[ -f $ENV{LOGDIR}/FAI_CLASSES ] && classes=$(< $ENV{LOGDIR}/FAI_CLASSES)
# last class has highest priority

# reverse order of classes
for class in $classes; do
revclasses="$class $revclasses"
Expand Down
8 changes: 5 additions & 3 deletions bin/install_packages
Expand Up @@ -5,7 +5,7 @@
# install_packages -- read package config and install packages via apt-get
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2000-2015, Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2000-2016, Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2003-2004, Henning Glawe, glaweh@physik.fu-berlin.de
# (c) 2004 , Jonas Hoffmann, jhoffman@physik.fu-berlin.de
# PRELOAD feature from Thomas Gebhardt <gebhardt@hrz.uni-marburg.de>
Expand Down Expand Up @@ -79,6 +79,7 @@ our @commands = qw/y2i y2r zypper zypper-rm yast rpmr urpmi urpme yumgroup yumi
"clean-internal" => "apt-get clean",
"aptitude" => "aptitude -R $aptopt install",
"aptitude-r" => "aptitude -r $aptopt install",
"apt" => "apt $aptopt install",
"cupt" => "cupt -R $aptopt install",
"cupt-r" => "cupt $aptopt install",
"unpack" => "cd $downloaddir; aptitude download",
Expand Down Expand Up @@ -133,7 +134,7 @@ foreach (@classes) {
}

# check if any Debian related commands/types are used in package_config
my @debiantypes= qw/taskinst cupt cupt-r aptitude aptitude-r install remove dselect-upgrade smarti/;
my @debiantypes= qw/taskinst cupt cupt-r apt aptitude aptitude-r install remove dselect-upgrade smarti/;
foreach my $dt (@debiantypes) {
$types{$dt} and $hasdebian=1;
}
Expand Down Expand Up @@ -191,7 +192,7 @@ foreach $atype (@commands) {
next;
}

if ($atype eq "install" || $atype eq "smarti" || $atype eq "cupt"|| $atype eq "cupt-r"|| $atype eq "aptitude" || $atype eq "aptitude-r" || $atype eq "unpack" || $opt_l || $opt_L) {
if ($atype eq "install" || $atype eq "smarti" || $atype eq "cupt"|| $atype eq "cupt-r"|| $atype eq "apt" || $atype eq "aptitude" || $atype eq "aptitude-r" || $atype eq "unpack" || $opt_l || $opt_L) {

mkpackagelist(@{$list{$atype}}); # create lists of known and unknown packages
getsources(); # retrieve sources
Expand Down Expand Up @@ -522,6 +523,7 @@ $maxpl=9999;
%command = (
"install" => "apt-get $qopt -d $ENV{aptoptions} -y --fix-missing install",
"taskinst" => "aptitude -d $ENV{aptoptions} -y install $devnull",
"apt" => "apt -d $ENV{aptoptions} -y install $devnull",
"aptitude" => "aptitude -R -d $ENV{aptoptions} -y install $devnull",
"aptitude-r" => "aptitude -r -d $ENV{aptoptions} -y install $devnull",
"cupt" => "cupt -R --download-only $ENV{aptoptions} -y install $devnull",
Expand Down
1 change: 1 addition & 0 deletions bin/setup-storage
Expand Up @@ -116,6 +116,7 @@ if ($FAI::debug) {
print "disklist: ";
print "$_\n" foreach(@FAI::disks);
}
die "No disks defined in \$disklist\n" unless (@FAI::disks);

# the config source file
my $config_file = undef;
Expand Down
9 changes: 4 additions & 5 deletions conf/NFSROOT
Expand Up @@ -2,17 +2,17 @@

PACKAGES install

nfs-common fai-nfsroot module-init-tools ssh rdate lshw rpcbind
nfs-common fai-nfsroot ssh rdate lshw rpcbind
rsync lftp less dump reiserfsprogs e2fsprogs usbutils
hwinfo psmisc pciutils hdparm smartmontools parted mdadm lvm2
dnsutils ntpdate dosfstools xfsprogs xfsdump btrfs-tools
procinfo numactl dialog
console-common kbd
iproute2 netselect moreutils udev subversion
xz-utils
cupt
pxelinux syslinux-common # in jessie we need both
curl wget- libpsl0- libicu52-
curl wget- libpsl0-
libicu52- # jessie only
nmap
emacs24-nox

Expand All @@ -21,7 +21,7 @@ firmware-bnx2 firmware-bnx2x firmware-realtek
#firmware-linux-nonfree

# dracut replaces live-boot and initramfs-tools
dracut-network live-boot- initramfs-tools-
dracut-network dracut live-boot- initramfs-tools-
dracut-config-generic # this is not available in plain Debian jessie


Expand All @@ -30,7 +30,6 @@ dracut-config-generic # this is not available in plain Debian jessie

#git # git consumes a lot of disk space on the FAI CD

PACKAGES install DEBIAN_8
sysvinit-core systemd-sysv-

PACKAGES install I386
Expand Down
12 changes: 6 additions & 6 deletions conf/grub.cfg
Expand Up @@ -59,28 +59,28 @@ menuentry " Username/password to start the installation: fai/install " -
menuentry "" --unrestricted {
set gfxpayload=$resolution
}
menuentry "FAI client standalone installation - select installation type from menu " --users "fai" {
menuentry "Client standalone installation - select installation type from menu " --users "fai" {
set gfxpayload=$resolution
linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" FAI_ACTION=install FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp
linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" FAI_ACTION=install FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp quiet
initrd /boot/initrd.img
}


menuentry "FAI server installation - using external DHCP" --users "fai" {
set gfxpayload=$resolution
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=faiserver FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=faiserver FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp quiet
initrd /boot/initrd.img
}

menuentry "FAI server installation - using a fixed IP" {
set gfxpayload=$resolution
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.33.250::192.168.33.1:255.255.255.0:faiserver:eth0:off FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.33.250::192.168.33.1:255.255.255.0:faiserver:eth0:off FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD quiet
initrd /boot/initrd.img
}

menuentry "FAI rescue system, no installation" --unrestricted {
menuentry "Rescue system, no installation" --unrestricted {
set gfxpayload=$resolution
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD
linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo FAI_CONFIG_SRC=file:///var/lib/fai/config rd.live.image root=live:CDLABEL=FAI_CD quiet
initrd /boot/initrd.img
}

Expand Down
2 changes: 1 addition & 1 deletion conf/grub.cfg.autodiscover
Expand Up @@ -57,7 +57,7 @@ menuentry "" --unrestricted {

menuentry "Autodiscover the FAI server" {
set gfxpayload=$resolution
linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" fai.discover aufs root=/dev/nfs ip=dhcp quiet
linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" fai.discover aufs rootovl root=/dev/nfs ip=dhcp quiet
initrd /boot/initrd.img
}

Expand Down
33 changes: 33 additions & 0 deletions debian/changelog
@@ -1,3 +1,36 @@
fai (5.1) unstable; urgency=low

[ Thomas Lange ]
* add support for 4.x kernel using overlayfs and dracut >= 044+150-1
* dhcp-edit: fix regex
* NFSROOT: add dracut-core, remove cupt, module-init-tools
* fai-mount-disk: use glob instead of backtick
* fai-make-nfsroot: force some cp calls, adding aufs is not needed in
config
* fai-chboot: automatic test if aufs or overlayfs is needed
* grub.cfg.autodiscover: use aufs and rootovl
* add support for sftp, scp, https to get-config-dir
* install_packages: ad support for apt
* start sshd if flag is defined early
* ftar: syntax fix, do not use FAI_CLASSES if -c is used
* subroutines: remove unsuded code in task_faiend()
* get-boot-info: match new network device names, remove unneeded code
* add lvm support to CentOS 7, improve CentOS 6
* control: new package name in Suggests
* grub.cfg: add queit to cmdline

[ Andrew bezella ]
* instsoft.DEBIAN: fix regex
* do not change hostname during dirinstall, ignore md/lvm during
dirinstall
* write /etc/network/interfaces also on dirinstal
* DEBIAN.var: fix syntax error

[ remy.d1@gmail.com ]
* mk-basefile: add xenial support

-- Thomas Lange <lange@debian.org> Tue, 28 Jun 2016 10:31:25 +0200

fai (5.0.3) unstable; urgency=low

[ Thomas Lange ]
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -41,7 +41,7 @@ Package: fai-server
Architecture: all
Depends: fai-client, debootstrap, xz-utils, ${misc:Depends}
Recommends: nfs-kernel-server, isc-dhcp-server, tftpd-hpa | atftpd, openssh-server, openssh-client, openbsd-inetd | inet-superserver, libproc-daemon-perl
Suggests: debmirror, reprepro, xorriso, squashfs-tools, binutils, grub, aptitude, perl-tk
Suggests: debmirror, reprepro, xorriso, squashfs-tools, binutils, grub2, aptitude, perl-tk
Description: Fully Automatic Installation server package
FAI is a non-interactive system to install, customize and manage
Linux systems and software configurations on computers as well as
Expand Down
11 changes: 6 additions & 5 deletions doc/fai-guide.txt
Expand Up @@ -5,7 +5,7 @@
FAI Guide (Fully Automatic Installation)
========================================
Thomas Lange <lange@informatik.uni-koeln.de>
Sun, 22 Nov 2015
Sun, 23 Jun 2016
:Date: a date
:Revision: 5.0

Expand Down Expand Up @@ -2205,10 +2205,11 @@ name of your package to /etc/fai/NFSROOT. Then call

- Can I use a 4.X kernel?
+
Currently FAI has no support for a 4.x kernel, because aufs file
system support was replaced by overlayfs. But overlayfs is not
working when using NFS. FAI will switch to overlayfs if the NFS
problems are solved.
Yes. Have a look at
https://lists.uni-koeln.de/pipermail/linux-fai/2016-March/011283.html

FAI will switch to overlayfs in the near future, since the NFS
problems are now solved.

- How to use the nfsrooot as system for diskless clients?
+
Expand Down

0 comments on commit e41aee1

Please sign in to comment.