Reply
Thread Tools
Posts: 27 | Thanked: 14 times | Joined on Nov 2011
#1
Is it possible to swap to rootfs file? i tryed

dd if=/dev/zero of=/usr/share/swap1.img bs=1024 count=40960
mkswap /usr/share/swap1.img
swapon /usr/share/swap1.img
and my phone restarted...

Any help
__________________
http://www.superlaptop.info

va ofera laptopuri ieftine din clasa business la cele mai mici preturi. Laptopurile business class sunt construite din componente de cea mai buna calitate garantand astfel o functionalitate de lunga durata.

Last edited by gostyuk; 2012-06-03 at 22:58.
 

The Following 2 Users Say Thank You to gostyuk For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#2
I don't know why it restarted but the priority of your new swap will be lower than the default swap and thus it will get used only when the 768 emmc swap fills. To enable it with higher priority you either need to use swapon from easydebian or
Code:
swapon /dev/swap1.img
swapoff /dev/mmcblk0p3; swapon /dev/mmcblk0p3
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#3
Originally Posted by gostyuk View Post
Is it possible to swap to rootfs file? i tryed



and my phone restarted...

Any help
you better keep as much as possible of "/" free
when the "/" aka root of a *nix system is filled, it simply stops, indeed.
__________________
information is a necessary though no sufficient condition to rationality...
 

The Following User Says Thank You to misterc For This Useful Post:
Posts: 27 | Thanked: 14 times | Joined on Nov 2011
#4
Originally Posted by qwazix View Post
I don't know why it restarted but the priority of your new swap will be lower than the default swap and thus it will get used only when the 768 emmc swap fills. To enable it with higher priority you either need to use swapon from easydebian or
Code:
swapon /dev/swap1.img
swapoff /dev/mmcblk0p3; swapon /dev/mmcblk0p3
did you try that on your n900? after i write

swapon /dev/swap1.img

it restarts my phone...
__________________
http://www.superlaptop.info

va ofera laptopuri ieftine din clasa business la cele mai mici preturi. Laptopurile business class sunt construite din componente de cea mai buna calitate garantand astfel o functionalitate de lunga durata.
 
Posts: 27 | Thanked: 14 times | Joined on Nov 2011
#5
Originally Posted by misterc View Post
you better keep as much as possible of "/" free
when the "/" aka root of a *nix system is filled, it simply stops, indeed.
i left 35 MB free from rootfs. anyway why is it restarting....
__________________
http://www.superlaptop.info

va ofera laptopuri ieftine din clasa business la cele mai mici preturi. Laptopurile business class sunt construite din componente de cea mai buna calitate garantand astfel o functionalitate de lunga durata.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#6
Originally Posted by gostyuk View Post
i left 35 MB free from rootfs. anyway why is it restarting....
Without any kind of log it is hard to say... Does it happen if you place that file in, lets say, MyDocs?? If so then it is something with enabling that image as swap, either not formatted so the phone crashes or it does not support from files (I imagine it would but, then again, I have never done this on an N900, 768MB swap enough )
 
Posts: 27 | Thanked: 14 times | Joined on Nov 2011
#7
mydocs is not rootfs... its emmc ... rootfs is formated not as ext3 ?! or ext2? can i format let say 50 MB as ext3? if yes then how ?
__________________
http://www.superlaptop.info

va ofera laptopuri ieftine din clasa business la cele mai mici preturi. Laptopurile business class sunt construite din componente de cea mai buna calitate garantand astfel o functionalitate de lunga durata.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#8
Originally Posted by gostyuk View Post
mydocs is not rootfs... its emmc ... rootfs is formated not as ext3 ?! or ext2? can i format let say 50 MB as ext3? if yes then how ?
First apply the following command on your file (as root):
Code:
mkswap ./swapfile1
That should setup the 'filesystem' if you will for swap once that is done if it still reboots try moving the file to MyDocs and activating swap from it. It is to rule out several possibilities i.e. high use of rootfs so it flips out, do not know, just to be sure if it still crashes from MyDocs then maybe file swap is not supported on maemo (for some random reason) and an expert should help you on that
 

The Following User Says Thank You to pablocrossa For This Useful Post:
Posts: 27 | Thanked: 14 times | Joined on Nov 2011
#9
i already have a swap on microsd... so it is supported. Mydocs isn't located on nvram(rootfs) chip.It would be pointless i already have 768 MB by default from emmc...



Anyone , is it possible to have let say 40MB of swap on rootfs,nvram chip?
__________________
http://www.superlaptop.info

va ofera laptopuri ieftine din clasa business la cele mai mici preturi. Laptopurile business class sunt construite din componente de cea mai buna calitate garantand astfel o functionalitate de lunga durata.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#10
Originally Posted by gostyuk View Post
i already have a swap on microsd... so it is supported. Mydocs isn't located on nvram(rootfs) chip.It would be pointless i already have 768 MB by default from emmc...



Anyone , is it possible to have let say 40MB of swap on rootfs,nvram chip?
I just wanted to test that to see if it restarted from MyDocs too. You say you have it from the microsd so it is clearly a problem with the rootfs, that is what I wanted to know by running it from MyDocs, I was not proposing to keep it on MyDocs but just do a test run to see if it would work from MyDocs and let us know it was a problem when running from rootfs. Did you run the command I posted before to 'format' the file? Good luck, if you have I cannot help you any further
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:03.