Martin Herweg wrote:
> Hi !
>
> I'm still a bit confused , maybe because I'm not familiar
> with devfs.
>
> I load the kernel-modules
>
> modprobe ide-disk
> modprobe ide-probe-mod
> modprobe ide-mod
>
>
> then hdparm, mkswap, swapon still fails because
>
> /dev/hda /dev/hda1 /dev/hda2
>
> don#t exist.
> so I made a classic
>
> mknod /dev/hda b 3 0
>
> then, when I use /dev/hda e.g. with
>
> hdparm -S 180 /dev/hda
>
> I see a message
> "Partition check:
> /dev/ide/host0/bus0/target0/lun0: p1 p2
>
> and 2 links were created:
>
> /dev/hda1 -> /dev/ide/host0/bus0/target0/lun0/part1
> /dev/hda2 -> /dev/ide/host0/bus0/target0/lun0/part2
>
> why now ? why not earlier ?
>
> mkswap /dev/hda1
>
> works now, but
>
> swapon /dev/hda1
>
> still gives me an error:
> Don't know how to swap to this kind of file
> swapon: /dev/hda1: Invalid argument
>
> Are IDE swap-partitions disabled in the Kernel ?
>
> greetings & thanks,
> Martin Herweg
>
>
Here is a script I use to swap onto a local hard disk
(/opt/ltsp/i386/etc/rc.d/hd_swap) for LTSP3.0
It is invoked with
RCFILE_01 = hd_swap
in lts.conf
Basically, it probes in the devices and tests for an existing linux swap
partition and swaps onto it. Otherwise it creates a file on a DOS partition and
swaps on that. If there is no disk it does nothing. It can be used on all
workstations. It assumes that linux swap partitions have been mkswap(ed).
You must copy fdisk into /opt/ltsp/i386/sbin from your main distribution though.
It is not normally distributed as part of LTSP.
#!/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
>
>
> _____________________________________________________________________
> 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.openprojects.net
>
_____________________________________________________________________
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.openprojects.net