![]() |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Thanks Whitewolf that looks alot safer. What do you get for the swap priorities when you cat /proc/swaps ?
As I am personally going to stick to running a script manually after a reboot, and following Whitewolfs lead using sfdisk, I have added the lines below to my tuning script to ensure the uSD swap is available before making any changes. Code:
testmicro="/dev/mmcblk1p2" I have tested this by running with no SD card, and it works; if mmcblk1p2 is not present it will make no swap changes. I'd like to be able to get this added to the wiki page, as the current instructions only sets up the faster swap as secondary- and it will never get used considering the huge default primary swap. As I've said I'm kinda new to all this so I wouldn't dream of doing so unless somebody with some experience had a look at the above code and gave me some feedback. Does it look safe enough to add to the wiki? |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Cat /proc/swaps
/dev/mmcblk0p3 Priorit=-1 /dev/mmcblk1p3 Priorit=-2 |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
I like but I see a limitation because you say what the swap.
I watch as it automatically adapt to the example that I put myself and not depend on the human well. How to place her at the start to run? |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Here's a startup script I made (goes in /etc/events.d/) based on elipsoid's script to check for the microSD swap file before changing the swap configuration. I broke some of the commands into two lines because depending on how you partitioned your MicroSD, you might get un-suppressable warning messages from sfdisk that would mess up the process.
Code:
start on started hildon-desktop |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
With the code as you wrote it I do not ever ride swap the SD.
I would remove the following line: Code:
testmicro = "/ dev/mmcblk1p2" Code:
swapmicro = $ (echo "$ drivelist"-n | grep / dev/mmcblk1p2 | awk '/ mmcblk1p2 / {print $ 1}') Code:
drivelist = $ (sfdisk -ln /dev/mmcblk1 | grep swap) Then modify the following lines ... Code:
if [ "$ testmicro" == "$ swapmicro" ]; then Code:
if [ $ swapmicro ]; then |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
My script worked fine but I'm going to incorporate your improvements into my earlier post (with one little change to deal with sfdisk's warning messages)
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
I look forward to this script! Good idea.
.. If I can help, I will love it. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Good stuff guys, this is looking very polished and robust - certanly a smarter way of doing things and nice and compact.
Gameboy, the -q switch for sfdisk surpresses warning messages, I've just tried it and it works. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
I tested with the amendment proposed and returns nothing if there are error messages by sfdisk.
I confirm that the "-q" sfdisk output prevents error messages. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
|
All times are GMT. The time now is 19:37. |
vBulletin® Version 3.8.8