maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Root space - What is "optifying"? (https://talk.maemo.org/showthread.php?t=40131)

slender 2010-01-13 09:16

Re: Root space
 
----------nothing------

RevdKathy 2010-01-13 09:17

Re: Root space
 
How do I work out what to uninstall? I know witter and FM radio are python (though I have the radio from extras, not testing).

mivoligo 2010-01-13 09:27

Re: Root space
 
Quote:

Originally Posted by texaslabrat (Post 467053)

I don't think you'd free up much just by disabling a repository...I can't imagine the little db files taking up that much space.

I've just disabled extras-testing and extras-devel and my used space changed from 81% to 76%. It's not so bad. :)

mece 2010-01-13 09:32

Re: Root space
 
Quote:

Originally Posted by RevdKathy (Post 467909)
How do I work out what to uninstall? I know witter and FM radio are python (though I have the radio from extras, not testing).

apt-get gave me a nice list and removed the apps for me automagically.

mece 2010-01-13 09:35

Re: Root space
 
Quote:

Originally Posted by slender (Post 467908)
2.2 Enable extras-testing and extras-devel from app manager and wait app manager to refresh.

:)

if you do that you might end up with the non-optified python again, making the whole exercise pointless. I might be wrong though. Install, for example fm radio from extras first, to get python set up properly. then enable whatever and install the rest.

Rob1n 2010-01-13 09:51

Re: Root space
 
Quote:

Originally Posted by mece (Post 467938)
if you do that you might end up with the non-optified python again, making the whole exercise pointless. I might be wrong though. Install, for example fm radio from extras first, to get python set up properly. then enable whatever and install the rest.

