Package: fai Version: 2.8.4 Severity: minor Tags: patch *** Please type your report below this line ***
I was trying to install an nfsroot for sid. Only after applying the following patch I succeeded. I do hope that I didn't missed something during my trial and error process. I guess that lines for unstable should be present on apt-get preferences file as well. I also added some printings of debuging information to help diagnose problems, and comments to make-fai-nfsroot configuration file. --- /usr/sbin/make-fai-nfsroot.orig 2006-01-03 20:22:15.000000000 +0200 +++ /usr/sbin//make-fai-nfsroot 2006-01-06 22:24:18.000000000 +0200 @@ -125,6 +125,21 @@ trap "umount_dirs" EXIT trap "bad_exit" ERR # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +which_distribution() { + + suite=$1; dist=$1 + # Why which_distribution() required? + # apt, and preferences in particular, prefers the string unstable rather + # then the string sid because unstable is more common in RELEASE + # files. debootstrap, on the other hand, does not recognize the + # suite unstable. It is recognized by debootstrap only as sid. + case "$1" in + "sid" ) dist=unstable;; + "unstable") suite=sid;; + * ) ;; # There should be no problem with the other names. + esac +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bad_exit() { merror="with errors" @@ -225,6 +240,10 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - call_debootstrap() { + set - $suite $2 + # See the definition of which_distribution() if you have questions + # about this line. Note that it is actually required only + # if [ "$1" != "$suite" ]. echo "Creating nfsroot for $1 using debootstrap" [ "$verbose" ] && echo "Calling debootstrap $1 $NFSROOT $2" yes '' | LC_ALL=C call_verbose debootstrap $FAI_DEBOOTSTRAP_OPTS $1 $NFSROOT $2 || true @@ -282,8 +301,6 @@ [ -f $cfdir/preferences ] && cp -v $cfdir/preferences $NFSROOT/etc/apt echo "Upgrading $NFSROOT" LC_ALL=C call_verbose call_with_stamp upgrade_nfsroot - echo "Adding additional packages to $NFSROOT:" - echo "$packages" LC_ALL=C call_verbose call_with_stamp add_packages_nfsroot call_with_stamp copy_fai_files @@ -346,8 +363,8 @@ cp -p $v /etc/resolv.conf $NFSROOT/etc/resolv.conf-installserver cp -p $v /etc/resolv.conf $NFSROOT/etc/resolv.conf # this is needed during make-fai-nfsroot $ROOTCMD apt-get update - $ROOTCMD apt-get -fyu install - $ROOTCMD apt-get check + $ROOTCMD apt-get -t $dist -fyu install + $ROOTCMD apt-get -t $dist check rm -rf $NFSROOT/etc/apm mount -t proc /proc $NFSROOT/proc @@ -355,14 +372,26 @@ fdivert /etc/init.d/rcS /sbin/start-stop-daemon /sbin/discover-modprobe cp /sbin/fai-start-stop-daemon $NFSROOT/sbin/ ln -s /sbin/fai-start-stop-daemon $NFSROOT/sbin/start-stop-daemon - $ROOTCMD apt-get -y dist-upgrade + $ROOTCMD apt-get -t $dist -y dist-upgrade } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - add_packages_nfsroot() { - $ROOTCMD apt-get -y --fix-missing install $packages </dev/null + echo "Adding additional packages to $NFSROOT:" + echo "\$packages: $packages" + if [ "$verbose" -a "$dist" == "unstable" ]; then + # unstable is more likely to have breakages: + echo "A simulation to help track problems:" + $ROOTCMD apt-get -t $dist -Vsy --fix-missing install $packages </dev/null + echo "This is the real thing:" + fi + $ROOTCMD apt-get -t $dist -y --fix-missing install $packages </dev/null if [ -n "$NFSROOT_PACKAGES" ] ; then - LC_ALL=C $ROOTCMD apt-get -y --fix-missing install $NFSROOT_PACKAGES </dev/null + echo "\$NFSROOT_PACKAGES: $NFSROOT_PACKAGES" + if [ "$verbose" -a "$dist" == "unstable" ]; then + # unstable is more likely to have breakages: + echo "A simulation to help track problems:" + LC_ALL=C $ROOTCMD apt-get -t $dist -Vsy --fix-missing install $NFSROOT_PACKAGES </dev/null + echo "This is the real thing:" + fi + LC_ALL=C $ROOTCMD apt-get -t $dist -y --fix-missing install $NFSROOT_PACKAGES </dev/null fi $ROOTCMD apt-get clean } @@ -489,6 +521,8 @@ find $NFSROOT -xdev -maxdepth 1 ! -type d | xargs -r rm -f fi +which_distribution $FAI_DEBOOTSTRAP + # Create a new nfsroot if [ ! -x "`which debootstrap`" ]; then die "Can't find debootstrap command. Aborting." --- /etc/fai/make-fai-nfsroot.conf.orig 2006-01-06 22:34:50.000000000 +0200 +++ /etc/fai/make-fai-nfsroot.conf 2006-01-06 22:41:16.000000000 +0200 @@ -8,8 +8,10 @@ FAI_DEBOOTSTRAP="sarge http://$mirrorhost/debian" #FAI_DEBOOTSTRAP="sarge file:/files/scratch/debian" -# your extra packages which will be installed into the nfsroot, space separated -NFSROOT_PACKAGES="cfengine expect" +# your extra packages which will be installed into the nfsroot, space +# separated. Note that you can add options for apt-get at the +# beginning. +NFSROOT_PACKAGES="-V cfengine expect" # this local repository holds your local packages that can be installed to # the install clients. Don't forget to create the index file Packages.gz! @@ -40,9 +42,10 @@ nfssize="250MB" # size of the nfsroot. Only informational purpose -# FAI needs these packages that are install into the nfsroot -packages="module-init-tools dhcp3-client ssh file rdate hwinfo portmap -bootpc rsync wget rsh-client less dump reiserfsprogs usbutils +# FAI needs these packages that are install into the nfsroot. +# Note that you can add options for apt-get at the beginning. +packages="-V module-init-tools dhcp3-client ssh file rdate hwinfo +portmap bootpc rsync wget rsh-client less dump reiserfsprogs usbutils hdparm smartmontools parted mdadm lvm2 dnsutils ntpdate dosfstools cvs jove xfsprogs xfsdump sysutils dialog discover mdetect libnet-perl netcat libapt-pkg-perl" -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (600, 'testing'), (50, 'unstable') Architecture: i386 (i586) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.11-1.pentium1.1 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages fai depends on: ii libapt-pkg-perl 0.1.18+b1 Perl interface to libapt-pkg ii perl 5.8.7-9 Larry Wall's Practical Extraction Versions of packages fai recommends: ii debootstrap 0.3.3 Bootstrap a basic Debian system ii dhcp3-server 3.0.3-5 DHCP server for automatic IP addre hi fai-kernels 1.10.1 special kernels for FAI (Fully Aut ii nfs-kernel-server [nfs-server 1:1.0.7-3 Kernel NFS server support pn rsh-server <none> (no description available) ii syslinux 3.11-3 Bootloader for Linux/i386 using MS ii tftpd-hpa [tftpd] 0.40-4.1 HPA's tftp server ii wget 1.10.2-1 retrieves files from the web -- debconf information excluded -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]