[BL] Swap file etc

Sheldon Isaac SheldonIsaac at MyRealBox.com
Sun Jan 15 14:20:00 EST 2006


Swap file etc problem

Hi, may I ask for help with this?  I have BL 3.40 installed to /dev/hda8, 
and after monkeying with Damn Small Linux 2.0, wondered about using "the 
same" file or something for swap with the two Linuxes and Windows 98.

It turned out that if there's already a file on /dev/hdb5, I can't seem to 
do the   dd if=/dev/zero    stuff to it more than once, because soon am 
told there's no room on the partition, despite my having said    rm -fr  *  
 
And the file   swapfile   shows up as zero bytes.

So in "desperation", I reformatted it, like below. That allows the  dd  to 
work, but there's a puzzling thing:  how can there be a swap file if it's 
not mounted?

Is there by any chance a   "mkdosfs"  I could use?

All comments and advice are welcomed.

Thanks,
Sheldon

==============

(from df)
Filesystem                Size      	Used 			Available 	Use% 	Mounted on
/dev/hda8      98.7M    69.0M     	24.6M  	74% 	/
/dev/hda1      900.3M   465.9M    	434.4M  	52% 	/hd/cee
 

(from free)
             total         used         free       shared      buffers
  Mem:       258176        81344       176832          620        70392
 Swap:        61432            0        61432
Total:       319608        81344       238264

(I think this is /proc/swaps)
Filename			Type		Size		Used		Priority
/mnt/swapfile   file		61432		0			-1

(part of /etc/rc)
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
cd /
mke2fs /dev/hdb5
mount /dev/hdb5 /mnt/
rm -fr /mnt/*
swpf=/mnt/swapfile
dd if=/dev/zero of="$swpf" bs=1M count=60
mkswap -v1 "$swpf"
sync
swapon "$swpf" 2>/dev/null
##
e2fsck -pf /dev/hda8 2>/dev/null 

REMAINDER SNIPPED






More information about the BasLinux mailing list