Question about the installation directory of programs

Michael Conrad mconrad at intellitree.com
Tue Nov 12 18:18:39 UTC 2013


On 11/8/2013 9:57 PM, ChenQi wrote:
> I'm asking this because our project may also need a separation of / 
> and /usr. In other words, we need to make sure the system can still 
> boot up for recovery and repair even if /usr is missing.
>
> As busybox is an important part of our system, I want to know your 
> opinions on this issue.
>

IMHO, try this:

Install busybox at /bin and /sbin, and install all applets (either 
symlinks or hardlinks) in those dirs.

Create /usr mountpoint.
Make /usr/bin symlink to ../bin
Make /usr/sbin symlink to ../sbin

In your "usr" partition which gets mounted at /usr, make symlinks for 
each busybox applet to ../../[s]bin/$APPLET

Now, before you mount /usr, you still can access any busybox 
/usr/bin/$APPLET, and when you mount the real /usr, it will hide the 
directory symlinks, but the symlinks to each applet will take their 
place, and you still have access to them.

-Mike


More information about the busybox mailing list