7

I know my question is very similar to many others on this site (ex. Mount single partition from image of entire disk (device)) but I have a slightly different problem during the mount of a single partition that is within a disk image (made with dd) of my MAC.

Before try to mount it, I list all the partitions inside my disk image and I read the offset of the partition. Then I try to mount the single partition with the following command and always get the same error:

sudo mount -t hfsplus -o loop,ro,offset=209735680 /media/dati/mac.dmg /media/mac

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

dmesg |tail
[ 8454.285256] hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.
[ 8512.103020] hfs: invalid secondary volume header
[ 8512.103027] hfs: unable to find HFS+ superblock

The strange thing is that if I try to mount the disk image on my friend's mac I can easily mount (with a double click on it) the disk image and access to all my files.

Could this be a problem caused by the unclean hfs+ filesystem? And how can I try to resolve it?

Thanks, Andrea

2
  • The key is that you have to turn off journaling on the filesystem.
    – Richard
    Nov 6, 2013 at 13:02
  • This could cause a problem if I want to mount the filesystem in rw mode. Otherwise the journaling is not a problem.
    – andrea123z
    Nov 6, 2013 at 13:47

1 Answer 1

8

I wanted to do the same and got the same issue with the method you used.

Here's another approach which I used successfully:

sudo losetup --find --show ./MacImage.img
/dev/loop9
sudo partprobe /dev/loop9
sudo mount /dev/loop9p2 /mnt/Mac-part-2

Hope this helps.

You must log in to answer this question.

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