No, you should be okay. The new python optification package would look to be creating new python directories in /opt, then bind mounting them into /usr. This means you need to remove all python apps before hand (which this process does, but which is why python isn't there as a normal update), but anything installed afterwards will install into /opt without any changes having to be made.

mece 2010-01-13 09:55

Re: Root space
 
Quote:

Originally Posted by Rob1n (Post 467963)
No, you should be okay. The new python optification package would look to be creating new python directories in /opt, then bind mounting them into /usr. This means you need to remove all python apps before hand (which this process does, but which is why python isn't there as a normal update), but anything installed afterwards will install into /opt without any changes having to be made.

I was thinking of this scenario:
you enable devel (after removing python) and install witter from there, and in the process python is also installed, but from devel and not from extras, and then you end up with a non optified python again. (If devel python version is non optified. i actually don't know this)

Rob1n 2010-01-13 10:06

Re: Root space
 
Quote:

Originally Posted by mece (Post 467967)
I was thinking of this scenario:
you enable devel (after removing python) and install witter from there, and in the process python is also installed, but from devel and not from extras, and then you end up with a non optified python again. (If devel python version is non optified. i actually don't know this)

No, the optified version has a higher version, so will always be picked in preference. In fact, there shouldn't even be a non-optified version of python in -devel or -testing now.

stayloa 2010-01-13 10:12

Re: Root space
 
Quote:

Originally Posted by mece (Post 467903)
For those who have installed python apps from testing or devel. The python in extras is now optified, which gives you a nice 20 megs extra in rootfs.

I had to manually remove some stuff to get it updated.

Here's what I did:

This will most likely remove some programs. You will see a list of what will be removed and asked to verify. Please note that you might not have the same programs installed as I did. FM Radio, Quicknote and Witter are a couple of python apps that will be removed.


1. disable extras-testing and extras-devel from app manager, and close app manager.

2. in xterm as root:

apt-get remove python
apt-get remove python2.5
apt-get remove python-osso
apt-get autoremove
apt-get clean

now you should have much more space.

3. Install FM Radio from extras. A new optified version of python will be installed.

4. Install whatever programs that were removed. They should now use the optified python libraries.

Check with df -h that you see the opt mounts for python added to the list.


Thank you very much for this guide - thought I'd post my results from running through it as it has turned out to be a really useful exercise.

I started with around 19mb free space on root.

I ran the commands and uninstalled everything (including several apps from extras-testing and devel). With those 2 repos still disabled, I had 59.7m free.

I then enabled extras-testing and devel. This took me down to 45.1m.

I ran 11 updates from all repos (no python apps). Was now down to 44.9m.

I reinstalled wiicontrol and mediabox (with 2 new plugins) from extras-devel - both python. Down to 44.4m.

I then disabled the two repos again. Back to 58.5m.

So it appears that just enabling the two "cautionary" repos does reduce space on root by about 10 meg. The new python is certainly being applied to the reinstalled devel apps which is great. I'd imagine that 44.4m itself is enough, but by keeping those repos disable unless I'm dipping, I've practically gained 30meg! So thanks again!

NvyUs 2010-01-13 10:16

Re: Root space
 
Quote:

Originally Posted by mece (Post 467903)
For those who have installed python apps from testing or devel. The python in extras is now optified, which gives you a nice 20 megs extra in rootfs.

I had to manually remove some stuff to get it updated.

Here's what I did:

This will most likely remove some programs. You will see a list of what will be removed and asked to verify. Please note that you might not have the same programs installed as I did. FM Radio, Quicknote and Witter are a couple of python apps that will be removed.


1. disable extras-testing and extras-devel from app manager, and close app manager.

2. in xterm as root:

apt-get remove python
apt-get remove python2.5
apt-get remove python-osso
apt-get autoremove
apt-get clean

now you should have much more space.

3. Install FM Radio from extras. A new optified version of python will be installed.

4. Install whatever programs that were removed. They should now use the optified python libraries.

Check with df -h that you see the opt mounts for python added to the list.

thanks very much for this tip, worked a treat i had decent amount of space already but you can never have too much

slender 2010-01-13 10:21

Re: Root space
 
Quote:

Originally Posted by mece (Post 467938)
if you do that you might end up with the non-optified python again, making the whole exercise pointless. I might be wrong though. Install, for example fm radio from extras first, to get python set up properly. then enable whatever and install the rest.

So do you mean that i should install radio with apt-get? It work eventhought I have disabled repositories from app manager?

mece 2010-01-13 10:22

Re: Root space
 
Hm perhaps I should post it as a separate thread, make it easier to find.

mece 2010-01-13 10:23

Re: Root space
 
Quote:

Originally Posted by slender (Post 468006)
So do you mean that i should install radio with apt-get? It work eventhought I have disabled repositories from app manager?

FM Radio is in extras. And you should install it from app manager.

slender 2010-01-13 10:27

Re: Root space
 
Quote:

Originally Posted by mece (Post 468012)
FM Radio is in extras. And you should install it from app manager.

I´m puzzled. In your message you listed that You could install for example fm radio to get new optified python after removing it from xterm, but that's not possible if you do not first enable repositories what you adviced to disable before removing python.

But thanks for this tip!

bigdom58 2010-01-13 10:38

Re: Root space
 
Quote:

Originally Posted by mece (Post 467903)
For those who have installed python apps from testing or devel. The python in extras is now optified, which gives you a nice 20 megs extra in rootfs.

I had to manually remove some stuff to get it updated.

Here's what I did:

This will most likely remove some programs. You will see a list of what will be removed and asked to verify. Please note that you might not have the same programs installed as I did. FM Radio, Quicknote and Witter are a couple of python apps that will be removed.


in xterm as root:

apt-get remove python
apt-get remove python2.5
apt-get remove python-osso
apt-get autoremove
apt-get clean

now you should have much more space.

Install whatever programs that were removed. The new optified python libraries should be installed in the process.

Check with df -h that you see the opt mounts for python added to the list.

Thanks for advice, i have went from 45mb to 61.62 free.

ossipena 2010-01-13 10:46

Re: Root space
 
Quote:

Originally Posted by mece (Post 468009)
Hm perhaps I should post it as a separate thread, make it easier to find.

or visit

http://wiki.maemo.org

and put your instructions there

please

e: because at least one sees only the essential parts, links etc are pretty soon forgotten no matter if it is a thread here, wiki page or whatever.

mece 2010-01-13 10:55

Re: Root space
 
Quote:

Originally Posted by ossipena (Post 468053)
or visit

http://wiki.maemo.org

and put your instructions there

please

e: because at least one sees only the essential parts, links etc are pretty soon forgotten no matter if it is a thread here, wiki page or whatever.

good idea. Perhaps it could be added to the sticky thread too.

Rob1n 2010-01-13 10:56

Re: Root space
 
Quote:

Originally Posted by slender (Post 468024)
I´m puzzled. In your message you listed that You could install for example fm radio to get new optified python after removing it from xterm, but that's not possible if you do not first enable repositories what you adviced to disable before removing python.

Yes it is - FM radio is in extras, and he only advised disabling extras-devel and extras-testing.

slender 2010-01-13 11:24

Re: Root space
 
Quote:

Originally Posted by Rob1n (Post 468075)
Yes it is - FM radio is in extras, and he only advised disabling extras-devel and extras-testing.

So I can join group of people suffering some level of dyslexia.

Yes. I didnt pay attention. Sorry for that.

Alex Atkin UK 2010-01-13 17:42

Re: Root space
 
I used the following script from one of the many root space threads on here:

Code:

#!/bin/ash

mkdir -p /home/root/usr/share
cd /usr/
for FILE in games include local src var
do
mv $FILE /home/root/usr/
ln -s /home/root/usr/$FILE /usr/
done

mkdir -p /home/root/var/cache
cd /var/cache/
for FILE in apt
do
mv $FILE /home/root/var/cache/
ln -s /home/root/var/cache/$FILE /var/cache/
done

cd /usr/share/
for FILE in fonts icons locale mime nokia-maps pixmaps sounds themes tutorial-applet zoneinfo
do
mv $FILE /home/root/usr/share/
ln -s /home/root/usr/share/$FILE /usr/share/
done

mkdir /home/root/usr/share/games
ln -s /home/root/usr/share/games .

It freed me up around 30MB space and if anything, Maemo Maps seems to load FASTER not slower (quite a lot faster). Although its the first time I loaded it since the firmware update so maybe that sped it up?

Lets not forget, the MMC might be faster for some things as its not using CPU power for compression. Its all a CPU power vs IO performance juggling act, hard to know which is going to be fastest.

Moving the apt cache alone makes a huge difference and its silly it wasting space on root. Just enabling extras-testing and extras-devel but not installing anything, should NOT eat root space. Although I guess its a good idea to disable extras-tests and extras-devel before doing a firmware update anyway, but it was silly I had to do it just to free enough space.

slender 2010-01-13 18:05

Re: Root space
 
Could you tell what this script really does and is it safe?

jcompagner 2010-01-13 22:02

Re: Root space
 
Quote:

Originally Posted by mece (Post 467903)
in xterm as root:

apt-get remove python
apt-get remove python2.5
apt-get remove python-osso
apt-get autoremove
apt-get clean

now you should have much more space.

hmm i think i already had python optified but i though lets do it once more to see what it cleans up
So it did install many things but the only thing i gained was something from 33 to 36
and after reinstalling some stuff that i need i did fall back to 35 (but maybe a reboot would give me that back)

what does help very well is just disabling the 2 repo's (testing and develop) then it jumps to more then 47

what is exactly stored for that. And cant that be done in home?

tpinhao 2010-01-14 08:12

Re: Root space
 
Quote:

Originally Posted by bigdom58 (Post 468040)
Thanks for advice, i have went from 45mb to 61.62 free.

Done, went from 31MB to 47 MB free ! :D

mece 2010-01-14 08:31

Re: Root space
 
Quote:

Originally Posted by jcompagner (Post 469245)
hmm i think i already had python optified but i though lets do it once more to see what it cleans up
So it did install many things but the only thing i gained was something from 33 to 36
and after reinstalling some stuff that i need i did fall back to 35 (but maybe a reboot would give me that back)

what does help very well is just disabling the 2 repo's (testing and develop) then it jumps to more then 47

what is exactly stored for that. And cant that be done in home?

well the information about all the programs, the icons. It is said that the icon-cache would be too slow on eMMC. I haven't tried moving it.

Alex Atkin UK 2010-01-14 11:42

Re: Root space
 
Quote:

Originally Posted by slender (Post 468819)
Could you tell what this script really does and is it safe?

The script moves the following directories onto the /home partition:
Code:

/usr/games
/usr/include
/usr/local
/usr/src
/usr/var
/var/cache/apt
/usr/share/fonts
/usr/share/icons
/usr/share/locale
/usr/share/mime
/usr/share/nokia-maps
/usr/share/pixmaps
/usr/share/sounds
/usr/share/themes
/usr/share/tutorial-applet
/usr/share/zoneinfo


taril 2010-01-14 13:46

Re: Root space
 
42-11: 14MB
51-01: 16MB

After I run this cript: 55MB

Thanks!

Ghostface 2010-01-14 14:59

Re: Root space
 
I simply apt-get -f dist-upgraded, and whenever I ran out of space I rebooted and redid apt-get -f dist-upgrade.

Worked fine, only took me about 4 hours to update :cool:

Serbia 2010-01-14 16:02

Re: Root space - What is "optifying"?
 
OK WE use rootfs for what?? when i import video, music, pictures etc. to my phone where is it saved? on rootfs memory or on 32gb memory?? i want to use 32GB of space no that 227 MB...
sorry for bad English i hope u understand............chears

Ps: when i download some application from ovi store which memory takes?

Rob1n 2010-01-14 16:08

Re: Root space - What is "optifying"?
 
Anything under MyDocs (which is where the video, music, pictures, etc default to) is on the 32GB eMMC.

Applications from the Ovi store will be optified, so larger apps and data will go to /opt (which is on the 32GB eMMC), though libraries and smaller files will still go to the rootfs.

paai 2010-01-15 14:44

Re: Root space
 
Quote:

Originally Posted by RevdKathy (Post 467836)
'Optifying' is not something users do.
...

But in terms of the apps themselves, all the ones in Ovi, and in maemo-extras are optified. They have to have been optified to get that far. Apps still in testing (less so) and devel are (highly) likely not to have been optified. No point in doing that for every build of something that's still in very early experimentation. It's a sort of 'tidying up before public release' process.

Which gives you a fair idea of what you might want to uninstall. ;)

If you still have 20% available (45mb) you should be ok for the Next big Thing.


Very clear. Thanks.

truelies1 2010-01-15 16:17

Re: Root space
 
Quote:

Originally Posted by Alex Atkin UK (Post 470432)
The script moves the following directories onto the /home partition:
Code:

/usr/games
/usr/include
/usr/local
/usr/src
/usr/var
/var/cache/apt
/usr/share/fonts
/usr/share/icons
/usr/share/locale
/usr/share/mime
/usr/share/nokia-maps
/usr/share/pixmaps
/usr/share/sounds
/usr/share/themes
/usr/share/tutorial-applet
/usr/share/zoneinfo


How to run script under N900? Just type in at command line x-terminal?

msa 2010-01-15 16:22

Re: Root space - What is "optifying"?
 
i am confused

i only installed 2 apps from devel and testing, cant remember which ones exactly, but only 2.

when i do df -h, it shows me that rootfs size is 227,9m, used 163,6m and available 60.1m with a usage of 73%

is this any normal?

Rob1n 2010-01-15 16:27

Re: Root space - What is "optifying"?
 
Sounds about right, yes. I'm on 82% used at the moment (need to redo some cleanups though).

msa 2010-01-15 17:49

Re: Root space - What is "optifying"?
 
but what exactly is using 163mb of 227mb total?
the 2 apps i installed from devel and testing were both not larger than 1 mb.

so i suppose the used 163mb are system-relevant files that i cant and shouldnt remove anyway, right?

Rob1n 2010-01-15 18:41

Re: Root space - What is "optifying"?
 
Yes, most of the space is the OS itself and common libraries. Unless you're absolutely requiring the space then it's not worth worrying about. If you're short of space for something then some of the files/directories can be moved off to the eMMC instead. This has the potential to cause problems though, so is best avoided if possible.

Some of the libraries will probably get moved in future updates but there still seems to be some ongoing planning/discussions about how best to do this.

truelies1 2010-01-28 18:33

Re: Root space
 
I used this one too, rootfs increased from 38M to 72M. But this has a problem, each time I restart the N900, the will use the default blue theme automatically. How to fix this?


Quote:

Originally Posted by Alex Atkin UK (Post 468786)
I used the following script from one of the many root space threads on here:

Code:

#!/bin/ash

mkdir -p /home/root/usr/share
cd /usr/
for FILE in games include local src var
do
mv $FILE /home/root/usr/
ln -s /home/root/usr/$FILE /usr/
done

mkdir -p /home/root/var/cache
cd /var/cache/
for FILE in apt
do
mv $FILE /home/root/var/cache/
ln -s /home/root/var/cache/$FILE /var/cache/
done

cd /usr/share/
for FILE in fonts icons locale mime nokia-maps pixmaps sounds themes tutorial-applet zoneinfo
do
mv $FILE /home/root/usr/share/
ln -s /home/root/usr/share/$FILE /usr/share/
done

mkdir /home/root/usr/share/games
ln -s /home/root/usr/share/games .

It freed me up around 30MB space and if anything, Maemo Maps seems to load FASTER not slower (quite a lot faster). Although its the first time I loaded it since the firmware update so maybe that sped it up?

Lets not forget, the MMC might be faster for some things as its not using CPU power for compression. Its all a CPU power vs IO performance juggling act, hard to know which is going to be fastest.

Moving the apt cache alone makes a huge difference and its silly it wasting space on root. Just enabling extras-testing and extras-devel but not installing anything, should NOT eat root space. Although I guess its a good idea to disable extras-tests and extras-devel before doing a firmware update anyway, but it was silly I had to do it just to free enough space.


Kjow 2010-02-02 16:53

Re: Root space
 
Quote:

Originally Posted by Alex Atkin UK (Post 468786)
I used the following script from one of the many root space threads on here:

Code:

#!/bin/ash

mkdir -p /home/root/usr/share
cd /usr/
for FILE in games include local src var
do
mv $FILE /home/root/usr/
ln -s /home/root/usr/$FILE /usr/
done

mkdir -p /home/root/var/cache
cd /var/cache/
for FILE in apt
do
mv $FILE /home/root/var/cache/
ln -s /home/root/var/cache/$FILE /var/cache/
done

cd /usr/share/
for FILE in fonts icons locale mime nokia-maps pixmaps sounds themes tutorial-applet zoneinfo
do
mv $FILE /home/root/usr/share/
ln -s /home/root/usr/share/$FILE /usr/share/
done

mkdir /home/root/usr/share/games
ln -s /home/root/usr/share/games .

It freed me up around 30MB space and if anything, Maemo Maps seems to load FASTER not slower (quite a lot faster). Although its the first time I loaded it since the firmware update so maybe that sped it up?

Lets not forget, the MMC might be faster for some things as its not using CPU power for compression. Its all a CPU power vs IO performance juggling act, hard to know which is going to be fastest.

Moving the apt cache alone makes a huge difference and its silly it wasting space on root. Just enabling extras-testing and extras-devel but not installing anything, should NOT eat root space. Although I guess its a good idea to disable extras-tests and extras-devel before doing a firmware update anyway, but it was silly I had to do it just to free enough space.

it give me error, the file script name is "freeroot" and I copied it to /:

:not found line 2:
./freeroot: cd: line 4: can't cd to /usr/
./freeroot: line 6: syntax error: word unexpected (expecting "do")

How can I solve?

Thanks

jlnh 2010-02-16 21:45

Re: Root space - What is "optifying"?
 
Whow!
After the last upgrade today to n900-02-8 and restoring my 38MB backup, I ran into a total memory wall - giving me 0 (zero) and unable to reinstall numerous apts. Rebooted and got some 6 MB back.

Then I followed the 2 suggestions offered in the earlier pages. Uninstalled Python etc. which gave me some 30mb back, BUT in RAM usage.
Then I TYPED and executed each line of the script from Alex Atkin into my N900. and Hé Presto! i now have 65.35 Mb memory free.

(Had to upload the Update via the NSU as OTA gave me "not sufficient memory!"

Am all happy now! Thanks Guys!

truelies1 2010-02-17 13:38

Re: Root space
 
Quote:

Originally Posted by Kjow (Post 507136)
it give me error, the file script name is "freeroot" and I copied it to /:

:not found line 2:
./freeroot: cd: line 4: can't cd to /usr/
./freeroot: line 6: syntax error: word unexpected (expecting "do")

How can I solve?

Thanks

How to make a script file of those command to avoid type errors? Can I run this 2nd times like after a month to increase the rootf?

Rob1n 2010-02-17 13:50

Re: Root space
 
Quote:

Originally Posted by truelies1 (Post 532119)
How to make a script file of those command to avoid type errors? Can I run this 2nd times like after a month to increase the rootf?

Rerunning the script will not help, no. You can make a script by copying & pasting those commands into a text file (making sure you're using UNIX format line endings) and saving it to the N900. You can then run it using:
Code:

sh filename


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8