Author Topic: Why can\'t I create a swapfile  (Read 3198 times)

CoreyC

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
    • http://
Why can\'t I create a swapfile
« on: June 06, 2004, 10:44:30 pm »
I\'m having a problem using a swapfile on my 5600... I swear I have done this a hundred times before.  The memory applet will not even create the swapfile for me.

# dd if=/dev/zero of=/home/root/swapfile bs=1024 count=8192
8192+0 records in
8192+0 records out
# mkswap -v1 /home/root/swapfile
Setting up swapspace version 1, size = 8384512 bytes
# /sbin/swapon /home/root/swapfile
swapon: swapon: Invalid argument

I am using a fresh install of zynergy.  I was running tkcrom before and was having the same problem (this was the reason I switched roms, thinking it was tkcrom\'s fault)

here is what mount shows:

# mount
/dev/root on / type jffs2 (ro)
/proc on /proc type proc (rw)
/dev/ram1 on /dev type minix (rw)
/dev/mtdblock3 on /home type jffs2 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw)

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Why can\'t I create a swapfile
« Reply #1 on: June 07, 2004, 03:18:30 am »
You cannot create a swapfile on a JFFS2 partition.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

CoreyC

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
    • http://
Why can\'t I create a swapfile
« Reply #2 on: June 07, 2004, 06:17:15 am »
Thanks tumnus... any idea how I can fix that?  Can I format /dev/mtdblock3 without seriously messing something up?

doc

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://
Why can\'t I create a swapfile
« Reply #3 on: June 07, 2004, 07:20:23 am »
Another question on this topic.  Is it a good idea to create swap on SD or CF?  Isn\'t it slower to write to than RAM?  Couldn\'t you have problems with the swap not being properly unmounted if your SD or CF card is ejected?

Any philosophy on this subject?
By your command...

Doc
Sharp SL-5500 PDA
Sharp 2.78 ROM
Viking 256MB SD
Socket LP-E CF Ethernet

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Why can\'t I create a swapfile
« Reply #4 on: June 07, 2004, 07:27:33 am »
As far as I know there are no MTD filesystems that support swapfiles. Its not a good idea to put a swap file on flash memory that you cannot swap out like a SD/CF card anyway and there may be some other technical reason why this is so, since flash memory is not at all like RAM.

The worst you could do by having a swapfile on a SD/CF card is either lock up your Zaurus (forgetting to turn the swap file off) or frying your SD/CF card, but at least there\'s no permanent damage to your Zaurus. Generally speaking though, a SD/CF should last quite a while (months or much more) if it has a swap file on it. It all depends on how much you end up using the swap file of course.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender