using resolvconf for nfsroot

martin f krafft madduck at madduck.net
Wed Feb 23 12:14:52 CET 2005


Hello, FAI-world!

I have integrated resolvconf into the FAI nfsroot. This takes care
of the /tmp/resolv.conf issue because resolvconf maintains the
resolv.conf file in shared memory (/dev/shm/resolvconf).

The attached patch works in my tests. Please confirm. Note that it
is Linux-specific and might actually break SunOS. Thus, someone with
a SunOS FAI cluster should help me out to port this.

(The patch is against the source package, so Thomas can just apply
it easily; if you want to change files on disk:

  apt-get install patchutils
  filterdiff -i \*/share/subroutines fai_2.6.6.1.diff | patch /usr/share/fai/subroutines
  filterdiff -i \*/scripts/make-fai-nfsroot fai_2.6.6.1.diff | patch /usr/sbin/make-fai-nfsroot
  filterdiff -i \*/conf/make-fai-nfsroot.conf fai_2.6.6.1.diff | patch /etc/fai/make-fai-nfsroot
  make-fai-nfsroot

then try it.)

thanks for your feedback.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus at madduck.net
 
windoze nt crashed.
i am the blue screen of death.
no one hears your screams.
-------------- next part --------------
diff -Nru /tmp/cAWkn5cJly/fai-2.6.6/THANKS /tmp/6jY7xvBvYm/fai-2.6.6.1/THANKS
--- /tmp/cAWkn5cJly/fai-2.6.6/THANKS	2004-07-23 12:09:14.000000000 +0200
+++ /tmp/6jY7xvBvYm/fai-2.6.6.1/THANKS	2005-02-23 11:42:59.000000000 +0100
@@ -39,3 +39,4 @@
 Chad Walstrom		chad at debian.org
 Niall Young		niall at chime.net.au
 Alexander Zangerl	az at bond.edu.au
+martin f. krafft	madduck at debian.org
diff -Nru /tmp/cAWkn5cJly/fai-2.6.6/conf/make-fai-nfsroot.conf /tmp/6jY7xvBvYm/fai-2.6.6.1/conf/make-fai-nfsroot.conf
--- /tmp/cAWkn5cJly/fai-2.6.6/conf/make-fai-nfsroot.conf	2005-01-07 05:40:42.000000000 +0100
+++ /tmp/6jY7xvBvYm/fai-2.6.6.1/conf/make-fai-nfsroot.conf	2005-02-23 11:34:59.000000000 +0100
@@ -43,6 +43,6 @@
 # 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
-ext2resize hdparm smartmontools parted raidtools2 lvm2
+ext2resize hdparm smartmontools parted raidtools2 lvm2 resolvconf
 dnsutils ntpdate dosfstools cfengine cvs jove xfsprogs xfsdump
 sysutils dialog discover mdetect libnet-perl netcat libapt-pkg-perl"
diff -Nru /tmp/cAWkn5cJly/fai-2.6.6/debian/changelog /tmp/6jY7xvBvYm/fai-2.6.6.1/debian/changelog
--- /tmp/cAWkn5cJly/fai-2.6.6/debian/changelog	2005-01-21 04:24:27.000000000 +0100
+++ /tmp/6jY7xvBvYm/fai-2.6.6.1/debian/changelog	2005-02-23 11:42:30.000000000 +0100
@@ -1,3 +1,10 @@
+fai (2.6.6.1) unstable; urgency=low
+
+  * Ported FAI to use resolvconf on install client for management of
+    /etc/resolv.conf.
+
+ -- martin f. krafft <madduck at debian.org>  Wed, 23 Feb 2005 11:42:08 +0100
+
 fai (2.6.6) unstable; urgency=medium
 
   * 06hwdetect.source: add comment, add class NVIDIA which is not currently
diff -Nru /tmp/cAWkn5cJly/fai-2.6.6/scripts/make-fai-nfsroot /tmp/6jY7xvBvYm/fai-2.6.6.1/scripts/make-fai-nfsroot
--- /tmp/cAWkn5cJly/fai-2.6.6/scripts/make-fai-nfsroot	2005-01-13 13:44:04.000000000 +0100
+++ /tmp/6jY7xvBvYm/fai-2.6.6.1/scripts/make-fai-nfsroot	2005-02-23 11:34:38.000000000 +0100
@@ -235,9 +235,8 @@
     if [ "$FAI_DEBOOTSTRAP" ]; then
         call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP
         $ROOTCMD apt-get clean
-	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
+        tar -l -C $NFSROOT -cf - --exclude var/tmp/base.tgz --exclude dev/shm/\* . | gzip > $NFSROOT/var/tmp/base.tgz
     else
 	die "\$FAI_DEBOOTSTRAP not defined."
     fi
@@ -299,7 +298,6 @@
     ln -sf /tmp/var/state/discover var/state/discover
     ln -sf /tmp/var/lib/discover var/lib/discover
     ln -s /tmp/etc/syslogsocket dev/log
-    ln -sf /tmp/etc/resolv.conf etc/resolv.conf
     ln -sf /tmp etc/sysconfig
     ln -s ../../sbin/rcS_fai etc/init.d/rcS
     ln -sf /dev/null etc/network/ifstate
diff -Nru /tmp/cAWkn5cJly/fai-2.6.6/share/subroutines /tmp/6jY7xvBvYm/fai-2.6.6.1/share/subroutines
--- /tmp/cAWkn5cJly/fai-2.6.6/share/subroutines	2005-01-21 04:28:53.000000000 +0100
+++ /tmp/6jY7xvBvYm/fai-2.6.6.1/share/subroutines	2005-02-23 11:33:05.000000000 +0100
@@ -319,6 +319,8 @@
 	swapon $sd && [ "$verbose" ] && echo "Enable swap device $sd"
     done
     mount2dir $FAI_ROOT $LOGDIR/$fstab
+    mkdir -p $FAI_ROOT/dev/shm
+    mount -t tmpfs none $FAI_ROOT/dev/shm
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_configure() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20050223/800f15ee/attachment.bin 


More information about the linux-fai mailing list