LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-20-2016, 02:33 AM   #16
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Original Poster
Rep: Reputation: 21

Alright guys, I'm in Finland at this moment for my work. When i'm back in Holland i'll try r-linux.

Hopefully it will work.



Another thing: what do you guys understand with overwritten data? I did not formatted the drive, just simply performed the terminal command (sudo dd if=/home/nomko/Desktop/linuxmint-18-mate-64bit.iso of=/dev/sdc oflag=direct bs=1048576
) to create a bootable drive. Does this command overwrite my whole disc then??
 
Old 07-20-2016, 10:08 AM   #17
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
First you wrote:
Quote:
Originally Posted by nomko View Post
I accidentally formatted AND installed elementary Loki Beta on my 500 GiB external disc which should not be happen/done!!
Now you write:
Quote:
Originally Posted by nomko View Post
I did not formatted the drive, just simply performed the terminal command (sudo dd if=/home/nomko/Desktop/linuxmint-18-mate-64bit.iso of=/dev/sdc oflag=direct bs=1048576) to create a bootable drive. Does this command overwrite my whole disc then??
Those are two very different actions. Which is it? For the first case, recovery is unlikely. For the second case, just the first 1.7 GB of the 500 GB drive was overwritten, so most of the data should be recoverable if you proceed carefully. Appropriate techniques for the two cases will be different.
 
Old 07-20-2016, 10:52 AM   #18
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,979
Blog Entries: 33

Rep: Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469Reputation: 1469
nomko,

I am as confused as rknichols.

You originally stated that one of your USB drives was sdd and you successfully created a bootable drive using Linux Mint 18 MATE. Presumably you then installed LM 18 MATE on your main (sda) drive?

You then state:

Quote:
I did not formatted the (500GB) drive, just simply performed the terminal command (sudo dd if=/home/nomko/Desktop/linuxmint-18-mate-64bit.iso of=/dev/sdc oflag=direct bs=1048576) to create a bootable drive. Does this command overwrite my whole disc then??
If your 500 GB drive is sdc (I pointedly referred to this as an example), then as rknicholls indicates, you may have only overwritten the first 1.7GB of this 500GB drive.

IF that is the case, then the bulk of your data can be recovered.

Please let us know exactly what you have done before you do anything else!
 
Old 07-20-2016, 11:10 AM   #19
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
And, if you are posting about several separate problems in this one thread, DO NOT DO THAT! It causes nothing but confusion. Start a new topic for each problem.
 
Old 07-25-2016, 04:10 PM   #20
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Original Poster
Rep: Reputation: 21
Ok guys, to clarify 1 or 2 things:

external 500 GB disc was /dev/sdc
USB memory stick was /dev/sdd

I formatted first /dev/sdd
Then i created the bootable drive on /dev/sdc using this command:
sudo dd if=/home/nomko/Desktop/linuxmint-18-mate-64bit.iso of=/dev/sdc oflag=direct bs=1048576

So, yes like beachboy2 says here is correct
 
Old 07-25-2016, 04:15 PM   #21
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Original Poster
Rep: Reputation: 21
Oh yes, o forgot, i created an image file from my disc so i have a backup.
Using this command: sudo dd if=/dev/sdc of=/home/nomko/500gb/recoveryfile01.image
 
Old 07-26-2016, 05:40 AM   #22
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
OK, that's a little clearer. What do you know of how that 500GB disk was formatted prior to the first 1.7GB being overwritten? The best case would be a single partition with some Linux-native filesystem. For that, testdisk should be able to discover a backup super block and restore the partitioning to match that. Then, fsck should be able to recover the filesystem. Since the root directory has been overwritten, everything is going to end up in lost+found, but in there you should find intact subdirectories complete with their named files.

If the drive had multiple partitions, as long as the first partition was substantially larger than 1.7GB you should be able to recover pretty much as above. Partitions that start beyond the first 1.7GB should be completely intact.

Worst case would be a single FAT filesystem on that drive. Too much of the important filesystem structure was in that overwritten 1.7GB, so recovery would be a lot more difficult.
 
Old 07-31-2016, 10:01 AM   #23
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Original Poster
Rep: Reputation: 21
Ok guys, i installed r-Linux but how do i rescue/restore my disc? I am not familiar with this program and i only see a scan button but nowhere a button or task to recover....
 
Old 08-03-2016, 03:37 PM   #24
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Original Poster
Rep: Reputation: 21
anybody???
 
Old 08-03-2016, 04:47 PM   #25
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by nomko View Post
anybody???
I've never used r-linux, but the Recovery Manual link on the home page leads to what appears to be a pretty complete manual. Have you taken a look at it?

It's hard for anyone here to hold your hand going through this because we don't have a filesystem in a condition like yours. Every case is different.

UPDATE: Going back to an eariler question: How was that 500 GB disk formatted prior to being overwritten? Looking at the above manual, I see
"Supported file systems: Ext2/3/4FS (created by Linux or other OS)."
If that drive had some other filesystem (such as FAT32), then r-linux is the wrong tool.

Last edited by rknichols; 08-03-2016 at 04:59 PM. Reason: add UPDATE
 
Old 08-03-2016, 07:49 PM   #26
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I'd use testdisk as noted above. Almost every common distro has it on the live media or can easily be added in.

Yes, dd command is a nuclear option. There is no need to format a device and then use dd. (I do know you meant two different drives however.) dd starts at the beginning of a drive (assuming you told it to use drive and not partition) and it will continue to write till it ends somehow.

Very odd block size there too.
 
Old 08-03-2016, 10:57 PM   #27
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by jefro View Post
Very odd block size there too.
1048576 is 1 MiB, hardly an "odd" size.
 
Old 08-04-2016, 04:33 PM   #28
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
clumbersome notation.

Last edited by jefro; 08-04-2016 at 04:41 PM.
 
  


Reply



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
HAL automount permissions differs between USB HD and USB memory stick Olaus Slackware 5 06-28-2010 06:34 PM
Two USB memory devies (stick memory/jump drive) one works one not Mark_in_Hollywood Linux - Hardware 5 05-20-2008 07:35 PM
*** USB external hard drive and USB memory stick linux_2007_ Linux - General 1 07-17-2007 04:20 PM
USB memory, Compact Flash, Memory Stick energiza Linux - Hardware 2 08-22-2006 09:29 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM

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

All times are GMT -5. The time now is 04:29 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