TransWikia.com

Use an External USB SSD before logon (daemon)

Ask Different Asked on October 30, 2021

I noticed that after a system reboot my new USB SSD (SanDisk Extreme Portable SSD) attached via USB-C to an MacMini 2020 is not available until the first user has logged on (interactively using the GUI).

On this MacMini a daemon is running which requires access to the external USB drive directly after a reboot before any user has logged on (because this MacMini runs at server and therefore nobody ever will login).

What do I have to configure in Catalina to make my USB SSD available before the first user has logged on?

The daemon that should use the external SSD is started via registered plist in /Library/LaunchDaemons/ using the following flags:

<key>RunAtLoad</key><true/>
<key>UserName</key><string>myuser</string>
<key>SessionCreate</key><true/>

I have formatted the external SSD as APFS (case sensitive).

One Answer

Seems that MacOS has an option to do exactly what I need:

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool YES

Afterwards my external SSD is directly accessible by the daemon (if I wait some seconds because the daemon starts before the external SSD has been mounted). Additionally the external SSD is not accessible at all (independent of the user permissions). To finally get access I had to add my daemon (in this case the java executable) Full Disk Access in the MacOS security settings.

Answered by Robert on October 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP