Question about the installation directory of programs

Laurent Bercot ska-dietlibc at skarnet.org
Tue Nov 12 18:35:15 UTC 2013


> 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.

  Or even better, if this is a specialized system with busybox plus a few homemade
applications : just forget about /usr entirely and make your root filesystem
read-only, which will guarantee bootability.
  The "repair /usr from /" approach is reasonable for a full-fledged distribution
with a lot of packages and frequent /usr updates. It is suboptimal for an embedded
or otherwise specialized system.

-- 
  Laurent Bercot


More information about the busybox mailing list