Active Topics

 


Reply
Thread Tools
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#1
The root directory of Maemo5 is limited to 256MB on the N900. This is a serious limitation, and users often and easily fill it up (especially if using the extras-devel repository). It is unfortunate in other ways too. For example, the standard Debian distro officially supports Arm7, so with a better partitioning, much of Debian would be directly usable through apt-get. We could use the full gamut of GNU/Linux commands instead of the settling for the Busybox replacements - imagine, "less" and "man" included by default!

The current solution is "optification". However, that solution is brittle since it requires active adaptation of all packages so that they are placed in /opt instead of in their usual locations. This means added burden on developers and makes packages slower to move into stable repositories.

As far as I know, the total set of mass storage available for the N900 is:


* 256MB Root partition (in a fast 256MB flash)
* 768MB Swap
* 2GB /home
* 27GB FAT32 USB storage
(Swap, /home and USB storage are all in a 32GB slow flash)

If I understood this correctly, the main reason for the small root partition is that it is in a faster flash than the home partition. To keep the device responsive, the speed sensitive stuff is placed in that flash, and other stuff is placed in /opt (/opt in turn is mounted in /home).

There are a few more constraints, in summary:

1) There is a fast 256MB flash and a slow 32GB flash
2) The device needs to be capable of getting to a guaranteed stable functioning state from a reflash
3) A reflash should not delete the user's document data (i.e. pics, music, etc) in the large flash storage
4) A reflash will always replace the entire contents of a flash memory.

Right now I am using a home grown solution, but it breaks each time the distro has an upgrade, forcing me to spend days rebuilding and moving everything again. And newbies end up having to reflash just because they tried out a few beta-level apps and filled the root partition to a point where booting fails. We need a better standard solution!

The brainstorm for this thread is here:
https://maemo.org/community/brainsto...n_in_the_n900/

There is a related Brainstorm about re-partitioning the 32GB internal flash here:
https://maemo.org/community/brainsto...nternal_flash/
though that doesn't solve the root directory problem.

There is also a previous discussion of the issue in the wiki:
http://wiki.maemo.org/Opt_Problem

Last edited by chemist; 2010-02-10 at 11:06.
 

The Following 8 Users Say Thank You to stefanmohl For This Useful Post:
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#2
Does anyone know if there are other reasons for the small root partition apart from flash memory speed? Am I even right about the fast flash reason (can someone verify)?

Assuming that the 256MB partition really is in fast flash, it seems reasonable that the 768MB swap partition also is in fast flash. Out of curiosity: Does anyone know if there is an underlying 1GB fast flash partitioned into the root and swap partitions? If so, there might be other partitioning possibilities...
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#3
Yes you are correct about the OS being located on a small root partition to take advantage of the faster flash memory speed. But I believe the swap is part of the other flash memory, not the 256 MB flash.
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 

The Following User Says Thank You to Laughing Man For This Useful Post:
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#4
Originally Posted by stefanmohl View Post
Assuming that the 256MB partition really is in fast flash, it seems reasonable that the 768MB swap partition also is in fast flash. Out of curiosity: Does anyone know if there is an underlying 1GB fast flash partitioned into the root and swap partitions? If so, there might be other partitioning possibilities...
There are two flash storage areas in the N900. The 256MB of OneNAND in the PoP on the OMAP3 contains the rootfs, the kernel and the bootloader. The second flash unit is the 32GB eMMC which contains home, swap and the large 27GB storage partition.

There's no easy way to make this better. Either you optify your packages (slow) or boot directly from eMMC (slower).
__________________
Ryan Abel
 

The Following 4 Users Say Thank You to GeneralAntilles For This Useful Post:
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#5
Originally Posted by stefanmohl View Post
As far as I know, the total set of mass storage available for the N900 is:

* 256MB Root partition
* 768MB Swap
* 2GB /home
* 32GB FAT32 USB storage
The 768MB swap, 2GB /home, and FAT 32 partitions all share the same 32GB flash memory. So swap is not on the "fast" flash memory.

The 32GB partition is 32 billion bytes, not 32*1024*1024*1024 bytes.
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.
 

The Following User Says Thank You to j.s For This Useful Post:
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#6
Thanks for making the partitionings clearer to me. I have edited the brainstorm accordingly.

@GeneralAntilles: I understand that the solution isn't very easy, but I have a suggestion (also to be found in the brainstorm itself as solution #1):

Solution #1: Place root in the large flash and link critical files in the fast flash

Posted on 2010-02-09 01:46 UTC by Stefan Möhl.

It seems to me that the current "optification" solution is close to right but the wrong way around. Instead of placing everything in root, and changing big slow stuff to go in /opt, we should do it the other way around. Put the root directory in the bigger flash, and for files that really need speed, link those specifically from the fast small flash. I.e. some sort of "speedification". The reason this is better is that it is more robust. If a package needs to have a file in the fast flash, it can be placed there. But if nothing is done, the package will at least work, just not at optimal performance. In contrast, a package that isn't optified will, if it can be installed at all, have a good chance of making the device unusable by completely filling the root partition.

So, if I understand GeneralAntilles right, the problem is the files used at boot time (and probably a few others). Well, in a nutshell, my suggestion is to "speedify" just those files, instead of (quite literally) optifying everything else in the world.

Last edited by stefanmohl; 2010-02-09 at 03:57.
 

The Following 3 Users Say Thank You to stefanmohl For This Useful Post:
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#7
Originally Posted by stefanmohl View Post
Solution #1: Place root in the large flash and link critical files in the fast flash
Go for it. This isn't, however, an acceptable solution for Nokia.
__________________
Ryan Abel
 
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#8
Hmmm, do you have any information about why this isn't acceptable for Nokia? Obviously, I can change my device around any way I like, but that breaks with each upgrade (and doesn't help newbies). I am looking for a default distribution solution in this brainstorm.

Why not treat the few files that need to be fast as special (i.e. link them from the fast flash) and all other files as the normal case (i.e. root default in slow, large flash), instead of the other way around?

Last edited by stefanmohl; 2010-02-09 at 04:15.
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#9
agree but how? it wouldn't be reliable when things broke ever time the new update arrived!
 
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#10
If Nokia would change the default Maemo5 distribution to have root directory files in the large slow flash by default, and only the files that really need it in the fast flash, then it would be distribution policy. Then it wouldn't break at each upgrade any more.
 
Reply

Tags
the opt problem

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:38.