在linux中访问macos 下的分区。

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

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

可是Windows删除了它的驱动以后一开机就蓝屏。。。ps:由于怎么都卸载不掉它,fxxk。macos

 

下面是免费的方案:bash

 

Hfs+ 文件系统:ionic

Ubuntu下:ui

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 就能够访问了。spa

APFS 文件系统:blog

Ubuntu下:ip

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 

报错信息:ci

[ 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!

相关文章
相关标签/搜索