General TC > General TC Talk

Data Recovery from bad SSD

<< < (2/6) > >>

MTCAT:
Hi Rich and curaga,

Thanks a lot for the help, I still need to get an ethernet connection on my base station receiver when booted with Tinycore, so hopefully I'll have that done soon so I can install util-linux-ng.tcz and maybe ddrescue as well if need be.

So tonight I thought I would just try using dd on /dev/hda3 where all the data is (I think).

I tried making an image of /dev/hda3 with;

dd if=/dev/hda3 of=/dev/sda1/base.img

But I got an error

dd: "Can't open /dev/sda1/base.img' :Not a directory

Seems I need to mount sda1 first ? (sda is a 64 GByte pen drive). So I typed;

mount /dev/sda1
dd if=/dev/hda3 of=/mnt/sda1/base.img

This seems to be running now, hopefully my 12V battery will last long enough for the process to complete with USB1.0 ports, should have ~ 24 hrs run time, hopefully will be enough!

Hope mounting sda1 was correct, I recall when making duplicate boot TC drives that I did not mount either the source or destination pen drive.

Thanks,

David

Rich:
Hi MTCAT
No, no, no.


--- Code: ---dd if=/dev/hda of=base.img
--- End code ---
You want to copy  /dev/hda  which is not mounted to an actual file located on another drive.

Connect the damaged drive to another machine that has a drive with plenty of free space.

Rich:
Hi MTCAT
You want to image the entire drive. Don't try to image a partition. Connect the
damaged SSD to a Linux machine that has a large drive. Also, make sure the
machine does not auto mount every drive it finds.

Create a directory to work in:

--- Code: ---mkdir Recovery
cd Recovery
--- End code ---

Find out which device the SSD was assigned to.
Now create an image of the SSD:

--- Code: ---dd if=/dev/sdb of=master.img
sync
--- End code ---

Shut down the machine, disconnect the SSD and put it someplace safe.
Power up the machine and:

--- Code: ---cd Recovery
cp master.img base.img
--- End code ---

You can now work on  base.img.  If you mess it up, just copy  master.img  again.
Assign a device to the image file:

--- Code: ---sudo losetup --show --find --partscan base.img
/dev/loop241
--- End code ---
In this example the operating system returned  /dev/loop241  for the image file.

Use fdisk to get a partition list:

--- Code: ---fdisk -l /dev/loop241
 ----- Snip -----
Device         Boot  Start    End Sectors  Size Id Type
/dev/loop241p1        2048 206847  204800  100M 83 Linux
/dev/loop241p2      206848 309247  102400   50M 83 Linux
/dev/loop241p3      309248 923647  614400  300M 83 Linux
--- End code ---
In this example there are 3 partitions.

If you want to try looking at partition 3:

--- Code: ---mkdir P3
sudo mount /dev/loop241p3 P3
cd P3
ls -l
--- End code ---

If the contents appear messed up, you might have to try to repair the partition table.
That would require working on  /dev/loop241  because that's where the partition table
is located.

MTCAT:
Hi Rich,

Oh, okay, thanks for the help, I will try that tonight/this weekend, I don't think I can remove the SSD and connect up to a normal Linux desktop though, hmm, not sure, the SSD in the base station is on a card carrier that connects right into the PCI bus, but the hard drive itself is an IDE interface, which is why it was so expensive, I don't think I have an external IDE hard drive enclosure anymore (with a USB external connection),threw it out I think, maybe could get one off Ebay or something, or connect up the SSD internally inside my old AMD Phenom Linux box, I'm pretty sure even that guy uses SATA hard drives though.

Another wrinkle perhaps, I do have a clone of the rover receiver (made with Clonezilla) put on an old external (regular platter spinner) hard-drive, as a backup of sorts, I have booted off that in the past and it "worked" in so far as booting up the system, was very slow to boot, but it did boot.

Not sure if that might help in some way.

Thanks,

David

Rich:
Hi MTCAT

--- Quote from: MTCAT on September 09, 2022, 08:12:26 AM --- ... or connect up the SSD internally inside my old AMD Phenom Linux box, I'm pretty sure even that guy uses SATA hard drives though. ...
--- End quote ---
If that machine has CD/DVD drives, they might be controlled by an IDE interface.

An external drive would work, but might be slower than an internal drive.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version