Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Recover a dead hard drive using dd' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recover a dead hard drive using dd
Authored by: dgchichester on Mar 04, '05 12:19:48PM

Regarding:

The bs=512 designates block size, and the if=/dev/rXX# is the UNIX path to the actual disk device.

How would you determine the UNIX path to the disk device?

I have an old desktop drive that got hammered during the transition from System 9 to 10 some time back, and I've always held on to it in hopes of finding a way to "get at it." I can hook it up to a firewire case and plug it into my functioning system that way, but what would be the UNIX route for such a connection?

Thanks in advance.



[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: electricferret on Mar 04, '05 01:03:52PM
In OS X you can use the "disktool" command to find out what disks you have connected. Try
disktool -l
to get started. I don't know how you would do this on other Unixes - it varies by system, as does the disk naming convention.

[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: burro on Mar 06, '05 12:01:56AM

disktool lists them as

..
**Disk Appeared ('disk1s1',Mountpoint = '', fsType = '', volName = '')
..

the suggested command has a format

rXX#

Which one is it?
------------------------
PS. UNIX such a nice idea so sloppily implemented.



[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: hagbard on Sep 27, '06 02:06:17PM

disk1s1 !
another way to see this list is to type df, which lists all disks and their data usage. To see the data sizes in KBytes, type :
df -k
the first column is the reference you need.
To be more informative :
diskAsB means :
disk number A, partition number B



[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: burro on Mar 06, '05 12:11:14AM

disktool lists them as

..
**Disk Appeared ('disk1s1',Mountpoint = '', fsType = '', volName = '')
..

the suggested command has a format

rXX#

Which one is it?
------------------------
PS. UNIX such a nice idea so sloppily implemented.



[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: electricferret on Mar 07, '05 01:03:42PM
It depends on what OS you're trying to read the disk in, really. (See your sig for details. :))

On OS X, you use what disktool reports, but put a "/dev/" in front of it. FWIW, I found that I had to read the whole disk to get it to work, not just a single partition. YMMV. The full disk is the "diskX" name, and the individual partitions on it are the "diskXsY" names. All together, this means on OS X you're going to get a device path like:

/dev/diskX
The "rXX" device name is for the author's BSD system. On a Linux system, you'll get names like "hdaX". (And Sun and HP and every other system have yet other naming conventions.)

[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: peragrin on Mar 04, '05 01:07:37PM

I can't tell you the exact location of the unmounted drive. The easiest way is to hook it up to the enclosure and try to let OS X mount it. If it fails, You can use Diskutil to determine the /dev location of the drive.

There Is a commandline version of diskutil as well. just type man diskutil, into either the command line or google. If you are trying to figure out how to use a commandline tool and don't like man pages, you can use google to pull up html versions.

Just remember this creates one file the size of the formatted drive. so if it was 20gigs you have about a 20 gig file.

I never did a system 9 to OS X transition. I do know both used the same file system. So you have a good chance at getting data.

---
I thought once I was found but it was only a dream



[ Reply to This | # ]
Disk Utility
Authored by: lullabud on Mar 04, '05 01:48:19PM

When you open Disk Utility it gives you a list of physical disks attached to the computer and their related partitions. If you click on the physical disk and hit "Info" it will show you the "Disk Identifier", such as disk0, disk1, and so on The number increments as you attach more physical disks to the system. If you click on a partition you'll see that you get a Disk Identifier of disk0s3, disk0s4, or so on up with the second number. I don't know why it starts at 3, but it does, and it goes on up from there. (I just partitioned a disk into 6 partitions to check this.)

So, to apply this practically, you would plug in the disk that is corrupted and check its identifier in Disk Utility. If DU can read the partition table it will assign the "s#" to it, even if it can't mount it. You can then go into terminal and put this in place in the dd command listed in the hint.



[ Reply to This | # ]
Actually...
Authored by: lullabud on Mar 04, '05 01:56:06PM

The partitions seem to go up in odd numbers, and the disks aren't always consecutive. I have 4 disks attached right now and they are 0, 1, 3, 4. At any rate, the way to find the information is right.



[ Reply to This | # ]
Recover a dead hard drive using dd
Authored by: obiwan2u on Mar 07, '05 01:30:10AM
dgchichester asked:
How would you determine the UNIX path to the disk device?

The df command seems to list this info (see the left hand column, first row of data):


Filesystem    512-blocks      Used    Avail Capacity  Mounted on
/dev/disk0s5   120093120 108689400 10891720    91%    /
devfs                193       193        0   100%    /dev
But I'm not sure if this is the right device name. When I try and copy from it using dd, I get a "device busy" error.

Do I have to boot from a CDROM to make a disk image copy of my normal boot disk?

PublicMailbox at benslade dot.com

---
Put 030516 in the email subj to get mail thru to me.

[ Reply to This | # ]

Recover a dead hard drive using dd
Authored by: TyHuffman on Jul 10, '05 08:42:25PM

Go to the Apple, upper left hand corner and select the about this Mac from the menu. When it pops up select more info... there you will see all of the different hardware buses or interfaces, for a HD select ATA, look for the Mount point towards the bottom. FireWire is the same way, you will see all of the attached devices and they will have a mount point. That is where you will find the address which is the Mount Point.



[ Reply to This | # ]