Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've made a monumental error. I was trying to write a raspberry-pi image from my usb hdd to my micro-SD card and mistakenly wrote the image back to my usb hdd.
The HD is a 250Gb and was formatted as FAT32. The rPi image is about 2Gb and basically overwrote my FAT32 partition tables. I know that the 2Gb that were written have been lost, but all my other data should still be on the drive. I just need to be able to get to it.
I used fdisk to try to set it back to a single FAT32 partition by deleting all the partitions from the rPi image and creating a FAT32 partition. fdisk accepts this but I cannot mount the drive.
I've made an image of the entire drive but it too will not mount.
Any help would be appreciated in trying to recover this. How do I create the partition tables whilst preserving the data? Or access the data so that I can get it back from the image?
I've made a monumental error. I was trying to write a raspberry-pi image from my usb hdd to my micro-SD card and mistakenly wrote the image back to my usb hdd.
that's really bad luck, especially as you don't seem to have a backup of your data.
Quote:
Originally Posted by shaheenm
The HD is a 250Gb and was formatted as FAT32. The rPi image is about 2Gb and basically overwrote my FAT32 partition tables. I know that the 2Gb that were written have been lost, but all my other data should still be on the drive. I just need to be able to get to it.
If you wrote 2GB, you sure as hell wiped not only the partition table, but also the boot sector and the additional file system info sector of the FAT32 partition, as well as the FAT itself (which was between 32MB and 256MB in size, depending on the cluster size you selected when formatting the drive), and some of the files as such.
Quote:
Originally Posted by shaheenm
I used fdisk to try to set it back to a single FAT32 partition by deleting all the partitions from the rPi image and creating a FAT32 partition. fdisk accepts this but I cannot mount the drive.
Of course you cannot. All information about the FAT32 file system is lost, there's nothing left to identify it as what it used to be.
Quote:
Originally Posted by shaheenm
I've made an image of the entire drive but it too will not mount.
For the same reason.
Best advice I can give you is to try TestDisk, which is included in the repos of many Linux distros. Contrary to the name, its main purpose isn't testing a disk, but rather recovering data you thought was lost. I don't want to foster too much hope, but it's worth a try. Be prepared to face the worst, though.
Best advice I can give you is to try TestDisk, which is included in the repos of many Linux distros. Contrary to the name, its main purpose isn't testing a disk, but rather recovering data you thought was lost. I don't want to foster too much hope, but it's worth a try. Be prepared to face the worst, though.
[X] Doc CPU
Testdisk isnt much help, and photorec recovers files but loses all the filenames. and alot of the files are fragmented. Basically what i need to recover is my Series folder, movies folder, and a recent backup of work and downloads. my backup has word docs, source code, applications, basically a variety of files. I was hoping there would be a way to mount the image and ignore the first 2Gb so that I could access the rest. I'm trying Foremost now, hopefully that is able to provide some solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.