fun with FAI and Debian sid
Holger Schurig
hs4233 at mail.mn-solutions.de
Tue Aug 16 15:12:19 CEST 2005
Hi all!
I had the plan to install systems via FAI with Debian SID and run into a
couple of problems.
One was because of the abysmal debootstrap, which is completely broken for
"sid". People on #fai helped me and these are the steps I needed to let it
run smoothly:
debootstrap Devices
-------------------
Get debootstrap from Debian stable, extract (e.g. via "mc")
the /usr/lib/debootstrap/devices.tar.gz. Replace the devices.tar.gz from
sid's debootstrap with this one. Otherwise you will only have about 80
devices in $NFSROOT/dev and FAI could not even open tty2, tty3 and tty4.
debootstrap Dependencies
------------------------
Then you need lots of options in your /etc/fai/make-fai-nfsroot.conf to help
the braindead dependencies of debootstrap. I use
FAI_DEBOOTSTRAP_OPTS="--exclude=pcmcia-cs,ppp,pppconfig,pppoe,
pppoeconf,dhcp-client,exim4,exim4-base,exim4-config,
exim4-daemon-light,mailx,at,fdutils,info,modconf,libident,
logrotate,exim,man-db --include=libstdc++6,gcc-4.0-base,
libsigc++-1.2-5c2,libgdbm3,gettext-base,netkit-inetd,
aptitude,libssl0.9.7,libstdc++5,libdb4.2,libopencdk8,
laptop-detect,dmidecode,gcc-3.3-base,groff-base"
(all in one long line). The line was created incrementally, maybe there's room
to optimize it. What was weird is that I had to --exclude man-db, otherwise
it made an error, saying it groff-base was missing. But chroot'ing into
$NFSROOT and a 'dpkg -l "groff*"' revealed that groff-base was there ...
As I said, debootstrap is an abyssmal tool.
Local apt mirror
----------------
I have a local mirror which I create with reprepro. That's all fine, but the
new apt in debootstrap wants to check GnuPG signatures and barks if the
signatures are wrong.
So I changed /usr/sbin/make-fai-bootstrap:
create_base() {
if [ "$FAI_DEBOOTSTRAP" ]; then
call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP
$ROOTCMD apt-get clean
+ mkdir -p $NFSROOT/etc/apt/apt.conf.d
+ echo 'APT::Get::AllowUnauthenticated "true";' \
+ >$NFSROOT/etc/apt/apt.conf.d/fai-unauthori
rm -f $NFSROOT/etc/resolv.conf
echo "Creating base.tgz"
tar -l -C $NFSROOT -cf - --exclude var/tmp/base.tgz . | \
gzip > $NFSROOT/var/tmp/base.tgz
else
die "\$FAI_DEBOOTSTRAP not defined."
fi
}
Otherwise, you'd have to use '-y --force-yes' all over the way to get your
unsigned (mirrored or local) *.debs installed.
BTW: make-fai-nfsroot has a little quirk: tar should not use -l but
--one-file-system. tar from Debian "sid" spits out a warning if you use -l.
More information about the linux-fai
mailing list