在linux中访问macos 下的分区。

花钱的解决方案是找专业的:   Paragon Software 

他们家有各种套件,让你在window Linux 都能访问到苹果分区里面的内容。

但是Windows删除了它的驱动之后一开机就蓝屏。。。ps:因为怎么都卸载不掉它,fxxk。

 

下面是免费的方案:

 

Hfs+ 文件系统:

Ubuntu下:

1
2
3
4
5
sudo add-apt-repository universe
sudo apt-get update
 
sudo apt-get install hfsprogs
sudo fsck.hfsplus -f /dev/sda2 #即可

  

之后mount -t hfsplus /dev/sda2 /mnt 就可以访问了。

APFS 文件系统:

Ubuntu下:

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo apt update
sudo apt install fuse libfuse-dev libicu-dev bzip2 libbz2-dev cmake clang git libattr1-dev
 
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
 
mkdir build
cd build
cmake ..
make
#如果出错了。说找不到 fuse3/fuse.h 你就要手动关闭 fuse3

报错信息:

[ 89%] Building CXX object CMakeFiles/apfs-fuse.dir/apfsfuse/ApfsFuse.cpp.o
/home/makeit/gitbase/apfs-fuse/apfsfuse/ApfsFuse.cpp:31:10: fatal error: fuse3/fuse.h: 没有那个文件或目录
#include <fuse3/fuse.h>
^~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/apfs-fuse.dir/build.make:62: recipe for target 'CMakeFiles/apfs-fuse.dir/apfsfuse/ApfsFuse.cpp.o' failed
make[2]: *** [CMakeFiles/apfs-fuse.dir/apfsfuse/ApfsFuse.cpp.o] Error 1
CMakeFiles/Makefile2:143: recipe for target 'CMakeFiles/apfs-fuse.dir/all' failed
make[1]: *** [CMakeFiles/apfs-fuse.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

 

编译出错才需要做下面操作的

1
2
3
4
5
6
sudo apt install 'cmake-curses-gui/bionic'
ccmake ..
#然后吧 fuse3 的选项关闭 ON 变为OFF   按空格切换
#在按c键 重新配置
#在按g键 生成并退出
make

  

 

编译好的程序复制到bin目录下

1
sudo cp apfs-* /usr/local/bin

  

sudo fdisk -l 或其它方式 找到自己的 macos 分区

执行挂载命令

1
sudo apfs-fuse -o allow_other /dev/sda2 /mnt

 

 

 

 

 

enjoy it!

posted @   lvusyy  阅读(1763)  评论(0编辑  收藏  举报
编辑推荐:
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
阅读排行:
· DeepSeek 解答了困扰我五年的技术问题。时代确实变了!
· PPT革命!DeepSeek+Kimi=N小时工作5分钟完成?
· What?废柴, 还在本地部署DeepSeek吗?Are you kidding?
· 赶AI大潮:在VSCode中使用DeepSeek及近百种模型的极简方法
· DeepSeek企业级部署实战指南:从服务器选型到Dify私有化落地
点击右上角即可分享
微信分享提示