Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: swapfile on ext2, a quick how to< Next Oldest | Next Newest >
stunix*com Offline





Group: Members
Posts: 64
Joined: July 2006
Posted: Aug. 01 2008,19:04 QUOTE

trying to use up all the old equipment left in the garage i find myself in the position where i have a frugal dsl running on a motherboard with 128mb ram and hda1 is a 1gb ide drive which is fine till i start running lots of things and run out of memory and freeze.  however because the frugal is ext2 and the mkswapfile only works with dos filesystem i find myself having to do it the old way.  this must be a common scenario??

Code Sample

#as root
#to create a 130mb file
dd if=/dev/zero of=/mnt/hda1/knoppix.swp bs=1024 count=132207

#protect it from everyone but root
chmod 600 /mnt/hda1/knoppix.swp

# format the file to be used as swap
mkswap /mnt/hda1/knoppix.swp

# add swap file it to the usable ram
swapon /mnt/hda1/knoppix.swp



use "free" to check it.

dsl should detect it at boot, if not there is a cheat code to scan for it.

happy daze!
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: Aug. 01 2008,22:39 QUOTE

Quote
this must be a common scenario??

Not really, except maybe for those who don't read documentation which advises setting up a swap when you designate partitions for DSL:
ftp://ftp.oss.cc.gatech.edu/pub....wto.pdf
http://www.damnsmalllinux.org/f/topic-3-26-8732-0.html
http://damnsmalllinux.org/wiki/index.php/Installing_to_the_Hard_Disk
Etc.


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
stunix*com Offline





Group: Members
Posts: 64
Joined: July 2006
Posted: Aug. 01 2008,23:15 QUOTE

take it or leave it!
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Aug. 02 2008,08:36 QUOTE

Let's take it, it's a good hint if you can't set up a swap partition for some reason.

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: Aug. 02 2008,10:33 QUOTE

Like for example, as creating a temporary swap file on a computer you arn't supposed to (or don't want to) repartition (And for whatever reason, there is no accessible dos swap file.
Back to top
Profile PM 
7 replies since Aug. 01 2008,19:04 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: swapfile on ext2

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code