When you realize one of your (external) hard drives are making funny squeaky or ticking noise, it’s probably a good idea to start making backups. However if unfortunately you have ignored the engine light until one day you can no longer mount the drive, I hope this little guide can still save you. BTW, I use osx, so keep going if you are on the same page.
First open up a terminal. (What’s a terminal? um… ok, maybe you can stop now and ask one of your tech friends to help you out).
Issue “ls /dev/r*”. Basically, you just need to recognize a few items, say random, rdisk0, and rdisk1. The “s0”, “s1” suffices refer to the partition numbers.
Now plug in your hard drive. Make sure it’s connected.
If you issue “ls /dev/r*” again, you will discover a new rdisk, say rdisk2. If you see rdisk2s0, rdisk2s1, etc, then you are in a better shape. That means osx can still read the partitions. But if you only see rdisk2 alone, ah… let’s hope for the best. Keep moving.
Oh, at this point, you should have a folder somewhere for backing up your external hard drive. So, say /Users/your_name/my_HD_bak/ .
Then issue “dd bs=512 if=/dev/rdisk2 of=/Users/your_name/my_HD_bak/HD_bak.dmg conv=noerror,sync” . The noerror option just slides over the problematic hard stops during disk read, and sync option inserts nulls at that point. Change the “if” part accordingly, that’s your input file.
That command can be running fine, or can be stuck. To get a peace of mind, open up another terminal. Then do a periodic “ls -l /Users/your_name/my_HD_bak/HD_bak.dmg” to check for file size. If it’s growing, then you are in luck.
Notice that the command “dd” doesn’t check for the target disk space in advance. So you will need to make sure you will have enough free disk space for this operation.
If the dd command finishes, you can then double click on the HD_bak.dmg file to read your files.
Thank you for this post. When I issue ls/dev/r* I get a message “no such file or directory” any advice?
LikeLike
there is a space after “ls”. 😉
LikeLike