You have erased your boot sector.
There are several ways to fix this, and seeing there are other posts with similar problems, I'll provide a solution even though the topic is pretty old.
To backup your USB drive do this:
dd if=/dev/sdb of=./flashdisk.dd bs=1024
This will put all contents of your flashdrive (/dev/sdb) in the file flashdisk.dd
Using a common linux tool called 'foremost' you can probably recover some or all files from the flashdisk using the newly created file, flashdisk.dd, as input to foremost. It carves out a number of filetypes automagically.
Another, more involved method, goes like this:
Backup your flash drive as above, creating a flashdisk.dd file, just to be sure.
Now, take another flashdisk (I'm assuming you've got access to one more) and extract the boot sector from it using:
dd if=/dev/your_other_flashdisk of=./bootsector.dd bs=512 count=1
Now, put that bootsector onto your old flashdisk using:
dd if=./bootsector.dd of=/dev/your_thrashed_flashdisk bs=512 count=1
If all is well, you should now be able to access your old flashdrive just like before.
I'm making a few assumptions here, but if you haven't meddled too much with the flashdisk your file system should be good to go.
Hope this helps.
jeanel wrote:
Hello,
I have done what we always fear. In haste I typed the wrong letter in the command line of dd
dd if=/dev/zero of=/dev/sdb1 bs=512 count=1
Unfortunatelly sdb was my flash disk and not the sda1 I wanted to.
So to describe the problem: now I have a KingMax 1GB usb flash which is recognized both in linux and windows as USBest USB2FlashStorage
MHDD finds it as USBest USB2FlashStorage 0.00Utff0163A1BAG
LBA: 0 Unit size: 0 bytes
I have tried:
MHDD>ID
Direct access device
USBest USB2FlashStorage 0.00Utff0163A1BAG
LBA: 0 Unit size: 0 bytes
Warning: Incorrect ID or drive is not ready
The same output I get when I use TOF. Plus I get:
In order to use this function, your drive must be initialized. This drive is not connected or not functioning properly.
Please help. Do I have any chance of recovery? Can I still access the sectors at a lower level? I am pretty sure that if I could just get a dump of the stick I could recover my files.
By the way linux see it but when I try to mount it I get /dev/sdb: no media mounted
Thank you very much.
Desperately yours
Cristian Vidu