![]() |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
i do install nitdroid last time and i face the same problem with you ,since there was a reply tell us that we should try "/mmcblk1p2" instead of " mmcblk1p1" and it work!! |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
I have installed Nitdroid on my Micro-SD card, and Nitdroid has partitioned my Sd card and I have approx 2GB free. Can I use these 2GB as 'virtual ram'? Thanks |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Hey, I got an idea, I thought I'd get a second opinion before trying it through.
To work around Maemo 5's swapon's inability to mount swap files with a specific priority, what if we copy Debian's swapon tool to /usr/sbin/debswapon, and change genfstab.awk to use that instead? Seems like it should work. Edit: Did some experiments and the Debian swapon won't run on Maemo that easily. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
i just create startup script using this command :
Start on started hildon-desktop stop on starting shutdown console none service script sleep 60 swapon /dev/mmcblk1p2 end script and put it under /etc/init.d but still not working after reboot.... why??? |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
OK, here is another way to enable both swap partitions, this way the faster microSD partition has the higher priority - only using the internal swap when it becomes full.
I've only started messing around with this Linux stuff, so if I'm wrong your comments are welcome. However it really seemed to have worked for me, I had setup a solitary swap of about 350MB and started to get sporadic low memory warnings (but conky did not show any problems), especially when using firefox with a bunch of other apps opened at the same time. After doing this I cannot recreate the memory warnings no matter how hard I try:cool: Simply this: Code:
Code:
cat /proc/swaps |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
i've read from YDL that using memory card flash memory as virtual swap Ram will reduce the life of the flash chip by a lot. So I guess it can be done but not the most efficient way to do it.
YDL = Yellow dog linux. I was planned to use my memory card as SWAP on my PS3 back then. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
I know that this would not be implemented on the n900's SD, and so placing the swap there will affect the life of the card. However the amount of write cycles has increased massively from what was achievable on early devices where this was a real issue, and we must remember that the default swap on the n900 is also on flash, albeit internal flash. Actually that is an interesting point - by disabling the internal swap and moving it to the cheaply replaceable microSD, would you be extending the life of your N900? (This is effectively what I have done, as it only uses the internal swap when the external one is full) |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
I've tried elipsoid's method of setting the MicroSD's swap file priority higher than the internal flash and it definitely is faster. Also it's better to wear out a replaceable microSD than the non-replaceable internal flash storage.
You can also add those swapoff/swapon commands to a startup script, I've done it and it doesn't seem to affect boot time at all. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
I've personally not added my tuning and overclocking stuff to any startup script for fear of an endless reboot nightmare - that is just a personal thing, I know most people have no problems( I run a script from terminal -feels far more geeky:) )
Im not sure that these swapon / swapoffs would be fine at startup, as if the microSD is not functional it will return an error at the first step and preserve the onboard swap. The second step disables the onboard swap though; and I have no idea what would happen if the device has no swap available before it re-enables it in the third step. I do know that the swap is either not used or used very little at all directly after a reebot (hence no difference to startup times as there is very little to copy, takes lot longer if the device has been in use for a while) so it may not matter. I may have a look at my scrpits and have it check that the card is available before continuing, I'll post back here if I do. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Edit the file "/etc/event.d/rcS-late"
seeks the following: Code:
sfdisk -l /dev/mmcblk0 | /bin/busybox awk \ Code:
sfdisk -l /dev/mmcblk1 | /bin/busybox awk \ Code:
fstab=/etc/fstab Now copy the file genfstab.awk: Code:
cp /usr/lib/genfstab.awk / usr/lib/lib/genfstab2.awk Code:
#!/usr/bin/awk Now you can restart, each time you start to check that the microSD has a swap partition and if so will mount. I'm seeing a more elegant and does not need extra partition or cards. The manipulation of system files can leave the N900 unusable. I take responsibility for the results. I really worked. |
All times are GMT. The time now is 15:54. |
vBulletin® Version 3.8.8