Can't mount HFS+ drive, bad superblock?
Solution 1
just for the records, here is the way I found to mount a Mac disk image created with dd.
1) Get the start and sector size
fdisk -l /path/to/image.dd
You get X for start and Y for size.
2) mount the partition
mount -t hfsplus -o ro,offset=$((512*X)),sizelimit=$((512*Y)) /path/to/image.dd /mnt/macMount
It's a mix of solution that I found. Hope this would help someone.
Solution 2
Not a direct solution, but if you have destroyed HFS+ partition you may want to take a look at hfs+rescue. It would allow you to get the files even with broken partition. It even works nicely on ubuntu!
Unlike photorec it also provides filenames and directory structure.
Solution 3
Can't mount HFS+ drive, bad superblock?
More frequent than not, this error means you are trying to mount the whole drive rather than just the HFS+ partition.
Run this command to show you which partition you should mount:
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
example output: sda
├─sda1 vfat 300M EFI
|
└─sda2 hfsplus 100G VolumeName
So don't mount sda, but mount sda2 in that example.
If you are looking at how to write to an HFS+ partition, I have a guide posted here:
Related videos on Youtube
phandolin
Updated on September 18, 2022Comments
-
phandolin over 1 year
My Macbook (Snow Leopard OS) was giving me the rainbow wheel of death so I tried booting into safe mode and repairing the disk, with no luck. So I decided to pull the drive out and plug it into my Ubuntu 12.04 desktop with a SATA to USB cable to recover some data before reinstalling the OS. I'm having a lot of trouble trying to mount the drive. I have installed hfsplus hfsprogs and hfsutils and run the following command.
sudo mount -t hfsplus /dev/sdd1 /mnt/"AppleMount"
Which gives me this error.
wrong fs type, bad option, bad superblock on /dev/sdd1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
Running dmesg tells me this.
[39666.815423] end_request: critical target error, dev sdd, sector 536 [39666.815429] Buffer I/O error on device sdd1, logical block 62 [39670.526393] sd 6:0:0:0: [sdd] Unhandled sense code [39670.526397] sd 6:0:0:0: [sdd] Result: hostbyte=invalid driverbyte=DRIVER_SENSE [39670.526402] sd 6:0:0:0: [sdd] Sense Key : Medium Error [current] [39670.526407] sd 6:0:0:0: [sdd] Add. Sense: Unrecovered read error [39670.526412] sd 6:0:0:0: [sdd] CDB: Read(10): 28 00 00 00 02 18 00 00 08 00 [39670.526422] end_request: critical target error, dev sdd, sector 536 [39670.526427] Buffer I/O error on device sdd1, logical block 62 [39763.562415] hfs: unable to find HFS+ superblock
So I think I'm stuck at this point. Can anyone guide me in the right direction? Thank you!
-
lesolorzanov about 2 yearswould be nice to know if this works with dmg or img