Understanding Mount process (when system starts up)
Hi,
I'm trying to understand (and influence) the process of mounting disks when the the system starts up.
Having a MacMini (late 2012) with two internal disks which I just upgraded to Catalina (10.15.7, booting from a new external SSD).
That seems to work fine and when the sytem comes up it mounts the two internal disks as wanted. But what I'm trying to achieve is to mount an additional external SSD automatically when the system starts up (i.e. without the need to login at the desktop. I usually just ssh to the machine if at all).
There is no problem to mount that SSD (journaled hfs) - either manually in a ssh session or automatically when login at the desktop.
Searching around in the WEB and in various man pages there are some hints using the fstab which would allow to do this and even use the Volume UUID and that would be handled by the "diskarbitrationd" (as
stated in the man pages for that daemon). But I don't get this working.
I used vifs to manipulate the fstab and added some entry there, like:
UUID=my-uuid-taken-from-diskutil-info-output /Volumes/MyVolume hfs
This entry doesn't make any difference, when booting, that SSD is not mounted. I still need to login. But in general the fstab has some impact. As soon as I added mount options in the fourth field this prevents to get the disk mounted at all. So it is not mounted when logged in and mounting manually (using diskutil) fails either.
I've noted that /etc is in fact a link to private/etc, so my guess is that /etc/fstab doesn't has any meaning when booting and that private fstab is considered (at least a bit) when login, but it doesn't understand mount options (nor the two other fields usually known in fstab).
And now the questions :-)
1. Is there any possibility to get an external disk mounted when the system starts up?
2. How to pass any mountoptions (besides the mount point) to "diskutil mount" ?
3. Haven't found another way to specify mount options, than using the mount command directly. But for that you need to determine the /dev/diskXXX entry first, create the directory and then doing the actual mount. (I have created a small script for that). But perhaps there is some other possibilty?
4. For the internal disks, is there any possibilty to change the mount options (lets say I want to add a nosuid or whatever)?
As a workaround for 1) I could use my script executed when the system comes up which probably would mean I need to create a launchd job .... haven't really looked into this yet.
Thanks in advance
Mac mini, macOS 10.15