maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   95.1MB free space in RootFs (https://talk.maemo.org/showthread.php?t=46027)

stevet68 2010-02-27 11:33

95.1MB free space in RootFs
 
sorry for creating another Rootfs free space thread, but thought this would be helpfull for a lot of people and easier to find if at the start of a new thread!

It's true, 95.1MB free in Rootfs;
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 128.3M 95.1M 57% /

However, I have now installed loads of apps, including many from Development and am now down to 92.8MB!

~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 130.6M 92.8M 58% /

So how did I get there?
First I was robbed, had my 3 month old N900 stolen! Had to buy a new one urgently, so had a brand new N900 to start with.

Being aware of the Rootfs problems I decided to optimise it before installing any apps.

The brand new N900 had 83.3MB free
~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 140.0M 83.3M 63% /


After updating to firmware 51 I was down to 72MB with no apps installed.
~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 151.2M 72.1M 68% /


Next I moved var/cache/apt but forgot to copy the df -h results!

Then I decided to use a script to move some foldes and symlink them. The script i used was created by Tom Tanner (thanks Tom)
and is available with instructions here;
http://wiki.maemo.org/User:Tanner#Safely_free_some_space_on_rootfs



Running the script gave me these results;

/home/user/MyDocs # sh Optify.sh
Optify.sh: line 1: #!/bin/sh: not found
5952 usr/share/icons
8932 usr/share/nokia-maps
14720 usr/share/themes
3968 usr/share/fonts
10548 usr/share/locale
16960 usr/lib/locale
3232 var/lib/apt
0 var/cache/apt
64312 total
moving /usr/share/icons
moving /usr/share/nokia-maps
moving /usr/share/themes
moving /usr/share/fonts
moving /usr/share/locale
moving /usr/lib/locale
moving /var/lib/apt


At this point I had achieved my maximum free Rootfs of 95.1MB;

/home/user/MyDocs # df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 128.3M 95.1M 57% /

Since this I have installed all my preferred apps, including a lot of "Risky Development Apps" and I still have 82.5MB free.
/home/user/MyDocs # df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 140.8M 82.5M 63% /

At this point I had installed Fennec and something was causing a problem with my internet connection so I restarted the phone which freed up some memory again!

I now have almost every useful app installed today and still have 92.8MB free!
~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 130.6M 92.8M 58% /

I have been using the phone for 3 days since running Tom's script and it has been 100% stable.

Thought I'd post this to let people know that There is a safe script to take away the problems around Rootfs without risk as far as I can see!

Thanks again Tom, I will still check Rootfs before and after installing apps, but am not worried about it anymore!

Hope this gives some people confidence to safely free Rootfs space.

Also thought it was about time I posted something to the forum having used info from here so heavily since getting my N900.

Cheers

Steve

MohammadAG 2010-02-27 11:37

Re: 95.1MB free space in RootFs
 
I know you already said sorry, but was another thread really necessary? If something's not safe it won't be in the wiki

maxximuscool 2010-02-27 11:38

Re: 95.1MB free space in RootFs
 
hmm i think this will break your device in the next update.

MohammadAG 2010-02-27 11:45

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by maxximuscool (Post 548722)
hmm i think this will break your device in the next update.

Worst case scenario is that he needs to flash the device to update.

No it won't break your device.

stevet68 2010-02-27 12:00

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by MohammadAG (Post 548721)
I know you already said sorry, but was another thread really necessary? If something's not safe it won't be in the wiki

Sorry Mohammad, I don't often have time to post on forums and apologise if I should have posted in a different thread.

I should havde stated I did find Tom's script from the Wiki here;
http://wiki.maemo.org/Free_up_rootfs_space

"Alternative script to safely free space on rootfs

This script shows you much space will be freed and automatically detects whether some directories have already been moved."


Maxximus, thanks for the opinion, but I am confident in what I have done and understand how symlinks work. I suspect I may have to run the script again after a firmware upgrade but I am happy with that.

If I had to flash the firmware, I can also cope with that!

yanness 2010-03-05 19:43

Re: 95.1MB free space in RootFs
 
Hey stevet68,

do you know what happen if you run the script just after reflashing your N900. Is it gonna keep the original rootfs memory without get it full?

yanness

scuddy 2010-03-07 02:03

Re: 95.1MB free space in RootFs
 
cant seem to get the script to run, I typed it exactly as u put it in the wiki but doesnt seem to do anything, my rootfs is at 91%. anybody help?

rsegerda@sina.com 2010-03-07 07:39

Re: 95.1MB free space in RootFs
 
it will absolutely break ur n900 'cause it's not safe and

stevet68 2010-03-07 09:03

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by yanness (Post 557223)
Hey stevet68,

do you know what happen if you run the script just after reflashing your N900. Is it gonna keep the original rootfs memory without get it full?

yanness

Hi Yanness,

All this doe is free up space by moving files out of RootFS and setting up links to the folders. It is still technically possible to fill it again if you install lots of unoptified software, However I have now been running another week and still have 88MB free in RootFS even after installing lots of apps.

Steve

stevet68 2010-03-07 09:06

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by scuddy (Post 558357)
cant seem to get the script to run, I typed it exactly as u put it in the wiki but doesnt seem to do anything, my rootfs is at 91%. anybody help?

Hi Scuddy,

I just followed my links and realised you may be using the wrong script?

In my previous link I mentioned the WIKI, where I found it, but Tom's script is actually on his user page:

Try going here and following Tom's instructions:

http://wiki.maemo.org/User:Tanner#Sa...pace_on_rootfs

Hope this helps for you, working great for me!

Steve

stevet68 2010-03-07 09:09

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by rsegerda@sina.com (Post 558481)
it will absolutely break ur n900 'cause it's not safe and

I agree with you that if people do not know what they are doing and move folders out of RootFS they can break their N900 and force a reflash to be needed.

This is why I recommend using a tested and proven script, created by someone who knows what he is doing.

If you check the script and understand which folders have been redirected you should be comfortable wiuth what is being done.

Regards

Steve

YoDude 2010-03-07 10:23

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by stevet68 (Post 558532)
I agree with you that if people do not know what they are doing and move folders out of RootFS they can break their N900 and force a reflash to be needed.

This is why I recommend using a tested and proven script, created by someone who knows what he is doing.

If you check the script and understand which folders have been redirected you should be comfortable wiuth what is being done.

Regards

Steve

Why the obsession with Rootfs free space?

In your original post you state...

Quote:

Originally Posted by You
Being aware of the Rootfs problems I decided to optimise it before installing any apps.

What problems? Where do you come by this information? When the N900 was first released (actually when the first units were loaned to bloggers and whatnot) there was a warning posted to the effect that many of the apps that were then in the developer repo were carried directly over from "Diablo" and were not "optified".

This had nothing to do with any "problem" with the N900 rather, a problem with apps that did not use the "opt" directory for non essential data. Not programs included in the original firmware. If this was the case then these apps would, or have been corrected in subsequent updates.

Also in your original post you state that:

Quote:

Originally Posted by You again
After updating to firmware 51 I was down to 72MB with no apps installed.
~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.5M 151.2M 72.1M 68% /

...and that you:

Quote:

...have now installed loads of apps, including many from Development...
From doing the math, using the figures you provided, it seems that even after installing all those apps you only increased rootfs use 2.3M...

Again; where is the problem?

Since you obviously are comfortable running the command "df -h" from the terminal, it seems to me that the best practice would be to run this command after every app you install from the developer or testing repositories. Then report your results if the seem out of line.

Every symlink from rootfs is a future nightmare waiting to happen. Even if this isn't the case, reducing your rootfs below OEM levels could mask any real problem apps that you might install. As a result, they go unreported and might not get fixed for the next guy. Savvy?

HRZ 2010-03-07 15:14

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by YoDude (Post 558567)

Every symlink from rootfs is a future nightmare waiting to happen. Even if this isn't the case, reducing your rootfs below OEM levels could mask any real problem apps that you might install. As a result, they go unreported and might not get fixed for the next guy. Savvy?

I just want to point out that this script did take my rootfs from 34 MB to 86 MB
....but within the first 5 minutes I realized one (minor yet aggravating) side effect. all my themes are completely out of order. I tried switching between them, uninstalling them and reinstalling to no avail. some elements of the themes revert to an original Nokia one. so dont do this script if you enjoy having a good theme on your N900...

edit: if someone knows of a way to reverse it, let me know. otherwise I will reflash because I really miss D-Theme Simple Blue (props to the dev) or perhaps I'll wait until the next FW and reflash prior to updating.

HRZ 2010-03-09 02:25

Re: 95.1MB free space in RootFs
 
anyone know how to revert the section of this script that moves "themes"??

I think I know where it's moved to (judging by OP's first post) but not sure where it was originally..

