LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-10-2020, 07:42 AM   #1
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 184

Rep: Reputation: Disabled
Hard Disk is wipedout // recovery needed


Hey,

i have external hard drive,
while it was plugged in and something was being copied from/to, i plugged in USBstick and used MX Live USB Maker.

I selected wrong target USB Device and 'dd' process started. I canceled it after couple seconds, but problem arrived unavoidable.

Interesting is that copying process was going on, and till i unmount the hard drive later, all datas were accessible.

After mounting it again, output is like this
Code:
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: M3 Portable     
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: 0x814555ba

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1        8192    92159    83968   41M  c W95 FAT32 (LBA)
/dev/sda2       92160 15126527 15034368  7.2G 83 Linux
What is best and save approach to successful recovery.
What are the news that i wont like?


This is window of Gparted,

link
https://gparted.org/display-doc.php?name=help-manual

https://i.postimg.cc/dtGPJvX2/gpart.png
 
Old 03-10-2020, 07:58 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS, antiX
Posts: 4,357
Blog Entries: 49

Rep: Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598
hkjz,

Make a cloned copy of the drive and work on the copy, not the original.

Plenty of advice here:
https://askubuntu.com/questions/9825...did-dd-dev-sda

Also TestDisk, PhotoRec, QPhotoRec:
https://www.linuxquestions.org/quest...hotorec-37712/

Last edited by beachboy2; 03-10-2020 at 08:03 AM.
 
1 members found this post helpful.
Old 03-10-2020, 05:37 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,382

Rep: Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190
Not much to add to that really - that askubuntu link seems to cover it pretty well.
Quote:
Originally Posted by hkjz View Post
Interesting is that copying process was going on, and till i unmount the hard drive later, all datas were accessible.
This is covered in the referenced link - very unfortunate you umount'd it. Whilst mounted all the partition and filesystem structure is known, and accessible in memory; makes recovery much simpler and likely to succeed.
Testdisk is best for recovering the partitions themselves normally, and I have successfully used "mkfs -S ..." on deliberately over-written ext filesystem as a test. Note this was on a specially constructed (small-ish) test environment. That's a capital S, and read the caveats in the manpage. Might be worth a try on that cloned copy suggested above.
 
Old 03-12-2020, 07:10 AM   #4
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 184

Original Poster
Rep: Reputation: Disabled
Testdisk is a great hint and great tool,
I will definitely use it for this task.


I will do tests on a small USBSstic, to learn software in a safe environment,

Main concern is that Data Partition is overwritten,
and now in DataRecovery partitions are overcovered/overwritten by the new once.

However, would you have any advice how to proceed with story of overwritten data filesystem structure?

Quote:
TestDisk attempts to recover lost partition data and any lost files within the bounds of the recovered partition.
source : https://www.redhat.com/sysadmin/reco...files-testdisk

Would it be a way that i'd delete all paritions and approach Testdisk on an empty drive?

Last edited by hkjz; 03-12-2020 at 08:11 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm so lost trying to run Linux on an iMac off a recovery disk (Parted Magic recovery disk) 2KoNFuSSeD Linux - Newbie 2 12-22-2015 03:33 AM
Now I have a scsi hard disk, two IDE hard disk, i want install linux on scsi hard dis tecpenguin Linux - Server 4 11-10-2007 06:44 AM
LXer: Linux Data Recovery on Windows - Is possible through Disk Doctors Linux Recovery Software LXer Syndicated Linux News 0 10-22-2006 12:21 PM
Hard Disk OverHeated Badly Needed File Recovery eatmars Linux - Hardware 7 09-11-2006 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration