New to linux, trying to recover data on IDE hard drive
Hey everyone, I'm new here but I'm glad I'm finally learning some of the basics of using Linux. Initially I installed it on my PC using Virtual box but instead decided to use dual boot instead on a lesser laptop in case I get too deep and essentially drown.
Right, so I was informed that I can use Linux to recover data on a HDD that is corrupt instead of a program on Windows i.e. stellar data recovery. I'm excited to learn from taking the steps on different guides and what not, but I've ran into a mild road block. The guide I followed told me to install smartmontools and testdisk, so I input the commands: Sudo apt-get install smartmontools And Sudo apt-get install testdisk They seem to have installed properly, though I don't know the entire functionality of smartmontools. Testdisk is pretty apparent from its name. While in terminal I next typed: Sudo fdisk -l And it gave me a bunch of disks. Disk /dev/loop0 Disk /dev/loop1 Disk /dev/loop2 Etc. I'm not sure what each of these "loops" are referring to, could someone fill me in? I could assume they are referring to the structure of the HDD, reserving the space for system files causing a 500gb HDD be only a 465gb HDD. Regardless, I've gotten a little sidetracked and here is the error I ran into. I am attempting to mount a recover data from a corrupt 250gb IDE HDD, WD Scorpio Blue. I am able to see the disk mounted reading: Disk /dev/sdb: 232.9 GiB, 250059350016 bytes, 488397168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0ed70dad Which is awesome (I think), I've identified the hard drive which shows unallocated space on disk mgmt in Windows. P.s. stellar data recovery didn't really work well at all. So as for this error I've been leading up to, the next command I typed in and what it told me is this: Sudo smartctl -i /dev/sdb /dev/sdb: Unknown USB bridge [0x0930:0xa002 (0x103)] Please specify the type with the -d option I went into Google and typed "Unknown USB Bridge Linux smartmontools" and it gave me a list of recognized and unrecognized USB bridges. I am actually using 2 adapters, one is converting the IDE into SATA and the next one is from an external HDD I bought around 2006 giving it USB capability. Neither of which I (obviously) noticed on the list of recognized bridges. So I am looking to find what USB bridge would be recognizable for this application, and any other tidbits of information you can fill me in on. Though I am new to Linux, my journey has just begun. Thanks! |
loop devices are not physical disks. They are images loaded into memory.
There are two ways to specify data sizes. 1KB = 1000 bytes in Scientific units. 1KiB (note the i) = 1024 in programmer shorthand, although this form is conventionally used for referring to memory rather than disk. So your 250 GB disk is also 232.9 GiB. The USB error is weird. I've never heard of an unsupported bridge. Can you post the output of lsusb? |
This is diving in the deep end - you will trip over lots of "basic" things trying to do a complex thing, the recovery. First up, LQ supports [code] tags for readability - use them and copy/paste command output so we can read them.
[code]output goes here[/code] looks like this: Code:
output - Linux has a help system called man, so man loop will tell what a loop device is (use q to quit any manpage). Basically you can ignore them, and no, they are not eating your disk space. That's another misunderstanding for another time maybe. - why are you using the IDE to SATA converter ?. If the external disk has direct USB use that alone. I have a bunch of old IDE disks I play with via a caddie and never have any issues - not that I recall using smartmon on them too often. - testdisk is best for recovering deleted partitions, not really data recovery. What are you after - the entire disk, or simply some files of interest ?. |
I do understand this is going to be a rather complicated process, and I have very little experience even using MS-DOS, though I have had many Android phones and rooted them with different programs, sometimes having to use cmd in windows.
The video I am using is by quidsup and here is the link https://www.youtube.com/watch?v=d1_rMHuUBOc Quote:
[code]Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0930:0227 Toshiba Corp. Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 002: ID 04f2:b446 Chicony Electronics Co., Ltd Bus 001 Device 006: ID 0930:a002 Toshiba Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub[\code] Let me know if that helps. https://www.smartmontools.org/wiki/Supported_USB-Devices That is the page I landed on when trying to figure out why terminal was saying "Unknown USB bridge" Quote:
The reason I am using an IDE to SATA is because I have multiple SATA connectors from external HDD I purchased in the past which has enabled me to mount any SATA HDD I have via USB. It hasn't been a problem before since I've only worked with SATA. Now, perhaps it is the time to purchase a caddie. I used test disk as it is what is mentioned step by step in the aforementioned video. The HDD I have is from my deceased brother's laptop which was apparently destroyed at or around his time of death to cover the contents of it up. The screen was cracked and the laptop wouldn't boot. The HDD could have been encrypted(?), no damage was noticed to the body of the laptop so the HDD good. As far as the possibility of encryption is considered, one of the few files that Stellar Toolkit Data Recovery could pull on on Windows was a PDF regarding Apollo Client encryption. So to answer your question with a long, drawn out Users/(username)/Desktop../Documents../Downloads or just C:/ if possible. |
I don't get the smart tools part. Why do you care about that just yet? I'd try to recover the files before it gets any worse.
Testdisk/photorec are on live media of all sorts. Boot to the live media and select your damaged drive to try to recover. https://www.smartmontools.org/wiki/S...ed_USB-Devices |
Quote:
|
Plug the disk in and run this.
Code:
lsblk -f |
Quote:
my external drives (wd my passport ultra and oyen digi enclosure with bare drive inside) give this same "please specify" output. they both just needed a -d sat added to the end of sudo smartctl -i /dev/sdX. so mine ended up being sudo smartctl -i /dev/sdb -d sat if you scroll the list on the site you linked, it looks like 75% or so can use -d sat. man smartctl has a -d subsection that says: Quote:
|
Quote:
Quote:
Quote:
Code:
lsblk -f Quote:
Thanks everyone. |
Don't worry about /dev/sda - you're booted from that disk. As for the UUID, just ignore them all. The ext4 one is valid, the NTFS and VFAT ones are pseudo-UUIDs.
So the dodgy device is recognised (as the fdisk also shows above), but has no discernable filesystem that Linux will handle. What does this generate ?. Code:
dmesg | grep -i sdb |
Quote:
since your primary goal is data retrieval, there is little that smartmontools can do to help in that endeavor. after you recover what you are looking for, smartmontools should be able to give you a decent idea of whether or not the disk is healthy enough to use for some other purpose. Quote:
|
This is what you probably need if you have a usb3 port to plug into:
https://www.amazon.com/Vantec-SATA-I...s%2C183&sr=8-5 If you're plugging into usb2, you need an adapter with a separate power supply like this one: https://www.amazon.com/AGPtek-Drive-...WM1T5KD2M7Y6VY I've always had one of these in my toolbox and they come in very handy. |
Basically.
Boot a 'live' pendrive, plug in your IDE drive, use Code:
dmesg|tail Mount /dev/sdb by partition number, Code:
sudo mount /dev/sdb1 /mnt Code:
ls /mnt Copy your files to backup media. |
Quote:
Code:
[sdb] 488397168 512-byte logical blocks: (250 GB/233 GiB) -me, lol. Joking, but I'm not sure what you mean by Linux cant handle this filesystem Hopefully some good news. Quote:
Quote:
Quote:
*EDIT: I am not booted from the pendrive and this is what typing Code:
dmesg|tail Code:
ubuntu@ubuntu:~$ dmesg|tail Code:
sudo mount /dev/sdb1 /mnt |
Linx_88,
I have an IOMAX USB to SATA/IDE adapter and it works fine on the very rare occasion I need to use it. I have no wish to knock kilgoretrout's recommendation for the above two items, it is sensible advice. However, do look at the Amazon one star customer feedback for those particular items which includes references to fried drives and data loss. fatmac's suggestion is the safer one, plus you don't need to lay out cash on new hardware. Just a thought. |
All times are GMT -5. The time now is 10:36 AM. |