test
[hcoop/zz_old/ikiwiki] / AfsFedoraClientConfiguration.mdwn
diff --git a/AfsFedoraClientConfiguration.mdwn b/AfsFedoraClientConfiguration.mdwn
new file mode 100755 (executable)
index 0000000..0e8e62c
--- /dev/null
@@ -0,0 +1,57 @@
+= AFS Fedora Client Configuration =\r
+\r
+This describes how to get an AFS client at home working with a HCoop AFS cell on a Fedora workstation.\r
+\r
+= Basic Steps =\r
+\r
+ * Download the [http://www.openafs.org/release/latest.html openafs source RPM for your version of Fedora].  This will have a filename like openafs-1.4.4-fc6.2.src.rpm.\r
+ * Build this on your machine with an rpmbuild command like the following: sudo rpmbuild --rebuild --target=i686 openafs-1.4.4-fc6.2.src.rpm (you will need to have the kernel-headers package installed for this to work.\r
+ * If the build completed successfully, you should see some lines that say "Wrote: " towards the end of the output.  Use an rpm command like "rpm -ivh packagename" to install this rpm on your system.  ''Note: should you install a new kernel, you'll have to repeat this part of the process!''\r
+ * Install openafs-1.4.4-fc6.2.i386.rpm, openafs-client-1.4.4-fc6.2.i386.rpm, and openafs-krb5-1.4.4-fc6.2.i386.rpm, or the newest stable packages for your platform.\r
+\r
+ * Change the home cell in {{{/usr/vice/etc/ThisCell}}} to hcoop.net.\r
+ * Start the openafs client with {{{sudo /etc/init.d/openafs-client start}}}\r
+ * Run kinit and type your password\r
+ * Make sure that afsd is running.\r
+ * Run "klist" just to make sure that you have a valid token.\r
+ * Run aklog - if this works you should be able to see /afs/hcoop.net.\r
+\r
+== Rebuilding openafs for new kernels ==\r
+\r
+You will have to rebuild the source RPM every time your kernel is updated.  If you followed the steps above, the source rpm should have been installed in /usr/src/redhat/SRPMS/.  Use the rpmbuild command above to build this.  This resulting RPM file will be put in an appropriate directory under /usr/src/redhat/RPMS if the build is successful.  It will contain the name of the running kernel.  Install this RPM, and when you run /etc/init.d/openafs-client start the daemon should start properly.\r
+\r
+If you're lazy you may want to script the process of creating a new openafs module each time you install a new kernel.  Here is a script that works no my Fedora 7 system.  It rebuilds the source RPM, installs it, and starts the openafs daemon.  It hasn't been well tested and I wrote it very quickly, so feel free to make it more robust if you want to:\r
+\r
+{{{\r
+#!/bin/bash\r
+\r
+# Re-builds the openafs modules for the currently running kernel.\r
+# Should work on Fedora systems.\r
+# This has not been broadly tested, written Tue Jun  5 11:30:35 EDT 2007\r
+# by Justin S. Leitgeb [leitgebj AT hcoop -- NOSPAM -- net].\r
+\r
+OPENAFS_SRPM="/usr/src/redhat/SRPMS/openafs-1.4.4-fc6.2.src.rpm"\r
+\r
+if [ -a  $OPENAFS_SRPM ] ; then\r
+    echo SRPM $OPENAFS_SRPM exists, starting rebuild. ;\r
+    rpmbuild --rebuild --target=i686 $OPENAFS_SRPM\r
+    \r
+    # Figure out what the filename should be for the new RPM based on\r
+    # running kernel version, then install it.\r
+    kernel_name_for_afs=`uname -r | sed 's/-/_/'`\r
+\r
+    # Not a pretty command but it worked for me... we'll see if it does in the future.\r
+    new_afs_rpm=`find /usr/src/redhat/RPMS/ -type f | grep openafs | grep $kernel_name_for_afs | grep kernel | head -1`\r
+    \r
+    rpm -ivh $new_afs_rpm\r
+\r
+    echo Re-starting openafs client...\r
+    /etc/init.d/openafs-client start\r
+fi\r
+}}}\r
+\r
+== Troubleshooting ==\r
+\r
+If you get an error like "aklog: unable to obtain tokens for cell hcoop.net (status: 11862790)" it may mean that your router is blocking SRV requests.  If you're running djbdns locally (used by lots of operating systems for embedded devices, such as OpenWrt), make sure that the line {{{filterwin2k}}} is commented out in /etc/dnsmasq.conf, or whatever the config file is on your machine.\r
+\r
+Read TroubleshootingKerberos for more.\r