FAI 3.2.15+ Error make-fai-nfsroot on amd64 only ?

Fortier,Vincent [Montreal] Vincent.Fortier1 at EC.GC.CA
Mon May 4 17:57:17 CEST 2009


First of all, I've backported 3.2.x series of FAI to etch (without too much effort actually) so that LVM could work properly with etch.

I've been trying to understand what my error was with debootstrap on etch that happends only on amd64 architecture (i386 runs smoothly).

While digging I've found out that there where some changes in the make-fai-nfsroot script.  The change that create my error is this one:
@@ -243,7 +243,21 @@ call_debootstrap() {
     local dversion=$(dpkg -l debootstrap | awk '/debootstrap/ {print $3}')
     echo "Creating base system using debootstrap version $dversion"
     echo "Calling debootstrap $1 $NFSROOT $2"
- yes '' | LC_ALL=C call_verbose debootstrap $FAI_DEBOOTSTRAP_OPTS $1 $NFSROOT $2
+ LC_ALL=C call_verbose debootstrap $FAI_DEBOOTSTRAP_OPTS $1 $NFSROOT $2
+ if [ $? -ne 0 ]; then
+ echo "ERROR: debootstrap did not complete successfully."
+ echo "This is mostly caused by a broken mirror."
+ echo "Please check your mirror or use an official mirror."
+ [ "$verbose" ] || echo "Call make-fai-nfsroot -v for better debugging."
+ exit 10
+ fi
+
+ if [ ! -f $NFSROOT/usr/bin/apt-get ]; then
+ echo "No apt-get executable available inside the NFSROOT."
+ echo "Maybe debootstrap did not finish successfully. Aborting."
+ [ "$verbose" ] || echo "Call make-fai-nfsroot -v for better debugging."
+ exit 11
+ fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 add_all_host_entries() {



Here in detail what is being called:
LC_ALL=C call_verbose debootstrap --exclude=dhcp-client,info etch /data/fai/nfsroot/QC/amd64/live/filesystem.dir http://etch.apt.mydomain/debian/base/amd64


Here is the execution in 64-bit:
[root at kayak /root]# LC_ALL=C debootstrap --verbose --exclude=dhcp-client,info etch /data/fai/nfsroot/QC/amd64/live/filesystem.dir http://etch.apt.mydomain/debian/base/amd64
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://etch.apt.wul.qc.ec.gc.ca/debian/base/amd64...
I: Validating adduser
I: Validating apt
I: Validating apt-utils
I: Validating aptitude
I: Validating base-files
.....
I: Configuring klogd...
I: Configuring tasksel-data...
I: Configuring sysklogd...
I: Configuring tasksel...
I: Base system installed successfully.
[root at kayak /root]# echo $?
1

The execution ends with an error message of "1" although it states "I: Base system installed successfully."

---------------

Now here is the same execution on 32-bit:
LC_ALL=C call_verbose debootstrap --exclude=dhcp-client,info etch /data/fai/nfsroot/QC/i386/live/filesystem.dir http://etch.apt.mydomain/debian/base/i386

Voici l'exécution:
[root at turbulence:~]# debootstrap --verbose --exclude=dhcp-client,info etch /data/fai/nfsroot/QC/i386/live/filesystem.dir http://etch.apt.mydomain/debian/base/i386
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://etch.apt.wul.qc.ec.gc.ca/debian/base/i386...
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
I: Retrieving apt-utils
I: Validating apt-utils
I: Retrieving aptitude
I: Validating aptitude
I: Retrieving base-files
I: Validating base-files
....
I: Configuring klogd...
I: Configuring tasksel-data...
I: Configuring sysklogd...
I: Configuring tasksel...
I: Base system installed successfully.
[root at turbulence:~]# echo $?
0
[root at turbulence:~]#

This time everything is running smoothly ... 


So I've simply reverted back to the previous state:
247     yes '' | LC_ALL=C call_verbose debootstrap $FAI_DEBOOTSTRAP_OPTS $1 $NFSROOT $2
248 #    if [ $? -ne 0 ]; then
249 #       echo "ERROR: debootstrap did not complete successfully."
250 #       echo "This is mostly caused by a broken mirror."
251 #       echo "Please check your mirror or use an official mirror."
252 #       [ "$verbose" ] || echo "Call make-fai-nfsroot -v for better debugging."
253 #       exit 10
254 #    fi

And it now works properly.

Could a "fix" be made so that it works on both lenny & etch?

- vin



More information about the linux-fai mailing list