View previous topic :: View next topic |
Author |
Message |
MrSums Apprentice
Joined: 25 May 2003 Posts: 283 Location: UK
|
Posted: Tue Jan 16, 2007 8:37 pm Post subject: Borked my usb-stick with knopperdisk - SOLVED (well....) |
|
|
Not sure if this is recoverable, but worth a try before I give up.
I have a 2gb USB-stick and wanted to get a bootable linux on it. I dropped quite a few files on it for archive purposes, then came across knopperdisk. I ran the following instruction:
Quote: | dd if=boot.img of=/dev/sda1 bs=1k |
and although this has copied the rlevant files, all my previous files are no longer accessible. The 1.8gb partition is still there and reported as 1.8gb, but is saying it is full with just a few hundred kb of files visible.
Any suggestions? I have run fdisk and fsck.msdos (it is formatted as FAT16) but no joy as yet
Thanks and Happy New Year all
Robert _________________ If you dont ask, you wont get
Last edited by MrSums on Wed Jan 17, 2007 11:10 am; edited 1 time in total |
|
Back to top |
|
|
bLUEbYTE84 Guru
Joined: 21 Jul 2006 Posts: 566 Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table
|
Posted: Tue Jan 16, 2007 9:25 pm Post subject: |
|
|
I don't think they are recoverable, because dd wrote to the flash disk, from the beginning 'blindly', overwriting everything, including filesystem structures, etc. dd is NOT equal to copy. Never do this again |
|
Back to top |
|
|
MrSums Apprentice
Joined: 25 May 2003 Posts: 283 Location: UK
|
Posted: Tue Jan 16, 2007 10:52 pm Post subject: |
|
|
ok, my bad.
What I don't understand is why the 1.8gb partition reports itself as full. If dd overwrote it, fine but where did all the space go?
Thanks
Robert _________________ If you dont ask, you wont get |
|
Back to top |
|
|
bLUEbYTE84 Guru
Joined: 21 Jul 2006 Posts: 566 Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table
|
Posted: Tue Jan 16, 2007 11:32 pm Post subject: |
|
|
It's in an all f*cked up state now. At best what it is reporting is the partition image that you downloaded. Remember; filesystem reports the free space, not the device. |
|
Back to top |
|
|
MrSums Apprentice
Joined: 25 May 2003 Posts: 283 Location: UK
|
Posted: Wed Jan 17, 2007 8:33 am Post subject: |
|
|
Thanks. I'll pay more attention in future
Robert _________________ If you dont ask, you wont get |
|
Back to top |
|
|
knopper Tux's lil' helper
Joined: 20 Apr 2002 Posts: 106 Location: The Netherlands
|
Posted: Sun Feb 25, 2007 3:36 pm Post subject: |
|
|
Hi, I'm the author of knopperdisk , so since you've had some troubles, I guess it would be proper to help you....
Before you try this, please make a backup if there's any important data on the stick.
First run:
Code: |
dd if=/dev/zero of=/dev/sda bs=1M
|
(assuming /dev/sda is your usb device)
This will empty everything, including the mbr and partition table, which is good!
You might have to disconnect and connect the usb device after this.
Then run fdisk as usual and create a partition as large as possible.
edit: this wil *not* recover your files, but may restore the 'lost' space.
Last edited by knopper on Sun Feb 25, 2007 5:14 pm; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54310 Location: 56N 3W
|
Posted: Sun Feb 25, 2007 3:43 pm Post subject: |
|
|
MrSums,
boot.imh overwrote the Master boot record, the FAT (copy 1), maybe copy 2 too, the top level dir of your 1.8Gb partition then on into your data.
If boot.img did not get as far as the second copy of the FAT, you data can be recovered. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|