Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Borked my usb-stick with knopperdisk - SOLVED (well....)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
MrSums
Apprentice
Apprentice


Joined: 25 May 2003
Posts: 283
Location: UK

PostPosted: Tue Jan 16, 2007 8:37 pm    Post subject: Borked my usb-stick with knopperdisk - SOLVED (well....) Reply with quote

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
View user's profile Send private message
bLUEbYTE84
Guru
Guru


Joined: 21 Jul 2006
Posts: 566
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

PostPosted: Tue Jan 16, 2007 9:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
MrSums
Apprentice
Apprentice


Joined: 25 May 2003
Posts: 283
Location: UK

PostPosted: Tue Jan 16, 2007 10:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
bLUEbYTE84
Guru
Guru


Joined: 21 Jul 2006
Posts: 566
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

PostPosted: Tue Jan 16, 2007 11:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
MrSums
Apprentice
Apprentice


Joined: 25 May 2003
Posts: 283
Location: UK

PostPosted: Wed Jan 17, 2007 8:33 am    Post subject: Reply with quote

Thanks. I'll pay more attention in future

Robert
_________________
If you dont ask, you wont get
Back to top
View user's profile Send private message
knopper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 106
Location: The Netherlands

PostPosted: Sun Feb 25, 2007 3:36 pm    Post subject: Reply with quote

Hi, I'm the author of knopperdisk :roll: , 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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54310
Location: 56N 3W

PostPosted: Sun Feb 25, 2007 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum