[26124] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25405 - in trunk/debathena/scripts/installer/pxe: natty/debathena stage1/debathena

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Sep 23 11:04:01 2011

Date: Fri, 23 Sep 2011 11:03:55 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201109231503.p8NF3tkW018106@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-09-23 11:03:54 -0400 (Fri, 23 Sep 2011)
New Revision: 25405

Modified:
   trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh
   trunk/debathena/scripts/installer/pxe/stage1/debathena/installer.sh
Log:
* Rename debathena/ to da/ and shortern other kernel args to save 
  precious bytes
* Re-add support for manual partitioning for geofft
* Some cleanup


Modified: trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh
===================================================================
--- trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh	2011-09-22 16:37:31 UTC (rev 25404)
+++ trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh	2011-09-23 15:03:54 UTC (rev 25405)
@@ -19,21 +19,21 @@
 # new options:
 #   debathena/pxetype: could be cluster, but could be other things
 
-# Don't support this anymore.  
-# Except yes, we do, for old auto-upgrade
-clusterforce=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/clusterforce | sed -e 's/.*=//'`
+# support for clusteraddr should be removed sometime in Spring 2012
+# Be sure to remove the conditional around line 115 too.
 clusteraddr=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/clusteraddr | sed -e 's/.*=//'`
