美文网首页
mac big sur 根目录无法新建文件夹问题

mac big sur 根目录无法新建文件夹问题

作者: 手打丸子 | 来源:发表于2021-10-29 21:48 被阅读0次

自从乔布斯死后,苹果就开始瞎搞,感觉是打算抛弃开发者了
和以前系统一样,正当我想要在 根目录创建个文件夹

mkdir data
mkdir: data: Read-only file system

提示没有创建,经过我百般尝试,网上各种关闭 sip 然后挂载硬盘为读写

sudo mount -uw /
mount_apfs: volume could not be mounted: Permission denied
mount: / failed with 66

都表示失败了

我最终也没有成功在根目录创建我的 /data

无奈之下,用了个其他的办法,在/System/Volumes/Data/创建data并映射为/data

具体步骤如下

# 1 创建文件 
sudo vim /etc/synthetic.conf

# 2 写入内容,  ‘<dir>⇥/System/Volumes/Data/<dir>’,其中: ⇥ 表示一个tab
data⇥/System/Volumes/Data/data
# 实际显示效果 data  /System/Volumes/Data/data 尤其注意中间是个tab

# 3 退出vim编辑,去/System/Volumes/Data/创建data文件夹
cd /System/Volumes/Data/
mkdir data
sudo chmod -R 777 data

# 4 重启机器并尝试

参考:
https://apple.stackexchange.com/questions/395508/can-i-mount-the-root-system-filesystem-as-writable-in-big-sur

https://learnku.com/articles/35207

相关文章

网友评论

      本文标题:mac big sur 根目录无法新建文件夹问题

      本文链接:https://www.haomeiwen.com/subject/wndwaltx.html