Swap space

Matthew Palmer mjp16 at ieee.uow.edu.au
Thu Jul 11 11:25:55 CEST 2002


I'm installing onto minimal hardware (read: old stuff) which is a bit
lacking in the RAM department.  Hence while installing packages, I get out
of memory errors and the whole install goes tits up.  I was surprised that
during the target mount swap space wasn't initialised, so I set out to do
it.  Oddly enough, it turns out to be a simple operation:

--- ../../sbin/mount2dir        Thu Jul 11 19:23:28 2002
+++ mount2dir   Thu Jul 11 19:17:56 2002
@@ -62,6 +62,12 @@
        *noauto*) continue ;;
     esac

+    if [ "$mountpoint" == "none" -a "$fstype" == "swap" ]; then
+       echo "Adding swap partition $device"
+       mkswap $device
+       swapon $device
+    fi
+
     [ "$mountpoint" == "none" ]  && continue

     case $device in

this is against FAI 2.3.1.  It's not written to the same spec as the
surrounding code, so it might want to be cleaned up a little before
integration, but I think it is a very serious contender for an added
feature.  Certainly *I* want it - there are going to be a lot of old
hardware installs happening for me in the future.


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer, Geek In Residence
http://ieee.uow.edu.au/~mjp16



More information about the linux-fai mailing list