81

After updating to macOS Catalina, all the folders I had saved in the root directory, "/", were missing.

I read that the system is now read-only, but didn't see a notice on where previous files have gone.

Are they on the system or do I need to restore them from backup?

plowman
  • 1,253
  • For more info: https://support.apple.com/en-us/HT210650 "About the read only system in Mac OS Catalina" – james-see Dec 20 '19 at 19:15

2 Answers2

75

This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.

I ended up moving the directories by running this command from the terminal:

cd "/Users/Shared/Relocated Items/Security"
sudo mv my-cool-directory ~/
# enter your system password when it asks you

After doing that, my file is then located in my home directory, e.g. ~/my-cool-directory

After a subsequent Mac OS X update, the files may be in /Users/Shared/Previously Relocated Items.

gerardw
  • 103
plowman
  • 1,253
22

You can use the file /etc/synthetic.conf to map your old folder to a new virtual folder on the root directory. If the file doesn't exists, just create it with sudo :

sudo nano /etc/synthetic.conf

Add the folder you want to use in the root directory, and the directory you want to mount on.

Ex:

my-cool-directory  /Users/Shared/Relocated Items/Security/my-cool-directory

Finish by rebooting your mac.

PS: Be careful with your synthetic.conf file. A colleague emailed the content of his file and it had a space between the virtual name and the path. Your system will simply power-off about 15 seconds into the boot process.

You must have only one tab character only between my-cool-directory and /Users/Shared/Relocated Items/Security/my-cool-directory.

You can find more infos with man synthetic.conf

nohillside
  • 100,768
JeromeM62
  • 321
  • 2
    This worked great, the tab between was definitely key! – james-see Dec 20 '19 at 18:55
  • I cannot find /etc/synthetic.conf on Catalina (10.15.4), though there is still a man page for it. Any idea where it went? – Scott Smith Apr 20 '20 at 23:53
  • 1
    @ScottSmith The file doesn't exist by default - if you want to use the firmlink functionality described you'll need to create the file from scratch. – mjturner May 05 '20 at 14:17