BTW you must place a copy of fdisk in /opt/ltsp/i386/bin
#!/bin/sh
##################################################
# Probe in the modules
modprobe ide-mod
modprobe ide-probe-mod
modprobe ide-disk
########### Mount any swap available ############
if [ -d /dev/ide/hd ]
then
SWAP=`fdisk -l /dev/ide/hd/c?b?t?u? | grep swap | tail -n 1 | cut -d' ' -f 1` 2>/dev/null
if [ ! "$SWAP" = "" ]
then # A linux swap disk is available
modprobe blkdev_swap
echo "Swapping onto $SWAP"
swapon $SWAP
else # try to create a swapfile on an MSDOS fs
SWAP=`fdisk -l /dev/ide/hd/c?b?t?u? | grep FAT | tail -n 1 | cut -d' ' -f 1`
2>/dev/null
if [ ! "$SWAP" = "" ]
then # got a DOS fs
modprobe blkdev_swap
if [ ! -d /mnt/dos ]
then
mkdir /mnt/dos
fi
mount -t msdos $SWAP /mnt/dos
if [ ! -f /mnt/dos/LNX_SWAP ]
then
echo "Creating a swap file on the DOS partition"
#dd if=/dev/zero of=/mnt/dos/LNX_SWAP bs=1024 count=32768
/sbin/prep_swap -s 32m -f /mnt/dos/LNX_SWAP
if [ $? -eq 0 ]
then
echo "Successfully built swapfile"
fi
fi
if [ -f /mnt/dos/LNX_SWAP ]
then
mkswap -v1 /mnt/dos/LNX_SWAP
swapon /mnt/dos/LNX_SWAP
fi
fi
fi
fi
Murali Potla wrote:
Where can i get the script ?
how to use local hard disk swap ?
On Thu, 2003-02-13 at 01:48, Gerhard Damerau wrote:
Hello
Anywhere on the ltsp-site I found a script to use local hard disk drive for
swapping.
RCFILE_01 = hd_swap
We have rather old PentiumI-Machines with 64 MB als clients. I tested local
hd swapping, and it seems to work fine.
We use fat applications like Star Office and Mozilla.
My question: Is this a solution to avoid NFS-swapping over the network? Or
is it only useful for local applications?
Thanks in advance
Gerhard Damerau
------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net
