Ubuntu – Unformatted Seagate SATA 3.5″ internal hard disk external enclosure to recover data

hard drivesataUbuntuusb

I used to have a desktop which was running on a 160GB internal hard drive. I moved cities, so I ditched the desktop and took out just my internal to the new place. The disk has Ubuntu 12.04 installed as the OS.

It's a Seagate SATA 3.5" internal drive and it has a lot of important data which I would like to recover now. So, I bought an external enclosure (Rocketfish) and even though on Windows, I can see it on Device Manager, the drive doesn't show up. I can't see it at all on my Laptop (which runs Ubuntu 14.04). Rocketfish suggests that I format and repartition the drive to be able to use it, but that's not what I want to do. I want to be able to access the data in the internal disk.

Since I don't want to format it, I'm looking for options which will help me access the data as it is. Should I be looking for more external enclosure options or adapters which will help me do this? Or will all of them require me to format the disk? What else is possible?

The hard drive is in perfect working condition. I used it just a few weeks back when it was on my desktop.

Best Answer

  • It's possible that your enclosure for your hard drive isn't passing information about the hard drive correctly.

    You didn't indicate what product your enclosure was, but I think it was this Rocketfishâ„¢ - 3.5" Serial ATA Hard Drive Enclosure:

    http://www.rocketfishproducts.com/products/computer-accessories/RF-HD3035.html

    In the product description, the enclosure offers two additional USB ports, a memory card reader, and a kind of button that magically takes backups. These aren't standard USB mass storage device features, which means that you might need additional drivers to support this enclosure. (Most proprietary drivers are written for Windows, unfortunately, which doesn't help your Linux-formatted drive.)


    Troubleshooting

    Determining how the USB device is recognized

    We can determine definitively whether Linux can work with this enclosure.

    1. Unplug your enclosure's USB cable.
    2. Since you are on Ubuntu, run this command to get a live stream of kernel messages: sudo tail -f /var/log/syslog
    3. Plug in your USB enclosure.
    4. Look for "kernel" messages with "usb" following on the same line.

    Example output:

    deltik@workstation [~]# sudo tail -f /var/log/syslog
    Jun  9 03:38:19 workstation kernel: [16197.624834] usb 1-4: new high-speed USB device number 13 using xhci_hcd
    Jun  9 03:38:19 workstation kernel: [16197.753643] usb 1-4: New USB device found, idVendor=0000, idProduct=0000
    Jun  9 03:38:19 workstation kernel: [16197.753647] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Jun  9 03:38:19 workstation kernel: [16197.753649] usb 1-4: Product: NA
    Jun  9 03:38:19 workstation kernel: [16197.753651] usb 1-4: Manufacturer: NA
    Jun  9 03:38:19 workstation kernel: [16197.753653] usb 1-4: SerialNumber: 20030775011600033F73
    Jun  9 03:38:19 workstation kernel: [16197.754266] usb-storage 1-4:1.0: USB Mass Storage device detected
    Jun  9 03:38:19 workstation kernel: [16197.754488] scsi host3: usb-storage 1-4:1.0
    Jun  9 03:38:19 workstation mtp-probe: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4"
    Jun  9 03:38:19 workstation mtp-probe: bus: 1, device: 13 was not an MTP device
    Jun  9 03:38:20 workstation kernel: [16198.755022] scsi 3:0:0:0: Direct-Access     NA       NA               1.26 PQ: 0 ANSI: 5
    Jun  9 03:38:20 workstation kernel: [16198.755445] sd 3:0:0:0: Attached scsi generic sg2 type 0
    Jun  9 03:38:20 workstation kernel: [16198.756638] sd 3:0:0:0: [sdc] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
    Jun  9 03:38:20 workstation kernel: [16198.757620] sd 3:0:0:0: [sdc] Write Protect is off
    Jun  9 03:38:20 workstation kernel: [16198.757622] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
    Jun  9 03:38:20 workstation kernel: [16198.757855] sd 3:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    Jun  9 03:38:20 workstation kernel: [16198.766125]  sdc: sdc1 sdc2
    Jun  9 03:38:20 workstation kernel: [16198.768140] sd 3:0:0:0: [sdc] Attached SCSI removable disk
    

    The above output shows that a "USB Mass Storage device" was detected, meaning that the device could be used as a flash drive, almost exactly like an internal hard drive.

    If your output doesn't look like the above, then most likely, you won't be able to interface with the enclosure.

    Here's a different example showing a device being recognized as a keyboard:

    deltik@workstation [~]# sudo tail -f /var/log/syslog
    Jun  9 03:33:45 workstation kernel: [15922.756034] usb 1-4: new low-speed USB device number 11 using xhci_hcd
    Jun  9 03:33:45 workstation kernel: [15922.944965] usb 1-4: New USB device found, idVendor=1050, idProduct=0010
    Jun  9 03:33:45 workstation kernel: [15922.944972] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    Jun  9 03:33:45 workstation kernel: [15922.944975] usb 1-4: Product: Yubico Yubikey II
    Jun  9 03:33:45 workstation kernel: [15922.944978] usb 1-4: Manufacturer: Yubico
    Jun  9 03:33:45 workstation kernel: [15922.945174] usb 1-4: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    Jun  9 03:33:45 workstation kernel: [15922.948270] input: Yubico Yubico Yubikey II as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:1050:0010.0006/input/input26
    Jun  9 03:33:45 workstation kernel: [15923.004567] hid-generic 0003:1050:0010.0006: input,hidraw3: USB HID v1.11 Keyboard [Yubico Yubico Yubikey II] on usb-0000:00:14.0-4/input0
    Jun  9 03:33:45 workstation mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4"
    Jun  9 03:33:45 workstation mtp-probe: bus: 1, device: 11 was not an MTP device
    

    Determining if the USB device can be used for block storage

    If the kernel log shows that you can use the Rocketfish enclosure as a storage device, then follow these steps:

    1. Unplug the USB cable from the enclosure.
    2. Run this command: cat /proc/partitions
    3. Plug in the USB cable again.
    4. Run this command again: cat /proc/partitions

    If the USB device was recognized as block storage, then you will see at least one new line added to the output from cat /proc/partitions.

    If not, then unfortunately, the kernel doesn't support your Rocketfish device, and my only recommendation for you left would be to get a new, simpler enclosure that doesn't have any extra fancy features.

    If the enclosure is recognized as a block device...

    There might be some hope, but I wouldn't recommend trying to interface with the drive through the Rocketfish enclosure because the enclosure is returning data about the hard drive in an unusual way that could lead to data corruption if you try to use it.