Date: Wed, 1 Feb 2017 21:16:31 +0100 From: Polytropon <freebsd@edvax.de> To: byrnejb@harte-lyne.ca Cc: freebsd-questions@freebsd.org Subject: Re: Variable assignment in sh Message-ID: <20170201211631.a65c3b9b.freebsd@edvax.de> In-Reply-To: <84861d4906923faec222f96580833c2f.squirrel@webmail.harte-lyne.ca> References: <b831bd9e40321e59910ea8913c7a6302.squirrel@webmail.harte-lyne.ca> <20170131161824.a9f1ef46.freebsd@edvax.de> <b553c644fccc211f9658b31cfe65e8a0.squirrel@webmail.harte-lyne.ca> <20170131185103.7f911dfb.freebsd@edvax.de> <5f51e2c3bdb8a20c6a7786c2b345c957.squirrel@webmail.harte-lyne.ca> <20170131200143.00c5e5da.freebsd@edvax.de> <84861d4906923faec222f96580833c2f.squirrel@webmail.harte-lyne.ca>
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... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170201211631.a65c3b9b.freebsd>