Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2020 13:16:40 +0000
From:      Grzegorz Junka <list1@gjunka.com>
To:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
Cc:        freebsd-pkgbase@freebsd.org
Subject:   Re: /root on a separate dataset breaks FreeBSD-base installation
Message-ID:  <4ee7d986-79ba-cae4-fc52-875e3de6d39d@gjunka.com>
In-Reply-To: <202004131856.03DIuCsQ032902@gndrsh.dnsmgr.net>
References:  <202004131856.03DIuCsQ032902@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Many thanks for the detailed explanation. I will assume that /root has 
to be on the same dataset as / and workaround any issues. I might test 
at some point if bsdinstall is able to unpack the base system in a jail 
if they are not on the same dataset when I get a chance just out of 
curiosity.

GrzegorzJ


On 13/04/2020 18:56, Rodney W. Grimes wrote:
>>> Here we disagree, I consider /root very much a part of the base
>>> system and it should be pretty much unused.  And I am a person
>>> that logs in as root and su -'s out to user accounts, but I
>>> still do not use /root as a normal home directory, everything
>>> else is done and stored some other place.
>>
>> Do you see /root as part of the base here
>> https://svnweb.freebsd.org/base/head/ ? ;-)
> Yes, at a few places, that pkg base has majorly moved stuff around
> and I am not going to hunt for it but etc/Makefile and etc/mtree/BSD.root.dist.
> ${DESTDIR}/root is created and populated during a make distribution.
>
>> Also look here https://www.freebsd.org/doc/handbook/jails-application.html
>>
>> /root is treated as editable part of the read-only base system, the same
>> way as /home
> editable != seperate vfs or zfs dataset.  Try it, I suspect the jail
> create fails with the same error that it can not cross link the files.
>
>>> The fact that it is shipped with the base system, created by the
>>> base system installer, and is pretty much a mandatory required directoy,
>>> however does make it very much part of the base system.
>>
>> We actually don't argue here if /root is part of a base system but if
>> it's reasonable for the installer to assume that /root is on the same
>> dataset as /.
> It is totally reasonable for it to assume that since the contents
> of / and /root are shipped in one tar ball, base.txz.
>
>> Based on the links I mentioned above, and on your comment, my
>> understanding is that /root is not part of the base system but it's
>> created and populated by the installer when installing the base.
> Yo have miss undertood my comments then.  It is populated by the
> installer when it extracts base.txz.
>
>> Is the
>> requirement that the /root dataset should be on the same dataset as /
>> mentioned anywhere in the official documentation? I couldn't find it
>> here
>> <https://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html#bsdinstall-part-shell>;
>> but it's also hard to search for due to root being a very common word in
>> various contexts. Certainly bsdinstall doesn't require /root to be on
>> the same dataset as /.
> Loack of documentation does not change the assumptions made by the
> base system.
>
>> If indeed there is no such existing requirement, then it would be
> As it exists today "there is a requirement that /root and / be
> in the same filesystem."  That requirement is why your getting
> an error.  That requirement goes back to BSD 4.3 or earlier.
>
>> something new that pkgbase is introducing. Which might be fine, but is
>> it reasonable?
> This is not something new that pkg base has introduced, this requirement
> has existed for > 2 decades.
>
>> I don't think so. Regardless if /root should be
>> considered part of the base system or not, I don't see any reason for
>> pkgbase or the FreeBSD's base system to require /root to be on the same
>> dataset as / apart from those two hardlinks discussed earlier.
> Yep, it is those 2 hard links that create the requirement,
> and the reasons behind them being hard linked are rather
> practical, it is so that when/if the system fails to single
> user and HOME becomes / the user has the same environment
> that they would had root loged in, sans having to manual
> pick a shell.
>
>>
>>>> It's home directory for the /root user,
>>>> where I often have larger files that I either copy to install or just as
>>>> a backup of some parts of the system.
>>> I would never store backup's in /root!
>>
>> Backup may mean different things. I don't mean backups of the system.
>> Consider a tarball of the kernel copied from another system that needs
>> to be unpacked to / or temporary copies of some configs that are being
>> edited, e.g. pf.conf or rc.conf. Where would you store those?
> Probably in /tmp, maybe in ~rgrimes, but defanitly not in /root.
>
>>>> Versioning it per boot environment
>>>> wouldn't make sense.
>>> Double edge sword.  The set of tweaks needed in .cshrc or .profile may
>>> vary by version of FreeBSD installed.
>>>
>> Well, I would assume that an administrator is free to edit .cshrc and
>> .profile for their own needs, e.g. add aliases or env variables. Once
>> changed they would no longer be updated with the system but skipped.
> Actually I believe the update process, especially pkg base knows how to
> do 3 way merges of files marked as conf.
>
>> There are always reference versions in / which the administrator should
>> consult and copy over any required changes after the system has been
>> updated.
> The files in / are NOT seperate versions, they are a second pointer
> to the same file contents.  Editing /.cshrc also changes /root/.cshrc.
>
>> GrzegorzJ



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ee7d986-79ba-cae4-fc52-875e3de6d39d>