1

I'm trying to mount a hfsplus-formatted disk on Ubuntu but so far without success. The disk could be read without problems but I could not write to it. I've tried the command sudo mount -t hfsplus -o force,rw /dev/sdXY /media/mntpoint to enforce rw but this didn't work

Also the start of the device also looks weird. Although I've left 1M in the front while creating disk partition using Gparted.

Is it possible that I did not partition the disk right?

$ 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

2 Answers 2

1

UPDATE:

Actually exFat works perfect for both linux and os X. Wasted so much time. The above solution needs me to add new user in virtual box so that I can switch uid for my working user account. Somehow that it's a problem.

2
  • 1
    Please combine your two answers into one answer by editing the first answer.
    – karel
    Aug 3, 2015 at 8:20
  • To me, the package hfsplus is not reliable. Jul 30, 2018 at 10:03
0

Seems that the disk has a EFI GPT partition table instead of MBR table, which is not supported by fdisk, so the fdisk would only show a placeholder partition (1 - the greatest size). The command to view the partition is actually parted /dev/sda print.

Then the actual start/end/size of the partition would be shown. Yet after mounting the disk is not enabled for write permission unless sudo write is used. The UID needs to be changed to 501 to enable write permission.

Resources:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .