Copying a USB thumb drive.

Help on how to use HxD.
Post Reply
carwarr
Posts: 2
Joined: 16 Oct 2008 08:00

Copying a USB thumb drive.

Post by carwarr » 16 Oct 2008 08:24

Love your Hexeditor. I have used many others in the past but I plan on using yours from now on.

I have a strange problem that makes no sense to me.

I have a 32M usb stick with some linux stuff on it. It is formatted in ext2 and since I am not very good at linux yet, I thought I would just hex copy everything from the 32M with your HxD program and then copy it to another one. Since I did not have another 32M stick, I decided to do it to my 64 meg stick guessing that it would show up as a 32meg stick which would be OK.

I started with the 64m stick formatted with fat32, and copied all the data from zero to whatever and pasted it onto the 64m stick. Wrote the changes and read them back and everything took.

The problem is it is still showing as a fat32 drive with nothing on it in windows and linux. The original 32meg stick when inserted into a windows system, says it needs to be formatted, but the new one I created still shows up as an empty fat32 drive. I thought this was very strange and figured that it must be looking farther down the data on the 64 meg stick that I did not overwrite or something, so I decided to zero out all the rest of the data past what I originally copied to the 64meg stick. Darn thing still showed up as an empty fat32 drive!

Then I booted into Ubuntu and it also showed up as an empty fat32 drive also. So I formatted it in Ubuntu to be ext2, then booted back to windows to be able to use HxD and copied all the data again. This time it worked fine. Windows does not recognize it and wants to format it, and Ubuntu sees it as a ext2 drive with all the files on it. I tried the same thing a second time by formatting it back to fat32 just to make sure I wasn't on crack and it did the exact same thing.

I know this is not a problem with your hex editor, but I thought you might know what the heck is going on!

Anyway, thanks to your great program, I was able to accomplish what I wanted but in a strange way.


Now on to a question about HxD...

When doing what I stated above, the only way I found to do it was to load up the original usb thumb, ctri-a to select everything and copy. Then I go to the new drive and try to paste it in at the first byte, but it says it will make it longer or bigger or something. So I select the exact same bytes (highlight) on the new drive so I am highlighting the same abount of bytes and then paste and it works fine. I am just wondering if there is an easier way to overwrite with paste instead of having to highlight everything. I think I tried to press the Ins key first but that did not work either.

Thanks again for the best hex editor/ram editor/disk editor out there.

Mitch S.

Maël
Site Admin
Posts: 1124
Joined: 12 Mar 2005 14:15

Re: Copying a USB thumb drive.

Post by Maël » 18 Oct 2008 16:55

carwarr wrote: The problem is it is still showing as a fat32 drive with nothing on it in windows and linux.
[...]
I know this is not a problem with your hex editor, but I thought you might know what the heck is going on!
I guess it could be that you opened the USB-stick as logical drive instead of opening it as physical drive. That could make a difference if there are several partitions on your drive.
Or maybe there is some software/driver that gets loaded when you have formatted it as FAT32 that gets not loaded when you have ext2 since that software doesn't recognize ext2.
If you use Vista, there are some restrictions w.r.t. to writing to formatted disks (when the file system is known to Windows), but you should get an error message in this case.
The general problem is that for some reason the FAT32 information is still there and that you didn't overwrite the FAT32 data, and probably didn't paste the data from your other USB-stick to the right location on your 64-MB stick (e.g. because opened as logical drive). The suggestions above could help to solve this, but I'm not sure. Try to open it as physical drive and wipe out all the data, then paste your image, starting at sector 0 (use Ctrl+B).
carwarr wrote: When doing what I stated above, the only way I found to do it was to load up the original usb thumb, ctri-a to select everything and copy.
Then I go to the new drive and try to paste it in at the first byte, but it says it will make it longer or bigger or something.
Use Ctrl+B (Paste Overwrite) instead of Ctrl+V (Paste Insert), so you don't have to select anything when pasting. And better open the drive as physical drive, when you make a copy of it.

BTW: Make sure you open the right physical drive and not your hard drive, especially when writing to it!

carwarr
Posts: 2
Joined: 16 Oct 2008 08:00

Re: Copying a USB thumb drive.

Post by carwarr » 19 Oct 2008 00:13

Your are absolutly correct. I was just about to get on here and post my solution when you already did.

I somehow missed that you could open the drive as Logical or Physical and evendently the first two times I did it I must have tried to paste it into the Logical drive. Luckly, the first time I read the 32meg thumb drive, I guess I used the Physical drive option so I did get a full "image" of the whole thing. I tried it again and this time it worked great the way I was expecting.

And the Paste option, I dont know how I missed that. I am so used to using ctrl-c and ctrl-v that I did not even look in the menu and realize that you have a paste write option.

Everything works great now and I am much more familar with your great program due to it which is what it is all about for me... Learning.

I have since played with a couple of other hex editors that can read raw disks, trying to solve this problem, and I have to say, I will be using yours as I like it the best.

Thanks again.

Mitch

Post Reply