Need help backing up Apple HDD from command-line

Looney

Lifer
Jun 13, 2000
21,941
5
0
I have a Macbook that won't boot into the OS, not even safe-mode. Disk Utility won't image the drive either, i get an error when i try.

But i can boot to command-line with Apple-S, so i'm at what looks like a bash shell.

I also have a Firewire drive connected to the Macbook that i want to back up the data to.

I'm not familiar enough with bash to know what to do here. I have to mount the Firewire drive right? And then what would i use to copy the drive to the Firewire external drive?
 

TheStu

Moderator<br>Mobile Devices & Gadgets
Moderator
Sep 15, 2004
12,089
45
91
Do you have another Mac available?

Someone else will come along and give you the terminal commands to use, but if you have another Mac, then you can either pull the drive and plug it into the other Mac, or just boot the MacBook in Target Disc Mode.
 

lokiju

Lifer
May 29, 2003
18,536
5
0
What year/model or version of OS X is on it?

Can you boot from the install disc or just hold down Alt(option) on power on before grey screen and get to the recovery options?

if you don't have a newer model that has the recovery in the EFI/firmware then you'll need to do the install disc for this.

Once you boot up from either option, go to disk utility and simply click the New Volume icon. Then select your "dead" hard drive as the source and the external drive you want to copy it to as the destination. It'll create a DMG file you can mount once you get the drive replaced and the OS reinstalled.

You can then copy everything off of it.
 

Looney

Lifer
Jun 13, 2000
21,941
5
0
No other Macs available. But how would i pull the drive from a Macbook anyways? Aren't they sealed tight and opening it up voids the warranty?

And i already said i tried Disk Utility and i get a input/output error when i try to back it up.
 

Tyranicus

Senior member
Aug 28, 2007
914
6
81
No other Macs available. But how would i pull the drive from a Macbook anyways? Aren't they sealed tight and opening it up voids the warranty?

That applies only to the MacBook Air and the retina MacBook Pro. The hard drive is a user-replaceable part in all other Apple laptops.

One program that should be able to help you, although it is a bit pricey, is DiskWarrior. I've used that in the past to repair disks that Disk Utility can't fix.
 

vailr

Diamond Member
Oct 9, 1999
5,365
54
91
Do you have a bootable OSX installation disc (or equivalent: OSX USB thumb drive)?
Then use Disk Utility's repair disk/permissions utilities while booted from the OSX installation DVD.
 

Tyranicus

Senior member
Aug 28, 2007
914
6
81
Do you have a bootable OSX installation disc (or equivalent: OSX USB thumb drive)?
Then use Disk Utility's repair disk/permissions utilities while booted from the OSX installation DVD.

I would assume that's how he was running Disk Utility, since he can't boot into the GUI.
 

Looney

Lifer
Jun 13, 2000
21,941
5
0
Well, apparently i'm getting the same input/output error with ditto as well. But it seems like we do have a copy of DiskWarrior, i just have to track down who has it so i can use it! Thanks for all the help!