我有一台双启动的 OSx 10.11.4 El Capitan 和 Ubuntu 17.04 机器。Ubuntu 无法挂载或读取 HFS+ 分区,该分区在从 OSx 的先前版本升级时已更改为 Apple Core Storage。
我尝试了其他地方提出的方法;使用 TestDisk 计算分区的大小,然后使用该大小限制进行挂载:
sudo mount /dev/sda2 -t hfsplus -o ro,sizelimit=99349995520 /media/john/Macintosh\ HD/
但那没有用。
TestDisk 的输出看起来有些混乱:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org
Disk /dev/sda2 - 99 GB / 92 GiB - CHS 12078 255 63
The harddisk (99 GB / 92 GiB) seems too small! (< 197 GB / 184 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...
The following partitions can't be recovered:
Partition Start End Size in sectors
Mac HFS 32506717 225824604 193317888
Mac HFS 32509088 225826975 193317888
Mac HFS 32509450 225827337 193317888
Mac HFS 37794538 231112425 193317888
Mac HFS 37795008 231112895 193317888
Mac HFS 47884256 241202143 193317888
Mac HFS 66287730 259605617 193317888
Mac HFS 66290352 259608239 193317888
Mac HFS 193317884 386635771 193317888
[ Continue ]
HFS+ blocksize=4096, 98 GB / 92 GiB
然后是一长串分区列表,但实际上应该只有一个:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org
Disk /dev/sda2 - 99 GB / 92 GiB - CHS 12078 255 63
Partition Start End Size in sectors
P Mac HFS 3068371 3523578 455208
P Mac HFS 3532137 3919232 387096
P Mac HFS 19672082 20135673 463592
P Mac HFS 35261920 35266959 5040
P Mac HFS 35722612 35727651 5040
P MS Data 38833644 38838315 4672 [NO NAME]
P MS Data 54286448 54291119 4672 [NO NAME]
P Mac HFS 57141877 57606636 464760
P MS Data 70557232 70561775 4544 [NO NAME]
P MS Data 75463104 75467647 4544 [NO NAME]
P MS Data 81491476 81496019 4544 [NO NAME]
P MS Data 81822352 81827023 4672 [NO NAME]
P MS Data 82479724 82484395 4672 [NO NAME]
P MS Data 88272720 88277263 4544 [NO NAME]
P Mac HFS 126793108 127257883 464776
P Mac HFS 160057997 160603188 545192
P Mac HFS 170316910 170862261 545352
P MS Data 191392340 191396883 4544 [NO NAME]
Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
P=Primary D=Deleted
Keys A: add partition, L: load backup, T: change type,
Enter: to continue
HFS+ blocksize=4096, 233 MB / 222 MiB
我尝试计算从开始到结束扇区的实际扇区大小为 4096 字节,但这表明该大小太大了。512 字节大约是正确的大小,但没有用:
$ dmesg | tail
[ 5166.088902] hfsplus: unable to find HFS+ superblock
[ 5268.134439] hfsplus: invalid secondary volume header
[ 5268.134441] hfsplus: unable to find HFS+ superblock
[ 6464.570205] testdisk: sending ioctl 30d to a partition!
[ 6464.570208] testdisk: sending ioctl 2285 to a partition!
[ 6464.570224] testdisk: sending ioctl 31f to a partition!
[ 6464.570225] testdisk: sending ioctl 31f to a partition!
[ 7845.081895] perf: interrupt took too long (3939 > 3925), lowering kernel.perf_event_max_sample_rate to 50750
[ 9071.727354] hfsplus: invalid secondary volume header
[ 9071.727355] hfsplus: unable to find HFS+ superblock
如何计算分区的正确最大大小?或者有没有直接挂载它的方法?