Posted on:
13th July 2008 by
Kismat in
HowTo,
MacOSX
Note: This guide applies to all Mac OSX systems be it a laptop or a desktop.
In my previous post I mentioned that my MacBook Pro’s hard drive got toasted. And I pondered several ways of fixing it. In the end I’m going to play it safe, and recover the data the good’ol’fashioned way. And to save you the trouble, Im gonna show you how to do it, in case you ever have the need to.
Here is what you’ll need to pull this off:
- Force Eject any mounted CD’s (Hold mouse button then power on)
- An External USB Drive
- Patience =)
Ok so once you have ejected your CD-Rom (if any was present), make sure you disconnect all accessories such as your HSDPA card, wireless mouse, etc..
Phase 1 :: Booting Into Single User Mode.
- Power off your Mac
- Connect your external USB drive (Not sure if firewire drives work)
- Power on your mac after the startup tone, hold “Command + S”; this will boot you into single user mode.
- Once you see the root prompt were ready to proceed.
Phase 2 :: Creating a backup directory
- type “mkdir /Volumes/Backups” (If you get a msg that says something about a read only filesystem, then type “mount -uw /” then run “mkdir /Volumes/Backups” )
- *** Here is the tricky part: Identify the name of your external drive: check in your /dev directory to see the name of your external drive by typing “cd /dev” then “ls” : most likely disk0 is your internal drive and disk1 your external drive : s123etc. relates to your partitions on those drives). My external drive was /dev/disk1s3, however it could differ on your system.If your External drive is fat32 type “mount -t vfat /dev/yourexternaldrive /Volumes/Backups”If your external drive is HFS type “mount_hfs /dev/yourexternaldrive /Volumes/Backups”** my external drive was named /dev/disk1s3 and its formated for mac so its HFS hence I typed:
“mount_hfs /dev/disk1s3 /Volumes/Backups” Basically what your going to do next is copy any
date you need to a path named /Volumes/Backups which pretty much ends up copying it your USB
drive, cause we mounted the drive under that name. Think of it like the D drive on windows. The D drive is assigned to a partition. Same thing on Mac OSX. Please note that filenames and Directory names are “CaSE Sensitive” so Backup does not equal backup. Make sure you get those names right.
- Then, browse your internal drive with the command “cd”; example “cd /users/your_username”
- Copy all files under your current directory;
cp -Rv * /Volumes/Backups
cp means copy
-Rv means Recursive and verbose; this will copy all directories including sub-files and subdirectories the “v” will show the files being copied on the screen as its copying them. very handy if you want to see whats going on. Of course you could just copy a specific directory if you dont want to copy everything. cp -Rv /path/to/your/directory
- Once the copying is completed, you have to unmount the external drive before you disconnect it.
To do this type umount /Volumes/Backups
Thats it your done, you have safely copied your data to an external drive, before you replace your old hard drive I would recommend checking the backup 1st. Plug in your USB drive into another computer and make sure everything is ok. If it is… go ahead replace/re-format your bad drive.
If you need help, post a comment and Ill try to help out.
well done !
did disk warrior help in anyway (it rarely does)
I haven’t tried DiskWarrior yet, Im also gonna try Tech Tool 4 Pro.
Im just curious if those programs are worth their salt. The problem is, I dont have a second mac to create the Bootable Cds. So I might just take over a showroom mac for 15 minutes. *grins*
DiskWarrior could not have solved the problem. But Tech Tool 4 Pro, was able to accurately point out that the drive had one bad block, and it recommended a data back up followed by immediate replacement. Done and Done. =) Cheers.