On my Mac (macOS Sonoma 14.5), I have created a symlink file in the root directory (/
) a long time ago. I just noticed that it must have been moved from Mac to Mac by the Migration Assistant, so that it is still there, but now protected in a way that I cannot remove it any more.
I tried
- boot to recovery mode
- disable SIP (
csrutil disable
) - boot back into macOS
Trying to remove the symlink file, this got refused because the file system is read-only. So I tried
sudo mount -uw /
which I had found somewhere on the web, but then got
mount_apfs: volume could not be mounted: Permission denied
mount: / failed with 66
In recovery mode, the symlink is not visible, so I can't do anything from there. It seems it's merged somehow into the root directory only when booting into macOS, but I don't know where it comes from then.
I'm stuck there - what else can I do to get rid of the old symlink file?
Note that there are similar questions, but they are old and their answers don't seem to work any more on a modern sealed macOS boot volume, so I decided to ask a new question.