View Single Post
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#134
TiagoTiago I think I understand what you're trying to say. Other phones or OS, like Windows, Symbian, etc, let you install to different disks/memorycard so you have neatly compartmentalized groups of things. In Symbian you can even swap SD cards and have the installed apps appear or disappear from the app menu based on which card is plugged in.

I will try to explain it in more detail:

In most normal linux machines, if you run out of space and add more disks or partitions you either mount them as a subdirectory someplace or expand your volumes onto them using LVM. This is not usually a big deal because in most cases, linux installations will have been set up with plenty of disk space allocated for the main OS and installed programs, and this excess disk space usage is caused by user data. That kind of stuff is easy to deal with (put /home/user/ onto another disk, put your movie collection to a separate disk, etc, voila)

Since this is not normally a problem, there is really no point in separating things like you want to do. The package manager ensures there are no conflicts, everything goes where it belongs (FHS) and the world moves along happily. User data and config goes into /home/user/ in almost all well-behaved applications. (System-wide settings are a different story, and system-vs-user is a really difficult distinction to make on N900 at times)

Now I'll play mind-reader: Why should he care about this in the first place? Probably because there's not enough space on N900 to install programs. So, I think the real question here is not "why can't I install to arbitrary locations?" but "why doesn't N900 have more disk space available for installed applications?". For the latter question, there is surely a solution. If your question is truly the former and is purely speculation, and you don't have a real problem that you're trying to solve, then the hundred+ replies so far are basically all you're going to get from people I guess.

So, on to what I think is your real problem and solution:
N900 only has 256MB of rootfs space. That's a hardware limit, nothing we can do about it. Contents of that 256MB were compressed, but that still wasn't enough. Low rootfs space was a real big problem when N900 first came out. The solution was optificiation, moving things to /opt (the 2gb ext3 home partition in eMMC space). It is slower than the rootfs, but at least it has more space and was an acceptable workaround to the original problem. Most applications have been repackaged to be optified (I think it's a requirement for promotion to extras now) and with PR1.2 a large amount of system files got moved into /opt.

But that's not the end of the problems. Now that we're leaning more heavily on /opt, another issue occurs. The 2gb partition that was originally for user data is now full of program data as well. For some users 2gb isn't enough space because of that. I've personally run out of space on the 2gb because big packages like openarena and kroll eat away at it quickly, and large files in my home directory...

We have MyDocs, approximately 27GB in size, but is no help for this because it is FAT32 and more importantly because it is prone to being unmounted when you plug your N900 into a computer. SD card is not really a (permanent) solution either because of the unmount possibility (and cover removed situation).

Therefore, I think if you want an actual solution to allow you to install more programs on your N900, the answer is clearly repartitioning your eMMC:
http://wiki.maemo.org/Repartitioning_the_flash

How much space you decide to allocate to each partition will depend on your needs and how you use your N900. It is a relatively simple thing to do and there are several ways to do it. (be sure to backup everything first!)

Personally I'll go with making as much of eMMC using linux filesystem as possible, and leave only a minimal MyDocs around for camera, documents and others to use. I can use SD card for storage of music/movies/whatever. (Solution #1 on the wiki looks like the best one to me)

If you have a specific example of a program that you must install elsewhere, or use case where this solution would not work for you, please tell so we can try to help.

If you want standalone programs contained in one directory:
Individual programs may be able to be packaged in a "portable" version, which has been built with static libs and looks in current dir for config files/data files (or has a wrapper shell script that sets environment to deal with it). That's really a specific use case and doesn't really apply to whole system package management in general. This portable version would need to be created by someone specifically for the purpose of being portable. Static libs are generally not a good thing for many reasons, security (if zlib has a security bug, instead of upgrading zlib, now every program compiled with zlib must be recompiled and upgraded as well), as well as increased memory and disk space usage by not using shared libs.

If you're compiling your own, you can do whatever you want. Usually you'd install them in your /home/user/ hierarchy with local user permissions. This is how most people do it on shared servers where their program is not installed system-wide. Again, though, this does nothing to help if the true problem is lack of disk space (or if you're unable or unwilling to compile and package things yourself).

If you want to compartmentalize/segregate programs entirely, you'll normally use a chroot, a container-based system like lxc or openvz, or a traditional virtual machine. All of those will probably use significantly more disk space than a normal package installation would, so for the problem of insufficient disk space are not a valid solution.

So, again, my recommendation to you is to repartition your N900 and enjoy the massive amounts of free space and have fun installing everything in the repos without worries.

HTH
 

The Following 2 Users Say Thank You to stlpaul For This Useful Post: