Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-21-2017, 04:38 PM
|
#1
|
LQ Newbie
Registered: May 2017
Posts: 5
Rep: 
|
Restoring data after a dd command on wrong drive but this drive was previously mounted
I searched a lot on internet but I didn't managed to get a single thing which could help me. I am totally panicked right now. I am new to Linux and wanted to try out Kali to learn things.
So I was on a LiveCD of Kali trying to install it on a USB Key. The .iso file was on my Windows so I mounted the partition So my sdb1 data was mounted to /root/mnt At this point I used dd to create a bootable USB but I typed sdb instead of sdc...
So what can I do to back up my data I just wiped, if it is even possible?
TLDR I have access to files on a mounted point but the disk that contains them has been wiped up. What can I do to get back the normal partition with the backed up files?
Please help me :'(
|
|
|
05-21-2017, 05:18 PM
|
#2
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,827
|
- What filesystem was on sdb1? If it was an NTFS Windows partition, you're going to have to use Windows tools to attempt repair.
- How large was that partition? (If it was using the whole device, just the size of the device.)
- What was the size of the ISO that you copied there?
All of the data that was overwritten by that ISO is forever lost. Depending on the filesystem type and the relative sizes, much of the rest might be recoverable.
Don't do anything that writes to that device without first saving a complete image of, preferably, the complete device, or at least the space occupied by the partitions (the entire partitions) that were touched by that dd operation. When initial attempts at repair do not succeed, they can make matters much worse.
Last edited by rknichols; 05-21-2017 at 05:20 PM.
|
|
|
05-21-2017, 05:36 PM
|
#3
|
LQ Newbie
Registered: May 2017
Posts: 5
Original Poster
Rep: 
|
Hi,
Thanks for your response.
1. It was in NTFS. It was the secondary drive of my Windows installation (128 Go SSD - which is intact - and 1 To HDD).
2. It was the while thing, 1 To.
3. The ISO was 2.8 Go I think.
I have no external drive, but I'll manage to find one; also, how do I save a complete image of my drive?
Even before I read your answer, I started a tool named EaseUS data recovery. It looks like it found my lost data - I see my whole file hierarchy.
What should I do now?
Also, thanks for your answer and help. It is much appreciated in such panick circumstances...
|
|
|
05-21-2017, 08:51 PM
|
#4
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,827
|
You were fortunate that only about 0.3% of that filesystem was overwritten, and the major index structure is apparently intact. The obvious next step is to copy the data you want to save somewhere else. Then, you can repartition and reformat with a new filesystem. Since it appears that you can recover the data without having to write to this drive, there is no need for a backup image, just somewhere to hold your data while you reformat.
|
|
1 members found this post helpful.
|
05-24-2017, 08:25 AM
|
#5
|
LQ Newbie
Registered: May 2017
Posts: 5
Original Poster
Rep: 
|
I managed to have some drive to restore data on, but I can't find any reliable software which can help me recover my data. The one I mentionned before scanned it well but refused to let me recover anything. May you help me on this point? Thank you.
|
|
|
05-24-2017, 02:10 PM
|
#6
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,827
|
Apparently you are using the "Free Trial" version of EaseUS, and just shows you what it found without letting you recover anything. This is a Windows NTFS problem, not a Linux problem. You can buy the paid version of EaseUS, look around for other, free NTFS recovery tools, or ask in a Windows support group for advice. I'm at the limit of what I can offer.
|
|
|
05-24-2017, 02:11 PM
|
#7
|
LQ Newbie
Registered: May 2017
Posts: 5
Original Poster
Rep: 
|
Oh well, I'll do it with my Google Search skills. Thank you anyway for your advices.
|
|
|
05-26-2017, 09:57 AM
|
#8
|
Member
Registered: May 2011
Location: Texas
Distribution: Debian/Ubuntu,CentOS
Posts: 848
|
For Windows, I've always used Recuva.
https://www.piriform.com/recuva
make sure your destination location is as big or bigger than the partition your recovering when using Recuva.
|
|
1 members found this post helpful.
|
05-26-2017, 10:00 AM
|
#9
|
LQ Newbie
Registered: May 2017
Posts: 5
Original Poster
Rep: 
|
Thanks. I'm saving my HDD since yesterday morning thanks to Minitool Power Data Recovery. If it fails, I'll try Recuva out.
|
|
|
All times are GMT -5. The time now is 08:53 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|