Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I recently bought a new Mac which came with macOS Catalina (15.15) installed. I started to set it up the way I wanted to and came across an issue with symbolic links at the file system root (/). I was trying to create a symlink like this...
 Command
sudo ln -s /Volumes/Data\ HD/Personal /Personal


...which promptly gave me an error...ln: /Personal: Read-only file system.

It appears that since 15.15, the root file system is read-only and if you want to have symbolic links or custom mount points at the file system root, you have to use the /etc/synthetic.conf file to create them. From the synthetic.conf man page...
synthetic.conf provides a mechanism for some limited, user-controlled file-creation at /. The synthetic entities described in this file are synthesized by the kernel during early system boot. They are not physically present on the disk, but when the system is booted, they behave as if they were within certain parameters.


Using Terminal.app, I checked if the /etc/synthetic.conf file existed, it didn't in my case. That was ok because I could create it as long as I used sudo to get root privileges...
 Command
sudo vi /etc/synthetic.conf


Then I added the following contents to the file...
 /etc/synthetic.conf
Personal /Volumes/Data HD/Personal


Note the entries have to be TAB separated and the order of entries is symlink name, TAB, target path. Also note that in my case the path had a space in it, there is no need to escape this and if a backslash is used, the symlink will not work correctly - you have to use a literal path here.

Once the file and it's contents were created, I restarted my Mac and the symlink was there as expected...
synthetic_3.png




-i

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...