1

Edited

What i want to Do : Run ubuntu via a DVD-r on an iMac to retrieve data, because a system file has corrupted

What I've Done: Put the ubuntu disk in my working Macbook Pro to try retrieving data off of it.

What i did to get the error below: tried to Mount and read my Macbook Pro HDD while running (not installed) ubuntu

`Error mounting /dev/sda2 at /media/ubuntu/Corbans MBP: Command-line `mount -t "hfsplus" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda2" "/media/ubuntu/Corbans MBP"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so`

I Tried on my Macbook Pro and not the iMac because i have the Pro with me. the iMac is elswhere, and i wanted to experiment with how it would work

so if there is a way around this, id appreciate any help i can get

Try to make your answer or fix as simple as possible please =)

Thanks in Advance

  • I'm sorry but I really can't understand your question. Could you edit your answer to make some parts clearer? State clearly what you are trying to do. How far you got. When exactly do you get that error. It's also best to put the error in a code block (in the editor, select the text and click on <$>) – Merlijn Sebrechts Dec 30 '14 at 18:35
  • Already answered? http://askubuntu.com/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os – Idaho06 Dec 30 '14 at 18:36
  • Edited, let me know if i need to explain anything further, and ill gladly try my best to do so. sorry for any confusion. – Sudzy1225 Dec 30 '14 at 18:46
  • That might answer my question, but is more advanced than i am. So if there is an easier guide, that would be awesome – Sudzy1225 Dec 30 '14 at 18:53
  • Thanks, much better now! I'll try to give an easy solution – Merlijn Sebrechts Dec 30 '14 at 20:13

1 Answers1

3

Read the drive

So first of all, to be able to read mac drives in Ubuntu you need hfsprogs.

sudo apt-get install hfsprogs

NOTE: if you get an error like E: Unable to locate package hfsprogs then you may need to enable the universe repository - see How do I enable the universe repository?

When this is installed, you should be able to open the drive with the file explorer (nautilus), just by clicking on the drive.

However, in your case, the disk is probably damaged. Ubuntu can try to fix some things, but there is no guarantee this will work, and it is a lot trickyer.

Fix the drive

Run the following command (replacing XY with the correct device) to fix the drive:

sudo fsck.hfsplus -f /dev/sdXY

Replace XY with the correct device. From your error message, I gather it is sda2, although it might be different on your iMac

If this doesn't fix your drive, I think it's hopeless. If the system files are corrupted, that means the drive is dying really fast. It could already be to late...

Merlijn Sebrechts
  • 7,394
  • 1
  • 42
  • 70
  • ok, when i put in the first command, i get : 'Reading package lists... Done Building dependancy tree Reading state information... Done E: Unable to locate package hfsprogs' – Sudzy1225 Dec 30 '14 at 20:50
  • @Sudzy1225 what version is the Ubuntu disk that you are using? – steeldriver Dec 30 '14 at 21:32
  • 1
    @Galgalesh I think it may be necessary to enable the universe repository in order to get hfsprogs (so it might be easier via Software Center / Synaptic) – steeldriver Dec 30 '14 at 21:33
  • @steeldriver feel free to edit my answer, otherwise I will change it tomorrow. – Merlijn Sebrechts Dec 30 '14 at 21:57
  • @Galgalesh thanks, I have added a note with a link to instructions for enabling the repository – steeldriver Dec 30 '14 at 22:15
  • @steeldriver Im running 14.04.1 – Sudzy1225 Dec 30 '14 at 23:07
  • @Sudzy1225 OK that's good - just checking you weren't trying to install the package from an unmaintained repo. Did the updated instructions (enabling the universe repository) help? – steeldriver Dec 30 '14 at 23:09
  • @steeldriver I got the repositories downloaded and updated, but I'm getting the same error still when i try to open the Macbooks hard drive – Sudzy1225 Dec 30 '14 at 23:42
  • Error mounting /dev/sda2 at /media/ubuntu/The OSx Brain: Command-line `mount -t "hfsplus" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda2" "/media/ubuntu/The OSx Brain"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so – Sudzy1225 Dec 30 '14 at 23:43
  • @Sudzy1225 did you run the sudo apt-get install hfsprogs command again after adding/updating the repositories? – steeldriver Dec 30 '14 at 23:45
  • @steeldriver I Did. I think i ran 3 commands total. 1 was the repository command, 2 was the update repository command, and then 3, the "hfsprogs" command. All of which went threw without issue, or error. But i still cant access the internal HDD – Sudzy1225 Dec 30 '14 at 23:56
  • @Sudzy1225 TBH I'm not sure exactly which hfs package contains the mount commands: in the absence of @Galgalesh I can only suggest trying sudo apt-get install hfsplus as well – steeldriver Dec 30 '14 at 23:56
  • You can download and install the HFSprogs .dev package directly from the site: https://packages.ubuntu.com/search?keywords=hfsprogs – rcruz Jan 07 '21 at 19:29