2

I'm having trouble trying to mount a filesystem. Basically, if I mount /dev/sdc1, it works perfectly. But if I mount /dev/sdc with a byte offset, it fails. The filesystem is HFS+ (formatted using an actual iMac).

root# fdisk -l /dev/sdc

Disk /dev/sdc: 320.1 GB, 320072932864 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142447 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63      128519       64228+  af  HFS / HFS+
root# mount /dev/sdc1 /mnt
root# echo $?
0
root# umount /mnt
root# mount --ro -o offset=32256,sizelimit=6576994 /dev/sdc /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop20,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so
root# dmesg | tail
[164258.208493] hfs: unable to find HFS+ superblock
[164398.983651] hfs: invalid secondary volume header
[164398.983654] hfs: unable to find HFS+ superblock
[164404.235785] hfs: invalid secondary volume header
[164404.235787] hfs: unable to find HFS+ superblock
[164407.461400] hfs: invalid secondary volume header
[164407.461404] hfs: unable to find HFS+ superblock

What the heck am I doing wrong here?

P.S. The offsets seem to match the output from fdisk, so that's not the problem.

EDIT Added fdisk output.

  • 1
    @TAFKA'goldilocks' Done. – MathematicalOrchid May 1 '14 at 15:10
  • It probably doesn't help, but the string "unable to find HFS+ superblock" appears on line 410 in fs/hfsplus/super.c in the kernel tree. (Yes, I'm reading the Linux kernel source code in a desperate attempt to find out what going on!) – MathematicalOrchid May 1 '14 at 15:33
0

This was broken in OpenSUSE 12.1, but when I updated my PC to OpenSUSE 13.1, the problem simply stopped existing. Weird, but true! Must have been a kernel bug or something...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.