Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
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.
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??
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
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.
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!
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.
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
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
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.
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....
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.