PDA

View Full Version : Swapfile



mrgee
03-06-10, 15:12
Hi,

Does anyone know how to create a swapfile on the OpenPli image ?

Thanks

Sicilian
03-06-10, 15:16
Where do you want to create it? USB or HDD?
Why do you want to create swapfile?
Its not really needed with the amount of ram the Duo has, but if you want to go ahead i'll post the info. Will need a bit of work via telnet though.

pooface
03-06-10, 15:24
As Sic says, shouldn't be needed, but if you really want one, then this should do it (worked fine on my 800, but haven't done the manual commands on vu+ yet...). This code creates it on /media/usb/, change as required. Also, as Sic says, will need to be done in telnet...



dd if=/dev/zero of=/media/usb/swapfile bs=1024 count=131072 <- , change that to the location you want it. Also, it creates a 128mb swap file
mkswap /media/usb/swapfile
swapon /media/usb/swapfile


To make the swap load on startup, issue the following:



vi /etc/fstab


Then, add the following line towards the end:



/media/usb/swapfile swap swap defaults 0 0


To save the file, type



:x -> Press enter


To check that the swap is working, and to see how much swap is used, issue the command:



free


Hope this helps...

mrgee
03-06-10, 18:41
I was lloking at the memory usage and thought there wasn't much left. After reading about how linux organises memory I saw you were boht right, you dont need a swapfile. Cheers for the reply anyway