scuddy 2010-03-10 15:01

Re: 95.1MB free space in RootFs
 
I ran this script and it brought my rootfs down from 97% used to 66% used so big improvement there. I havent noticed any theme issues at the mo but will keep you posted

Elhana 2010-03-10 15:09

Re: 95.1MB free space in RootFs
 
Does anyone have some benchmarks of maemo running entirely from SD?

HRZ 2010-03-10 15:18

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by scuddy (Post 562611)
I ran this script and it brought my rootfs down from 97% used to 66% used so big improvement there. I havent noticed any theme issues at the mo but will keep you posted

For me, the script was definitely the culprit...? weird. unless it was conflicting with something i had installed recently but I doubt it because i only ran the script and as soon as i rebooted it happened. please let us know if my case is a fluke. I'm dying to get my D-Theme Simple Blue back but reflashing is a no-go since the new FW is around the corner and I'll probably reflash then.

Scottlfa 2010-03-10 17:09

Re: 95.1MB free space in RootFs
 
rm /usr/share/themes [the symlink]
cp -r /home/opt/usr/share/themes/* /usr/share/themes

reboot

Think that should work, just reverses the move and links made by the script

Personally very happy with the script and other rootfs suggestions.

HRZ 2010-03-10 17:41

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by Scottlfa (Post 562740)
rm /usr/share/themes [the symlink]
cp -r /home/opt/usr/share/themes/* /usr/share/themes

reboot

Think that should work, just reverses the move and links made by the script

Personally very happy with the script and other rootfs suggestions.

Ok, believe it or not this actually made things worse. see attached images.
i ran what you said and im not sure if the first command even went through since x-term didn't give me anything (see image).

So i WinSCP'd and created the directory /home/opt/usr/share/themes and rebooted. but before i even got to reboot, when i was creating the 2nd screenshot here, look at what happened. now i cant even go into "themes" at all (not in settings nor by tapping and clicking the gears icon) and a lot of buttons/images are missing or out of shape, etc.

any clue? i'd prefer not to reflash, maybe it just needs proper deleting of the symlink and somehow getting it to see the stock "themes" folder...

HRZ 2010-03-10 17:42

Re: 95.1MB free space in RootFs
 
2 Attachment(s)
screenshots:

Rob1n 2010-03-10 20:39

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by HRZ (Post 562771)
Ok, believe it or not this actually made things worse. see attached images.
i ran what you said and im not sure if the first command even went through since x-term didn't give me anything (see image).

So i WinSCP'd and created the directory /home/opt/usr/share/themes and rebooted. but before i even got to reboot, when i was creating the 2nd screenshot here, look at what happened. now i cant even go into "themes" at all (not in settings nor by tapping and clicking the gears icon) and a lot of buttons/images are missing or out of shape, etc.

any clue? i'd prefer not to reflash, maybe it just needs proper deleting of the symlink and somehow getting it to see the stock "themes" folder...

Try:
Code:

sudo gainroot
mkdir /usr/share/themes
cp -r /home/opt/usr/share/themes/* /usr/share/themes


HRZ 2010-03-11 14:15

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by Rob1n (Post 562964)
Try:
Code:

sudo gainroot
mkdir /usr/share/themes
cp -r /home/opt/usr/share/themes/* /usr/share/themes


this didn't work either, the mdir command didnt work since that folder was already there somehow and I forgot what the second command evoked. no worries though, i just reflashed and spent 3 hours reinstalling everything. i need to stop messing around with things in devel.

ndi 2010-03-11 18:33

Re: 95.1MB free space in RootFs
 
I don't understand why someone would move -say- theme elements to MMC when they get used so much?

This is the equivalent to swapping to disk to free up memory when there's free memory to begin with. Doing something when below 10M I can understand, but once you are above some 20 or so you are only degrading performance - basically running a system that has half the space you do.

Memory management is like blackjack. Go as close to max, but don't tip over. A system with 2 GB of RAM that has 50% free has the performance of a system with 1GB. Newer OSs don't have "free" RAM - that's why the more the better. All "free" RAM is in use by OS for read-ahead buffering, executable cache, shadowing, etc. So an OS with 4G outbenches a system with 1G, even of the 4G has 3G "free".

By freeing the space, you are denying the OS the caching it needs, so all data needs to be grabbed from slow storage.

Moving off 50% of files to MMC means that half the stuff you do works 10* times slower.

Why?

*) Based on wiki guesstimates of 150M/s for on-chip and 15M for a good eMMC.

HRZ 2010-03-12 03:35

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by ndi (Post 564124)
I don't understand why someone would move -say- theme elements to MMC when they get used so much?


Moving off 50% of files to MMC means that half the stuff you do works 10* times slower.

Why?

*) Based on wiki guesstimates of 150M/s for on-chip and 15M for a good eMMC.


thanks for the explanation. i, for one, will not be running this script again. ive got all my essential apps and im back at 39mb after a fresh flash.

geneven 2010-03-12 04:18

Re: 95.1MB free space in RootFs
 
It is fascinating that someone actually denies there is a rootfs problem now.

Does that mean I can install as many programs as I want to now, without regard to memory problems, which I could do with my N810 and N800? Of course, I was booting from a card.

I don't run any games except for the default ones. I have 31.8 M rootfs space free. Can I install 30 or so games now, as I could with the earlier tablets?

F2thaK 2010-03-12 05:42

Re: 95.1MB free space in RootFs
 
so youve got an N900 with 31.8 MB free root FS?

juju78 2010-03-12 08:37

Re: 95.1MB free space in RootFs
 
when im runing the scipt in terminal itīs asking a password !? does anybody know whatīs the password so that i can run the script ??

noobmonkey 2010-03-12 08:42

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by juju78 (Post 564769)
when im runing the scipt in terminal itīs asking a password !? does anybody know whatīs the password so that i can run the script ??

you need to run it as root

juju78 2010-03-12 08:51

Re: 95.1MB free space in RootFs
 
so... im not sure did i get it.. could you tell me how i do that step by step... cause all this linux world is very new to me,., it all came to me with my n900.. put some nice programs and runout memory and its slowing down.. so where i go and do what,,,
so far i did..
1) downloaded the script
2) went to terminal
3) sudo sh /home/MyDocs/moveroot.sh

and then it gave me password:

F2thaK 2010-03-12 09:04

Re: 95.1MB free space in RootFs
 
1 Attachment(s)
USE SCRIPT ATTACHED
(does not move themes)

make sure you put it in root directory if using USB > mass storage
NOT documents folder

/home/user/MyDocs

unplug phone

then in xterminal:

root
cd /home/user/MyDocs/
sh moveroot.sh

juju78 2010-03-12 09:43

Re: 95.1MB free space in RootFs
 
no it sayīs cantīt open moveroot.sh even itīs there !? so any ideas

Rob1n 2010-03-12 09:47

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by geneven (Post 564630)
It is fascinating that someone actually denies there is a rootfs problem now.

Does that mean I can install as many programs as I want to now, without regard to memory problems, which I could do with my N810 and N800? Of course, I was booting from a card.

I don't run any games except for the default ones. I have 31.8 M rootfs space free. Can I install 30 or so games now, as I could with the earlier tablets?

I don't see anyone denying that the limited rootfs space causes issues. All that's been said is that blindly moving as much as possible off the rootfs will also cause issues.

As for installing things - if the apps have been optified then you should be able install lots of them. I've got 15 games and about 50 apps installed and still have 25M free on rootfs (more if I disable the extra repositories). I think the only non-standard optification I've done is to move libQtGui off to /opt, but that's only another 10M.

F2thaK 2010-03-12 10:31

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by juju78 (Post 564823)
no it sayīs cantīt open moveroot.sh even itīs there !? so any ideas

Where did you put file? is your phone plugged in using mass storage?

make sure you put it in root directory if using USB > mass storage
NOT documents folder

/home/user/MyDocs

unplug phone

then in xterminal

root
cd /home/user/MyDocs/
sh moveroot.sh

Gizmokid2005 2010-03-12 13:33

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by HRZ (Post 562773)
screenshots:

This is WAY off topic, but I have to ask, what app are you using to get that battery icon that you have?

Rob1n 2010-03-12 13:51

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by Gizmokid2005 (Post 565032)
This is WAY off topic, but I have to ask, what app are you using to get that battery icon that you have?

That's not an app - that's just replacing the default battery icons. Have a look through the MODs thread for the icons & instructions (I'm afraid there's quite a lot to read though!).

ndi 2010-03-15 10:56

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by geneven (Post 564630)
I have 31.8 M rootfs space free. Can I install 30 or so games now, as I could with the earlier tablets?

If optified, yes. There's 2G and it can be expanded at a whim with no data loss if there's a card or a PC present.

Assuming the games are correctly optified for platform and device. I have 21 games installed as we speak, not including game-like stuff like doodles and silly candle like apps. I have 32M free. And it's nice games too, like OpenTTD, hex-a-hop, etc, plus the puzzles collection from the PuTTY guy.

d-iivil 2010-03-15 12:48

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by HRZ (Post 562773)
screenshots:

Themes cannot be completely moved to under /opt. Hildon-desktop-enginge won't follow the symlink and will show you no theme to choose from if you do that.

I think at least all the "non-image" -files should stay under /usr/share/themes/themedir -folder to make the theme to work.

Gizmokid2005 2010-03-15 12:58

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by D-Iivil (Post 567723)
Themes cannot be completely moved to under /opt. Hildon-desktop-enginge won't follow the symlink and will show you no theme to choose from if you do that.

I think at least all the "non-image" -files should stay under /usr/share/themes/themedir -folder to make the theme to work.

Moving the entire themes directory worked like a charm for me...

d-iivil 2010-03-15 13:04

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by Gizmokid2005 (Post 567731)
Moving the entire themes directory worked like a charm for me...

Okay. But if you leave the folder /usr/share/themes there and move just the /themedir under /opt it won't work. At least it didn't for me when maemo-optify suddenly optified my themes in the way that the whole theme folder was under /opt and symlink was created under /usr/share/themes

Weird **** :)

Gizmokid2005 2010-03-15 13:09

Re: 95.1MB free space in RootFs
 
Quote:

Originally Posted by D-Iivil (Post 567736)
Okay. But if you leave the folder /usr/share/themes there and move just the /themedir under /opt it won't work. At least it didn't for me when maemo-optify suddenly optified my themes in the way that the whole theme folder was under /opt and symlink was created under /usr/share/themes

Weird **** :)

Right. If you do a full symlink for /usr/share/themes to somewhere else, it will work fine. You just have to be sure to move the ENTIRE themes folder.


All times are GMT. The time now is 21:35.

vBulletin® Version 3.8.8