Author Topic: How Do I Create A Swapfile On An C1000 With An Sd?  (Read 2411 times)

omro

  • Hero Member
  • *****
  • Posts: 796
    • View Profile
    • http://
How Do I Create A Swapfile On An C1000 With An Sd?
« on: July 23, 2005, 12:41:42 pm »
Hi all,

Am trying to get the debian pocket workstation installed on my c1000.
I've a 1gb SD card which I've currently formatted as ext2

I'm trying to work out how to put the debian swapfile there. Any hints?

Thanks!
Zaurus C-1000

omro

  • Hero Member
  • *****
  • Posts: 796
    • View Profile
    • http://
How Do I Create A Swapfile On An C1000 With An Sd?
« Reply #1 on: July 23, 2005, 12:55:42 pm »
I tried this:

Code: [Select]
# su
# dd if=/dev/zero of=/mnt/card/swapfile bs=1048576 count=128
# mkswap /mnt/card/swapfile
# swapon /mnt/card/swapfile

And it created me a 128 mb file called swapfile, am hoping that's right  
Zaurus C-1000

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
How Do I Create A Swapfile On An C1000 With An Sd?
« Reply #2 on: July 23, 2005, 01:31:55 pm »
What you did is correct. If you issue the command "free" from the shell prompt it will report your memory usage, including swap and you can check whether it's working.

Felipe
SL 5000 D  and C860 Sharp ROM
Too many accessories...

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
How Do I Create A Swapfile On An C1000 With An Sd?
« Reply #3 on: July 23, 2005, 03:14:10 pm »
or....

# cat /proc/swaps

itll tell you the status of your swapfile(s)


hey amazing I am learning, I didn't even have to look that one up:)
« Last Edit: July 23, 2005, 03:14:37 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

osguru

  • Newbie
  • *
  • Posts: 7
    • View Profile
How Do I Create A Swapfile On An C1000 With An Sd?
« Reply #4 on: July 29, 2005, 12:25:06 pm »
Hi!

I have a question regarding the swapfile. I installed PocketWorkstation on my C1000 and it created a 64MB swapfile, formatted it and initialised it using "swapon". It is working fine, "free" shows me the 64MB swap I have and something around 12MB of it or so gets used.

But, here's the question: how do I turn the swapfile off? "swapoff /mnt/card/swapfile" or "swapoff -a" doesn't seem to work, "free" still shows the swap. Trying to "umount" the SD card the swapfile is on (obviously without turning it off) seems to take forever, then the Zaurus crashes. After a reboot, swap is off ("free" shows 0 for swap) until I turn it on again.

Is this normal? With the swapfile being activated (and maybe being accessed), I can't umount or remove the SD card as this causes the Zaurus to hang. And it could wear out the card, couldn't it? So, does anyone have an idea how to turn the swap off (the best would be to turn it off after quitting PocketWorkstation)? I'm lost since "swapoff" doesn't work.

osguru
[span style=\'font-size:8pt;line-height:100%\']Sharp Zaurus SL-C1000 // 1GB SanDisk SD (vfat) // 1GB IBM Microdrive (vfat) // NE2000 CF LAN card // D-Link DCF-660W CF WLAN card // Hama USB host cable // stock Sharp ROM // X/Qt + Debian + OpenOffice + Mozilla[/span]