|Apr 4, 2008, 02:03 AM||#1|
help -- copy to external via terminal?
The situation is this: I have a MacBook Pro, first generation. The internal hard drive has been damaged, and cannot boot the operating system (Mac OS X 10.5.2). Unfortunately, my last backup was not very recent, and I'm trying not to lose these files.
So my goal is to gain access to the hard drive, and copy everything on it to an external hard drive.
Note that the Firewire port on the machine is not working. Thus, any file transferring must be accomplished over USB or Ethernet. I also have access another Mac, if that would be of any assistance. Now let me throw you some ideas here. (For the record, I don't know if any of this will help, but it's worth a try.) I have booted the machine off the Leopard Install Disc. This now gives you access to several options:
Startup Disk. Disk Utility. Terminal. System Profiler. Network Profiler.
Something tells me Terminal might be able to make some magic happen. Unfortunately, I know nothing about the voodoo commands that can be issued in it to get this plan into action. I hear rumors about something called Single User Mode, however I know very little about it (other than, if entering the wrong command, erasing your drive).
So if anyone out there has any suggestion as to how to set this up, I'd appreciate it. Thanks.
MacBook Pro [First Generation] | 2.16GHz | 2GB RAM | 120GB HD | Mac OS X (10.6.4)
iPhone 4 | 32GB | Black (I couldn't wait for white any longer.)
|Apr 4, 2008, 02:24 AM||#2|
I assume you could just use the terminal to use some basic Unix commands such as copy (cp).
2012 rMBP 15" 2.6 Ghz, 16GB RAM, 512 GB SSD
2008 Mac Pro 8 core 2.8Ghz, 8800GT, 14GB RAM, 3TB
iPad 2 Black 64GB Verizon
2007 MBP 15" 2.4Ghz Glossy:4GB RAM
|Apr 4, 2008, 02:25 AM||#3|
I'm not 100% sure this will work... But here's some information that might get you started:
Disk drives are found in /Volumes. So an external HDD called "HDD" will be found in /Volumes/HDD (capitals matter in UNIX!)
So you might go about doing something like this...
[code]sudo cp /Volumes/"Macintosh HD" /Volumes/HDD[/quote]
That, in theory, should copy everything from your Macintosh HD folder/disk/directory (w/e you want to call it) and put it directly on your external HDD. I've never tried doing a whole disk backup with the terminal before, so I'm not sure how well it's going to work.
Something else you can do:
Use Disk Utility to make a disk image of your HDD.
1. Open up Disk Utility
2. Click your internal HDD on the left side bar
3. Click "New Image" on the top
4. Choose the location of your external HDD as the directory in which to save
5. Choose read/write for the Image Format (trust me on this, you don't want to do read-only)
6. Hit "Save," and it should do its magic.
"I have used a mac before. And they still don't have right click I mean come on. - aakar
|Apr 4, 2008, 03:01 AM||#4|
Don't bother copying system stuff over. Save your home directory before any more damage occurs to the disk.
cp -pr /Volumes/<name of your hard drive>/<your username> /Volumes/<backup drive>
Last edited by SC68Cal; Apr 4, 2008 at 03:10 AM.
|Jan 8, 2013, 01:09 PM||#5|
|Jan 8, 2013, 02:50 PM||#6|
RE: dd, ditto, ddrescue, ...
You might want to look into the Terminal "ditto", "dd", and "ddrescue" commands as possible substitutions for the "cp" command. The reasons being that "cp" will terminate when a file cannot be read while "ditto" will report the error to stderr and do its best to continue. (Yes, I know about the -R switch on cp, as in "cp -R", but in my limited experience ditto does a better job than cp.)
The "dd", or 'digital dump' or 'convert and copy' except that "cc" was already taken so "dd" was used instead, commands perform a lower level block copy of files/partitions/volumes, and thus may be used to recover corrupted files that cannot be recovered by other means. Why, "dd" can even be used to copy the boot sector of a hard drive and thus can be used to repair the MBR (Master Boot Record) on a Windows/Linux boot drive.
Another choice might be the "ddrescue" command which tries hard to rescue data when read errors are encountered. Personally, I use the "ddrescue" utility built from MacPorts on the Mac OS (Linuxes have their own versions). Speaking of which, I would also try to use a Linux to mount the damaged drive and then attempt the recovery using the Linux commands.
...just three other command possibilities to help in your attempt to recover your files from your corrupted hard drive...
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Copying external drives full of movies!||macwondering||Apple TV and Home Theater||2||Oct 15, 2011 12:09 PM|
|New help with copying files to MY Book||dlpphoto||OS X||2||Dec 3, 2010 06:56 AM|
|Fix Alias when Copying to External HD: Please Help||legaleye3000||OS X||0||Nov 28, 2010 08:52 PM|
|how not to lose my iPhoto 09 settings when copying to external HD||polythene pam||Mac Basics and Help||4||May 18, 2009 05:08 PM|
All times are GMT -5. The time now is 01:31 AM.