How could I ever get by without a swapfile?


Bosbeetle

Terminally lost
Joined
Sep 7, 2008
Messages
4,291
Age
43
Location
The Netherlands
Website
Visit site
Something I question myself about even if I only used a swapfile on the pandora for 3 days. It helps getting rid of those 'crashes' of firefox and battle for wesnoth and its so easy to implement.


Just for the not so linux savvy people, try it you wont be dissapointed.


And for you 512MB ram pandora people
bupatih.gif
 
I always wondered why a swapfile is not enabled by default in Zaxxon.


---EDIT:


I meant in the SD rootfs.
 
Last edited by a moderator:
Well... I *only* enable swap on a 1Gb dedicated SD card when I need it... Do you really want to shorten the life of a good higher capacity SD with all those writes?


I personally would love a rebirth Pandora as I wouldn't have to keep changing the SD in my right slot and then rebooting (for some reason my swap SD refuses to mount from within the swapfiles app without a reboot).


Sent from my HTC Sensation Z710e using Tapatalk
 
I've already suggested yesterday if an comfortable GUI option for enabling swap could be impemented in the Firmware OS for people without much terminal experience. :) Yes, especialy for Firefox or browsers in general and Games like Wesnoth. I never tried a swap file because of safety reasons, I really don#t want to harm my only Pandora SD card I have with all Data on it.
 
Well... I *only* enable swap on a 1Gb dedicated SD card when I need it... Do you really want to shorten the life of a good higher capacity SD with all those writes?


I personally would love a rebirth Pandora as I wouldn't have to keep changing the SD in my right slot and then rebooting (for some reason my swap SD refuses to mount from within the swapfiles app without a reboot).


Sent from my HTC Sensation Z710e using Tapatalk

Pasting the output from pndout would help with finding out why it requires a reboot.
 
Well... I *only* enable swap on a 1Gb dedicated SD card when I need it... Do you really want to shorten the life of a good higher capacity SD with all those writes?


I personally would love a rebirth Pandora as I wouldn't have to keep changing the SD in my right slot and then rebooting (for some reason my swap SD refuses to mount from within the swapfiles app without a reboot).


Sent from my HTC Sensation Z710e using Tapatalk

Pasting the output from pndout would help with finding out why it requires a reboot.

Where do you find the pndout, been looking for those!

How would you enable such a thing?

btw I did this.. http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ works like a charm.
 
Pasting the output from pndout would help with finding out why it requires a reboot.


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


PND : /media/32GB/pandora/menu/swaptools.pnd


PND_FSTYPE : Squashfs


APPDATADIR : /media/32GB/pandora/appdata/swaptools


APPDD_FSTYPE : vfat


PND_CPUSPEED : <unset>


EXENAME : ./swapsel


ARGUMENTS : <unset>


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


[ START ]--- Mount the PND ----------


Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/swaptools"


Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/32GB/pandora/appdata/swaptools=rw+nolwh":"/mnt/pnd/swaptools=rr" none "/mnt/utmp/swaptools"


[sUCCESS]--- Mount the PND ----------


[ START ]--- Starting the application (./swapsel ) ----------


The error I get is:


Could not mount 1GB SWAP


Failed to execute child process "gnome-mount" (No such file or directory)


This is if I insert 1GB SWAP after using another SD Card in the right slot, then running swaptools and selecting the 'activate swapfile' option... I click on the 1GB SWAP in the folder tree on the left and get the error message.


I don't see any info in the pndout explaining why it does this. I copy / pasted that info immeadiately after receiving the error message.
 
Last edited by a moderator:
the thing is: a script to create and swap on/off a swapfile/zram should be included in the os. the user should then decide, if he wants to use it. when i bought my 16GB sd-cards, they were really pricy. Last week i saw them for 10 €. So, yeah, i'd definatly use them for swapping :P
 
Last edited by a moderator:
It looks like a zram swap will be either enabled by default or easy to configure in the future, a startup daemon setting the zram size was committed to the openpandora git today.
 
I've found a workaround for the error.


Within swaptools and clicking 'activate swapfile' I looked at the folder tree with both my SD cards listed. I popped out the 1GB SWAP and put it back in. Sure enough, it now refused to show in the folder tree. So instead I clicked on 'file system' then 'media' and what do you know? There it was - 1GB SWAP. I was able to select the swapfile on that card and bob's your uncle. No more rebooting required. :)
 
So you won the right to be the first African OP owner on the OP map ;^)


http://boards.openpa...php?/membermap/

Um. Kinda random, but I guess so... :)


I'll try figure out how to use that thing tomorrow... (or should I say today.. just past 12)


Night all. ;)


EDIT: Though I don't regard myself as an African... I'm a Caucasian - born and raised in South Africa but longing for cooler greener climes such as the English countryside - which my genes tell me is my true home. My father comes from England just btw.
 
Last edited by a moderator:
ref: http://boards.openpandora.org/index.php?/topic/7576-turn-on-my-swap-partition/#entry135100


Special credit to MrRob on this one.


I boot from my SD card in the left slot (0) and have a 2GB /swap partition as mmcblk0p2. Once the partition is defined, it's relatively easy.


In /etc/init.d/bootmisc.sh I added one line to just before the end of it. Last two lines now look like:


swapon /dev/mmcblk0p2


: exit


My swap starts at boot, system shuts down fine. Verified using the top command. You could probably do a similar thing booting from NAND, though I'm not sure what would happen if you try to turn on a swap file that isn't there (in case the card is pulled or a different one present).


Gak - copy/paste formatting hell.
 
Last edited by a moderator:
Back
Top