View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#12
Originally Posted by Hurrian View Post

A better solution would be to replace swapon -a with the 'swapmicro' script posted somewhere here on TMO, which detects swap partitions on the microsd, and if it is available, uses that and doesnt bother with emmc. Otherwise, if there's no swap on microsd, it simply runs swapon -a.

I'll post my edits to rcS-late when I get back home.
It's very good idea - I will gladly use it myself, sounds like best bullet-proof solution for this.

@peterleinchen
As I've written, way of doing ti via /etc/event.d/ script isn't bad at all, but it got one drawback - boot time is considerably slower, as Maemo need to enable eMMC swap first, then, via Your script, enable microSd swap, and disable eMMC swap. As - at this point - some thing are already swapped (most likely, You run event.d scripts after starting hildon-desktop), they need to be moved from eMMC swpa to microSD swap.

As for using microSD swap together with eMMC swap, I don't recommend it, even with higher priority for microSD swap - it's still "in use", which creates (less, but still), I/O rade with things from optFS. Also, I'm quite sure, that using loopback file for swap is considerably slower than native swap - as it's with ED loopback image or native partition.

@BertvanDorp
5 minutes guide to using swap on microSD:

1. Reformat microSD card to contain linux type swap partition, by any tool You prefer (linuxbox/linux LiveCD via GUI tools, or on-device via command line, or on-device via Easy Debian with GUI tools, or...).

For this example, we assume You got 2 partitions on microSd card - first one is regular vfat, and 2nd one is linuxswap.

2. Use any method mentione din this thread to make device into using swap on /dev/mmcblk1p2 (you can edit /etc/event.d/rcS-late as suggested by me, or prepare script put into /etc/event.d folder, or wait for Hurrian to post his script and mix it with my way, or...).

You're done.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post: