在linux中访问macos 下的分区。

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

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

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

 

下面是免费的方案:

 

Hfs+ 文件系统:

Ubuntu下:

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下:

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

 

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

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

  

 

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

sudo cp apfs-* /usr/local/bin

  

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

执行挂载命令

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

 

 

 

 

 

enjoy it!

posted @ 2019-04-29 17:48  lvusyy  阅读(1604)  评论(0编辑  收藏  举报