Skip to content

Commit

Permalink
remove live-boot support
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Mar 22, 2015
1 parent dd7ded4 commit 6e638da
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 82 deletions.
9 changes: 2 additions & 7 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-2014 Thomas Lange, lange@informatik.uni-koeln.de
# Copyright (C) 2003-2015 Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
Expand Down Expand Up @@ -460,12 +460,7 @@ if ($opt_i || $opt_s) {
if ($opt_i) {

my $bopt;
# check if we use live-boot or dracut inside the nfsroot
if ( -d "$nfsroot/live/filesystem.dir/boot" ) {
$bopt="boot=live";
} else {
$bopt="aufs";
}
$bopt="aufs";

# create config so host will boot the install kernel
$kernelname = "kernel ${opt_U}vmlinuz-$kernelsuffix";
Expand Down
32 changes: 7 additions & 25 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-2013 by Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2000-2015 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-2014 Thomas Lange
Copyright (C) 1999-2015 Thomas Lange
Usage: fai-make-nfsroot [OPTIONS]
Create an NFSROOT for FAI.
Expand All @@ -55,18 +55,14 @@ check_nfsroot() {

set +e
# simple test, to see if important thing are available inside the nfsroot
if [ ! -x $NFSROOT/usr/share/initramfs-tools/scripts/live -a ! $NFSROOT/usr/sbin/dracut ]; then
die 1 "Neither live-boot nor dracut was installed into the nfsroot."
fi

if [ -f $oldnfsroot/usr/share/initramfs-tools/scripts/live ]; then
echo "When using live-boot instead of dracut inside the nfsroot, please use fai-make-nfsroot -l." >&2
if [ ! -x $NFSROOT/usr/sbin/dracut ]; then
die 1 "dracut was not installed into the nfsroot."
fi

echo "FAI packages inside the nfsroot:"
$ROOTCMD dpkg-query -W -f='${Package;-18} ${Version}\n' fai-client fai-nfsroot fai-setup-storage 2>/dev/null
echo "FAI related packages inside the nfsroot:"
$ROOTCMD dpkg-query -W -f='${Package;-18} ${Version}\n' live-boot dracut-network dracut 2>/dev/null
$ROOTCMD dpkg-query -W -f='${Package;-18} ${Version}\n' dracut-network dracut 2>/dev/null

local files=$(ls $NFSROOT/boot/initrd* 2>/dev/null)
[ -z "$files" ] && die 1 "No initrd installed."
Expand All @@ -93,7 +89,6 @@ sshpreserve=0
adjust=0
generic=0
force=0
live=0 # default is to generate nfsroot for dracut

callname=${0##*/}
if [ $callname = make-fai-nfsroot ]; then
Expand All @@ -102,7 +97,7 @@ if [ $callname = make-fai-nfsroot ]; then
fi

# option e currently does nothing
while getopts aghervC:B:fkKlpU opt ; do
while getopts aghervC:B:fkKpU opt ; do
case "$opt" in
a) adjust=1 ;;
g) generic=1 ;;
Expand All @@ -114,7 +109,6 @@ while getopts aghervC:B:fkKlpU opt ; do
f) force=1 ;;
k) kinstall=1 ;;
K) kremove=1;;
l) live=1 ;;
h) usage ;;
e) expert=1 ;; # a dummy option, that only fai-setup uses
p) sshpreserve=1 ;;
Expand Down Expand Up @@ -157,15 +151,7 @@ cfdir=$(readlink -f $cfdir) # canonicalize path
[ -n "$FAI_BOOT" ] && die 1 "Variable \$FAI_BOOT is not supported any more. Will only set up TFTP environment."

oldnfsroot=$NFSROOT

if [ $live -eq 1 ]; then
# live-boot
deldir=$NFSROOT # save it before redefining, this will be deleted
NFSROOT="$NFSROOT/live/filesystem.dir"
else
# dracut
deldir=$NFSROOT
fi
deldir=$NFSROOT

ROOTCMD="chroot $NFSROOT"
export DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -398,10 +384,6 @@ EOF
[ "$verbose" ] && echo "Upgrading $NFSROOT"
LC_ALL=C call_verbose upgrade_nfsroot

# overwrite default live.conf
[ -f $cfdir/live.conf ] || die 1 "$cfdir/live.conf not found."
cp -Lp $cfdir/live.conf etc/live.conf

LC_ALL=C add_packages_nfsroot
copy_fai_files

Expand Down
5 changes: 1 addition & 4 deletions bin/fai-mirror
Expand Up @@ -5,7 +5,7 @@
# fai-mirror -- create and manage a partial mirror for FAI
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2004-2012, Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2004-2015, Thomas Lange, lange@informatik.uni-koeln.de
#
#*********************************************************************
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -213,9 +213,6 @@ cfdir=$(readlink -f $cfdir) # canonicalize path
. $cfdir/nfsroot.conf
: ${MNTPOINT:=/media/mirror} # default value

if [ -d $NFSROOT/live/filesystem.dir ]; then
NFSROOT=$NFSROOT/live/filesystem.dir
fi
export NFSROOT

[ -n "$packages" ] && die "WARNING: The use of \$packages in nfsroot.conf is now deprecated. Please include this information into $cfdir/NFSROOT."
Expand Down
9 changes: 2 additions & 7 deletions bin/fai-nfsroot2image
Expand Up @@ -5,7 +5,7 @@
# fai-nfsroot2image
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2011-2012 by Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2011-2015 by Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
Expand Down Expand Up @@ -68,12 +68,7 @@ done
shift $(($OPTIND - 1))
[ -z "$2" ] && usage

if [ -d $1/live/filesystem.dir ]; then
NFSROOT=$1/live/filesystem.dir
else
NFSROOT=$1
fi

NFSROOT=$1
isoname=$2

[ $base -eq 0 ] && excludeopt="$excludeopt -e var/tmp/base*" # also exclude base.tar.xz file
Expand Down
4 changes: 2 additions & 2 deletions bin/fai-setup
Expand Up @@ -5,7 +5,7 @@
# fai-setup -- set up FAI
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2000-2014 by Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2000-2015 by Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
Expand Down Expand Up @@ -34,7 +34,7 @@ cfdir=/etc/fai

options=$@ # all options are also passed to fai-make-nfsroot

while getopts pvC:efgkKlV:B: opt ; do
while getopts pvC:efgkKV:B: opt ; do
case "$opt" in
C) cfdir=$OPTARG ;;
v) verbose=1 ; v=-v ;;
Expand Down
5 changes: 1 addition & 4 deletions conf/NFSROOT
Expand Up @@ -18,12 +18,9 @@ pxelinux syslinux-common # in jessie we need both
firmware-bnx2 firmware-bnx2x firmware-realtek
#firmware-linux-nonfree

# dracut can replace live-boot
# dracut replaces live-boot and initramfs-tools
dracut-network live-boot- initramfs-tools-

# choose if you like live-boot or dracut inside the nfsroot
#live-boot live-boot-doc

# you should not edit the lines below
# architecture dependend list of packages that are installed

Expand Down
33 changes: 0 additions & 33 deletions conf/live.conf

This file was deleted.

0 comments on commit 6e638da

Please sign in to comment.