在 Ubuntu 上安装 hfsplus 磁盘时出现问题

在 Ubuntu 上安装 hfsplus 磁盘时出现问题

我正在尝试在 Ubuntu 上安装 hfsplus 格式的磁盘,但目前还没有成功。磁盘可以毫无问题地读取,但我无法写入。我尝试了sudo mount -t hfsplus -o force,rw /dev/sdXY /media/mntpoint强制执行 rw 的命令,但这不起作用

设备启动时也看起来很奇怪。虽然我在使用 Gparted 创建磁盘分区时在前面留了 1M。

是不是因为我没有正确对磁盘进行分区?

$ fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 4000.8 GB, 4000752599040 bytes
255 heads, 63 sectors/track, 486397 cylinders, total 7813969920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT

$ sudo mount -t hfsplus -o force,rw /dev/sdb1 /media/usb
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

$ dmesg | tail
[ 4203.926445] sd 6:0:0:0: [sdb] No Caching mode page found
[ 4203.926449] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4203.927753] sd 6:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 4204.528425]  sdb: sdb1
[ 4204.530422] sd 6:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 4204.541249] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 4553.297930] gpartedbin[3975]: segfault at ffffffffffffff89 ip 000000000047e703 sp 00007fff26fcf630 error 7 in gpartedbin[400000+125000]
[ 6100.293140] gnome-disks[3150]: segfault at 0 ip 00007f7a66f8049f sp 00007fff71e278a0 error 4 in libgio-2.0.so.0.4002.0[7f7a66ea0000+16c000]
[ 6235.192031] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[ 6875.096057] hfsplus: unable to find HFS+ superblock

答案1

更新:

实际上 exFat 非常适合 Linux 和 OS X。浪费了这么多时间。上述解决方案需要我在虚拟框中添加新用户,以便我可以切换工作用户帐户的 uid。不知何故,这是一个问题。

答案2

似乎磁盘具有 EFI GPT 分区表而不是 MBR 表,而 不支持该表fdisk,因此fdisk只会显示占位符分区(1 - 最大大小)。查看分区的命令实际上是parted /dev/sda print

然后将显示分区的实际开始/结束/大小。但是,挂载后,除非使用 sudo write,否则磁盘不会启用写入权限。需要将 UID 更改为 501 才能启用写入权限。

资源:

相关内容