Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do you know how can I install apps in other folder than usr automatically? (using dpkg and make install)

I want just to install it for example in special folder in my home partition (for example /home/usr).

share|improve this question
May I ask why you want that? – user39559 May 16 '11 at 13:33
Cause I have phone with 256 MB root and extandable to 27 GB home ? – oneat May 16 '11 at 13:35

If you can run dpkg on your phone and play with folders like this, I guess you can do other root'ish stuff to your phone.

I suppose you can mount, umount, and edit the automount table. If so, copy everything of your /usr/ to /home/usr/:

mkdir /home/usr/
rsync -av /usr/ /home/usr/

and then mount the latter on the top of the former with the bind mount option, by adding this line to /etc/fstab/:

/home/usr /usr none bind

Finally reboot, and run


to see if it worked.

/dev/sda1 on / type ext4 (rw,errors=remount-ro,...)
/dev/sda2 on /home type ext4 (rw,...)
/home/usr on /usr type none (rw,bind)

Good luck!

share|improve this answer
The problem is I tried it and it won't work. Probably because that they're files needed before mount. – oneat May 18 '11 at 15:55
It doesn't even show on mount? Can you mount manually? – user39559 May 18 '11 at 18:50

You certainly can't do it with dpkg, as files in the package expect each other to be put in specific places. If dpkg were to install things in other places, a lot of things simply wouldn't work. See (for example) here for more details.

If the product uses a configure script, you can usually compile it with a --prefix option, which allows you to put the files in a non-standard location.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .