← Home ← Back to /wsr/

Thread 1539627

9 posts 4 images /wsr/
Anonymous No.1539627 >>1539629
How to save data from a drive?
Chatgpt just gave me a command that overwrote an external drive of mine. I started it before reading.
I just wanted to test the speed and check if the drive is ok bc there was an error before. I aborted after a few seconds but the drive still doesnt show up anymore.
tried photorec for recovery but it only gives out unreadable trash. Any possibilities I get the files back?
Anonymous No.1539629 >>1539630
>>1539627 (OP)
>Chatgpt just gave me a command that overwrote an external drive of mine. I started it before reading.
Anonymous No.1539630 >>1539634
>>1539629
What command did it give you? Depends
Anonymous No.1539634 >>1539637
>>1539630
sudo dd if=/dev/sda of=/dev/sde bs=16M status=progress
Anonymous No.1539637 >>1539638
>>1539634

You overwrote sde with sda, that means you overwrote the partition table, boot sectors and whatever data was there until you stopped. The data itself after that is still there, it's just not normally accessible anymore.
It's like you took a book an ripped out the table of contents, the pages are still there, but the index what is on which page is gone. Except your book as a few milion pages.

dd is like a knife. Very powerful and can fe extremely useful, but you gotta know how to use it. You can either cut an onion or stab your heart.
Anonymous No.1539638 >>1539666
>>1539637
and is there any way to restore that? I used a backup program but it only gave out gibberish. 180 directories full of mostly text files. And the contents are mostly things I dont need.
Text searching stuff I cant find what Im looking at.
Anonymous No.1539641 >>1539654
>Chatgpt just gave me a command that overwrote an external drive of mine
You deserved this for using ChatGPT you stupid fucker
Anonymous No.1539654
>>1539641
seconded
Anonymous No.1539666
>>1539638

I'd try restoring the table with TestDIsk an then try writing a new boot sector.
But before that I'd copy it over - with dd, ironically - and ONLY work on the copy.

Never try writing restoration operation on the original, always make a 1:1 copy first.