maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Moving /usr to /opt/maemo/usr -> major road blocks (https://talk.maemo.org/showthread.php?t=80184)

don_falcone 2011-11-21 09:38

Moving /usr to /opt/maemo/usr -> major road blocks
 
What is (in your opinion) the "best" way to merge '/usr' with '/opt/maemo/usr' and de-duplicate etc. before? This is not really helpful, because there are only some thoughts noted. Has anyone ever really tried it?

I thought about copying everything from '/usr' to '/opt/maemo/usr' and mounting '/usr' as 'opt/maemo'usr' by editing /usr/lib/genfstab.awk (/etc/fstab/)


...but:
Because '/usr' already contains links to /opt/*, i f*cked up and now /opt/maemo/usr contains unresolved symbolic links of files that now point to themself... of course those files are gone. :mad:

I know that

-p (preserve)
-R or -r (recursive)

were necessary options, but maybe i should have used also this?

-L (dereference)

Currently running a 'find /usr -type l -exec ls -l {} \; > /home/user/symlinks.txt' to try to resolve this without reflashing, only reinstalling some packages if doable.



EDIT:

Why is the system generally in such a messy state without my doings?

Alone within /usr/lib, there are at least those directories targeted by files using symlinks:

/opt/maemo/usr/lib (f.e. libavcodec etc.)
/opt//lib (f.e the Qt stuff)
/opt/usr/lib (f.e. libcups)

Why? Isn't there an agreed standard? This makes it almost impossible to choose /usr/lib as a target for relocation, and i will have to rely on sym-linking single files or directories only from /usr/bin /usr/lib /usr/share as before, which is what i wanted to avoid (creating even more of a mess).

don_falcone 2011-11-21 13:01

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Additional question:

If i would create a separate partition for /usr on the EMMC and do the necessary edits in genfstab.awk, would this work? If yes, should it be the last partition on the EMMC (/dev/mmc0blk4)?

(I plan to reflash this evening, so if any could answer before it would be helpful)

vi_ 2011-11-21 13:06

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Wait, doesn't /usr contain data that is needed to mount the emmc. If you move it to the emmc how is it gonna mount the emmc?

Ya follow?

don_falcone 2011-11-21 13:25

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
I feared something like this. So how can we free up space without having to rely on ugly hacks (like symlinking too many directories/files)?

Estel 2011-11-21 13:27

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Also, could You explain why You're planning to move /usr/ (containing crucial elements) from super-fast NAND to "slow" eMMC? Seems like best way to slow system down, by not a small factor.

/Estel

// Edit

You were faster, so additional question - why You want to free up rootfs? It is in Your best interest, to have it used as much as possible, due to mentioned NAND speed.

vi_ 2011-11-21 13:30

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
I think the speed difference between NAND and EMMC is minimal.

I see two ways of freeing up root space.

1. Deleting unused locals, can free up ~20-25MB.
2. Symlinking stuff that you definitely will not be needing for bootup.

qwazix 2011-11-21 13:31

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
I have bookmarked this post some time ago

http://talk.maemo.org/showpost.php?p...&postcount=254

I think it's relevant

don_falcone 2011-11-21 13:38

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Because i already freed up several (in the multiple tens) megabytes by moving and symlinking single files and whole directories, repeatedly over the course of 12 months, but said space grew smaller and smaller starting shortly after regaining something and during today's update not even some bytes were left. History repeating. You can have not enough free space; packages will keep eating your rootfs space with impunity for no particular reason.

Because /usr should be able to use a separate partition by mounting it from somewhere else (compile custom kernel with mmc driver enabled?). It is supported in Linux per se, so why is Maemo restricted?

Because there were users that moved the whole rootfs out of NAND.

Because Nokia went cheap on the same level that they went cheap on the RAM as they went cheap everywhere regarding HW on the Symbian phones.

Because optifying seems like being a "only-nice-to-have' extra during development of so many packages.

Because i will see if speed is really that lame.

vi_ 2011-11-21 13:41

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Quote:

Originally Posted by qwazix (Post 1126837)
I have bookmarked this post some time ago

http://talk.maemo.org/showpost.php?p...&postcount=254

I think it's relevant

I call shennanigans.

While he HAS made a copy of /usr on a different partition, it is not in use...

Rationale:

1. Fstab does NOTHING, it is just there for 'completeness' and is re-created EVERY boot by genfstab.awk and some other convoluted magic.

2. You CANNOT boot the n900 with /usr on emmc. Consider Backupmenu, it is stored in /usr/share/backupmenu and is run without mounting emmc and Mydocs.

How would backup menu run if it were located on emmc before emmc was mounted?

don_falcone 2011-11-21 13:58

Re: Moving /usr to /opt/maemo/usr -> major road blocks
 
Quote:

Originally Posted by vi_ (Post 1126835)
I think the speed difference between NAND and EMMC is minimal.

I see two ways of freeing up root space.

1. Deleting unused locals, can free up ~20-25MB.
2. Symlinking stuff that you definitely will not be needing for bootup.

I did both; but this helps only so-so (and not endlessly).

Another question:

Why is the eMMC stuff not in /lib or anywhere else, but in /usr/lib (/usr/lib/genfstab.awk)? Seriously, was this a good design decision? IMHO far way from it.


All times are GMT. The time now is 02:32.

vBulletin® Version 3.8.8