fai-mirror and $statefile

Ken Treis ken at miriamtech.com
Thu Apr 17 03:22:17 CEST 2014


Hi all,

I wasn't sure whether I should post this to linux-fai or linux-fai-devel... 

We're using FAI 3.4.7 for a Debian squeeze-based system, but I've hit a problem in fai-mirror. I haven't been able to try the latest code from github, but from a brief review of the source I think the problem would exist there too.

During debootstrap, we choose a non-standard syslog (sysklogd):

	FAI_DEBOOTSTRAP_OPTS="--exclude=info,rsyslog --include=sysklogd,klogd" 

This works fine, and the NFSROOT and base.tgz get built properly. But when fai-mirror runs, apt-get doesn't know that my base system has sysklogd installed, and it thinks my top-level package is not installable.

If APT knew about the packages I'd installed in the base, this wouldn't be an issue.

I've implemented a fix that works for me (based on 3.4.7) and published it here:

	https://github.com/ktreis/fai/tree/dpkg-status

The fix is pretty simple:

1. Saving a snapshot of /var/lib/dpkg/state after the base.tgz is created
2. Copying that snapshot into place in fai-mirror's initialize()
3. Using the --reinstall flag in fai-mirror's add_base_packages() to force a re-download

From my (admittedly newbie-ish) perspective, this seems to be the right thing to do. Any packages that are going to get installed via FAI are going to be installed on top of the base, and this way fai-mirror has a more accurate picture of what the base looks like.

Would there be any problems with this approach?

--
Ken Treis
Miriam Technologies, Inc.
(866) 652-2040 x221

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20140416/21311a5e/attachment.html>


More information about the linux-fai-devel mailing list