#Mounting one directory on another directory in MacOS ?

52 messages · Page 1 of 1 (latest)

weary tusk
#

Is there some way to mount one directory on another directory ?
Something similar to;
sudo mount -o bind /Users /System/Volumes/Data/home

Which would make all users appear in /System/Volumes/Data/home/<here>

( using Linux syntax as example )

drifting gorgeBOT
#

<@&1142976431584989255> Hey, a little help in here please.

weary tusk
#

The issue being; (from a different view, same issue)
A New installation of MacOS does have a symlink /home which points to /System/Volumes/Data/home (empty) (new sym-links here are not possible)

#

The /home sym-link is incorrect, it should be /home pointing to Users

river phoenix
#

Don't try to impose Linux constructs on macOS. It's not Linux.

weary tusk
#

Right, but /home is useless

river phoenix
#

It's there for some reason. Probably some bit of code somewhere checks for its existence or something.

#

Lots of stuff in Unix has grown up over the years that way

weary tusk
#

Is there some way of actually mounting one directory on another ?

#

Mounting /Users on /System/Volumes/Data/home would resolve all this

river phoenix
#

No, it woudl just cause more problems

weary tusk
#

In what way ?

river phoenix
#

the unix file structure isn't where everything is tracked, you know.

weary tusk
#

Multi-Mount not allowed ?

#

Just thinking, if MacOS doesn't use /home, it should not be an issue

river phoenix
#

If it exists, it exists for a reason.

weary tusk
#

just wished for sym-links in /System/.../home to be possible

#

that too woud resolve

river phoenix
#

resolve what?

weary tusk
#

having a working /home

#

the sym-link is installed by default

#

it's just not pointing to the right place

#

maybe it's possible to create new users using /home

river phoenix
#

it's pointing in the right place.

#

again, macOS isn't Linux.

#

/home is not the right place to put new users on Unix

weary tusk
#

actually not comparing with linux other than the remount command, which I can't recall how it is in BSD

river phoenix
#

And it shouldn't matter where $HOME is. scripts and anything else that need the home directory should use the well known env variables to reference it.

weary tusk
#

i.e. ~user/

river phoenix
#

avoid the use of the ~ construct in scripts etc.

weary tusk
#

so, finger user --> extract home ?

#

Hmmm, can't change the HOME for new users, in advanced settings

river phoenix
#

nope

#

it's always /Users/<username>

#

pretty sure there's a way to look it up in a portable fashion, just don't remember offhand.

weary tusk
#

I guess something like $(uname -s) == darwin ... then home is /Users/...

#

for scripts

river phoenix
#

that's probably the most portable way, yeah.

#

And one thing also to remember is that macOS uses a directory service for maintaining users, etc. even though some familiar files etc. might exist, that doesn't mean that they're actually used (or that changes you might make to them matter). Sometimes, config files on disk are generated by system services that actually own them just for compatibility with older tools that expect to be able to findn something somewhere.

weary tusk
#

Btw, is there some way to mount ext4 volumes ?

#

oh MacFuse

#

Oh, blocked, System Extension...

river phoenix
#

that's what I use

#

Heh. they should update the page title.

weary tusk
#

High Sierra ? heh

#

System Extension blocked...

weary tusk
#

Paragon didn't work for me, but MacFuse did

weary tusk
#

But at least I have the time machine running, had to set it up w/o password for the backup

#

ExFAT volume

weary tusk
#

Never mind, it was reformatted using APFS