Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2017 21:16:31 +0100
From:      Polytropon <>
Subject:   Re: Variable assignment in sh
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Wed, 1 Feb 2017 14:59:29 -0500, James B. Byrne wrote:
> On Tue, January 31, 2017 14:01, Polytropon wrote:
> > I know, those are very special cases, and if your goal is not
> > portability and "guaranteed availability", then it won't hit you.
> > I just thought it's worth being mentioned.
> Thank you.  I have found your explanation of what goes on under the
> covers very interesting.  In this case I am dealing with a zfs system
> so if /usr is not there then neither is /bin.

That depends on your actual partitioning. Commonly / contains
/bin (but ZFS layout can easily differ from that concept). On
the / partition, you'll find everything to successfully boot
the system into single user mode (sometimes called "maintenance
mode" or "emergency mode"), which is a state where only / is
mounted read-only and a shell is presented. Historically, the
different partitions resided on different physical disks (due
to size limitation), which today doesn't apply anymore. However,
ZFS allows you to manage system disk content as "fine grained"
as you like, for example different ZFS partitions for /usr/src
and /usr/ports and /usr/local are possible. That /usr/local is
the place where 3rd party software (binaries and libraries) are
stored to per default, and if that partition cannot be mounted
(be it /usr or /usr/local), bash won't be available.

A typical "functional partitioning" approach for UFS consists
of partitions for / (which includes /bin), /tmp, /var, /usr,
and /home. ZFS allows you to be much more precise, and you
can also apply different additions like compression depending
on the use of "sub-partitions" as mentioned above.

In a worst case scenario, rely on what the system provides, and
don't try to override those defaults without good reasons and
sufficient precaution (like a statically linked /bin/bash for
example). There is almost nothing worse than a system that
successfully boots into single user mode, but then surprisingly
cannot start a shell... ;-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>