-pxetype=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/pxetype | sed -e 's/.*=//'`
-installertype=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/i= | sed -e 's/.*=//'`
-mirrorsite=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/m= | sed -e 's/.*=//'`
+pxetype=`sed -e 's/ /\n/g' < /proc/cmdline | grep da/pxe= | sed -e 's/.*=//'`
+if [ -z "$pxetype" ]; then
+    # Fallback to old-style option for very old machines that haven't
+    # updated.  This conditional should be removed sometime in Spring 2012
+    pxetype=`sed -e 's/ /\n/g' < /proc/cmdline | grep debathena/pxetype | sed -e 's/.*=//'`
+fi
+installertype=`sed -e 's/ /\n/g' < /proc/cmdline | grep da/i= | sed -e 's/.*=//'`
+mirrorsite=`sed -e 's/ /\n/g' < /proc/cmdline | grep da/m= | sed -e 's/.*=//'`
+partitioning=`sed -e 's/ /\n/g' < /proc/cmdline | grep da/part= | sed -e 's/.*=//'`
 nodhcp=`sed -e 's/ /\n/g' < /proc/cmdline | grep netcfg/disable_dhcp= | sed -e 's/.*=//'`
 
 
-if [ "$clusterforce" = "yes" ]; then
-  [ "$pxetype" != "cluster" ] && echo "WARNING: Replacing pxetype '$pxetype' with 'cluster' because clusterforce=yes"
-  pxetype=cluster
-fi
-
 echo "Picked up values from command line: 
 clusteraddr=$clusteraddr
 pxetype=$pxetype
@@ -46,7 +46,7 @@
 
 # Sanity check
 if [ -z "$pxetype" ]; then 
-  echo "ERROR: No clusterforce=yes and no pxetype on the command line."
+  echo "ERROR: No pxetype on the command line."
   echo "Cannot proceed.  Reboot now, please."
   read dummy
 fi
@@ -157,7 +157,7 @@
 fi
 
 if [ cluster = "$pxetype" ]; then
-  if [ notreally != "$destroys" ]; then
+  if [ "$partitioning" != "manual" ]; then
     cat << EOF
 ************************************************************
                ${ddb}DESTROYS${nnn}

Modified: trunk/debathena/scripts/installer/pxe/stage1/debathena/installer.sh
===================================================================
--- trunk/debathena/scripts/installer/pxe/stage1/debathena/installer.sh	2011-09-22 16:37:31 UTC (rev 25404)
+++ trunk/debathena/scripts/installer/pxe/stage1/debathena/installer.sh	2011-09-23 15:03:54 UTC (rev 25405)
@@ -140,6 +140,7 @@
 mirrorsite="mirrors.mit.edu"
 installertype="production"
 distro="natty"
+partitioning="auto"
 arch="i386"
 # That is a space and a tab
 if egrep -q '^flags[ 	].* lm( |$)' /proc/cpuinfo;  then 
@@ -163,7 +164,8 @@
 
 while [ -z "$pxetype" ] ; do
   echo
-  echo "Will install ${ccc}$distro${nnn} ($arch) using $installertype installer and $mirrorsite"
+  echo "Will install ${ccc}$distro${nnn} ($arch) using $installertype installer"
+  echo "from $mirrorsite using $partitioning partitioning"
   echo
   echo "Choose one:"
   echo
@@ -185,28 +187,13 @@
   echo "    b: Toggle between beta and production installer. "
   echo "    d: Change the distro (version)."
   echo "    a: Change architecture."
+  echo "    p: Toggle between manual and auto partitioning. "
   echo
   echo -n "Choose: "
   read r
   case "$r" in
     1)
       echo "Debathena CLUSTER it is."; pxetype=cluster ;;
-    1b)
-      echo "Your princess is in another castle."
-      ;;
-      # echo "Debathena CLUSTER it is."; pxetype=cluster
-      # echo "...but you get to partition by hand. Your hard disk"
-      # echo "will not be automatically reformatted."; destroys=notreally
-      # echo
-      # echo "The default cluster installer sets up:"
-      # echo " - a 200MB ext3 /boot partition"
-      # echo " - an LVM volume group named 'athena', containing"
-      # echo "   - a (3x system RAM)-sized swap LV (at least 512 MB)"
-      # echo "   - a root LV taking up half the remaining space (at least 10 GB)"
-      # echo
-      # echo "You probably want to set up something similar."
-      # echo "Press enter to continue."
-      # read r;;
     2)
       echo "Normal Debathena install it is."; pxetype=choose ;;
     3)
@@ -235,6 +222,27 @@
         installertype="production"
       fi
       ;;
+    p|P)
+      if [ "$partitioning" = "auto" ]; then
+        echo "Switching to manual partitioning."
+	echo "Your disk will (probably) not be erased."
+        partitioning="manual"
+	echo "Normally, cluster machines get:"
+	echo " - a 200MB ext3 /boot partition"
+	echo " - an LVM volume group named 'athena', containing"
+	echo "   - a (3x system RAM)-sized swap LV (at least 512 MB)"
+	echo "   - a root LV taking up half the remaining space (at least 10 GB)"
+	echo
+	echo "You probably want to set up something similar."
+	echo
+	echo "Backups are ALWAYS a good idea.  Stop and make one now."
+	echo "Press Enter to continue."
+	read dummy
+      else
+        echo "Switching to auto partitioning."
+        partitioning="auto"
+      fi
+      ;;
     a|A)
       echo
       oldarch="$arch"
@@ -252,8 +260,8 @@
 done
 
 debug "*** Main menu complete"
-debug "Mirror: $mirrorsite Type $installertype "
-debug "Arch $arch Distro $distro Pxetype $pxetype"
+debug "Mirror: $mirrorsite Type: $installertype Part: $partitioning"
+debug "Arch: $arch Distro: $distro Pxetype: $pxetype"
 debug "eth0:"
 debug "$(ip address show eth0)"
 debug "routing:"
@@ -298,7 +306,7 @@
   netconfig
 fi
 
-if [ "$pxetype" = "cluster" ]; then
+if [ "$pxetype" = "cluster" ] && [ "$partitioning" = "auto" ]; then
     cat << EOF
 ************************************************************
                ${ddb}DESTROYS${nnn}
@@ -355,7 +363,9 @@
 esac
 
 
-# SIGH
+# SIGH  See LP #818933
+# This is fixed in Oneiric's kernel, but the PXE server is still serving
+# natty (and will continue to do so until we have hardware that fails)
 acpi=""
 if [ "$(cat /sys/class/dmi/id/product_name)" = "OptiPlex 790" ]; then
     acpi="reboot=pci"
@@ -363,8 +373,8 @@
 
 kargs="$knetinfo $kbdcode $acpi locale=en_US interface=auto \
 url=http://18.9.60.73/installer/$distro/debathena.preseed \
-debathena/pxetype=$pxetype debathena/clusteraddr=$IPADDR \
-debathena/i=$installertype debathena/m=$mirrorsite --"
+da/pxe=$pxetype da/i=$installertype da/m=$mirrorsite \
+da/part=$partitioning --"
 
 echo "Continuing in five seconds..."
 if [ "$test" = "test" ]; then


home help back first fref pref prev next nref lref last post