-   Linux - Newbie (
-   -   Copy encrypted compact flash issues with dd in ubuntu (

solojayda3rd 06-01-2015 06:11 AM

Copy encrypted compact flash issues with dd in ubuntu
Hello, I have a system that uses a compact flash with a windows os and some other files on it, also somewhere is some sort of encrypted licensing information. I have several of these machines and can use the cf from the others just fine in this machine. But when I take one of those cards and try to copy it with dd, somehow the machine can tell the difference. It's nothing illegal, it's just too old to buy the replacement. Someone has told me they copied successfully in linux with the dd command, but mine aren't working. I also can't tell the brand or type of cf since all the labels have been removed. All i know is that it's a 256mb card. So is there any other options besides dd, or is there a deeper level of dd that i can use to copy this info. I'm using something like:

sudo dd if=/dev/sde of=/home/folder/cfcard

then to copy from my hard drive to the blank cf:

sudo dd if=/home/folder/cfcard of=/dev/sde

I'm using a usb cf reader, and when i have my finished cf everything looks good. Even the machine can read it, it just gives me an error that the cf card isn't a licensed or corrupted.

pan64 06-01-2015 06:22 AM

there can be several issues:
the card is too small (so the image cannot be copied onto it)
or you did not umount the card properly after the dd command.
or ???
So you need to specify exactly all the steps you made. dd is safe, it makes a perfect copy (byte by byte), that cannot be the problem.

solojayda3rd 06-01-2015 06:48 AM

ok so that might be it right there. I didn't know there was an import to unmounting. I just pulled it out when all was done. My steps were 1. Put card from working machine in card reader, open terminal, type df -h to identify cf card. 2. enter dd command mentioned in original post to copy card to hard drive. 3 pull out card and insert blank card which was 1 GB (I don't have any 256MB cards on hand, i'm ordering some) enter dd command in original post to copy to card. Then when it finished, i just pulled it out.

I will mention that even thought it was a 1GB blank card, when I put it in a card reader it shows only 256 MB like the original. Not sure it counts where it matters most, but it looked identical when i was done. Also the card is 256 MB that i'm copying from, but it only uses about 22 MB on the card. Not sure if that's important, i'm just trying to list everything i know so far. How do you properly unmount after dd?

pan64 06-01-2015 06:52 AM

that is umount /dev/sde and you need to wait as long as it returns.
df will not check the card (device), but the filesystem on it. So you can easily have a 256 MB filesystem on a 1 GB card, that looks ok.

solojayda3rd 06-01-2015 07:06 AM

ok i'll try that next, it will have to be tomorrow since i'm doing it at work and already off for the day. I was checking the size in the regular ubuntu window, not sure if that makes a difference. Does it need to be a 256MB card though, or will the 1 GB work if I unmount it properly? And, might sound silly, but I need to unmount AFTER the dd right? or is that something that needs to happen before to properly do the dd?

should it be 1. copy to hard drive 2. unmount. 3. insert blank copy to blank. 4. unmount and use?

pan64 06-01-2015 07:13 AM

umount is recommended (only) if you modified the content of that device, but if you are unsure just umount, that is the safe way.
Any size will work if the capacity was enough to hold that data. Just you will not be able to access the remaining part.

solojayda3rd 06-01-2015 07:33 AM

ok thanks for the advice, I will try it and post again with an update in about 15 hours.

jefro 06-01-2015 05:13 PM

"card isn't a licensed or corrupted." Could be they put the card or format info into a file to check.

solojayda3rd 06-01-2015 05:31 PM

but wouldn't that file also be copied when I do that DD?

JeremyBoden 06-01-2015 06:52 PM

If you could copy these encrypted cards easily, there wouldn't be much point in encrypting them. :D

jefro 06-01-2015 08:43 PM

No. .

It is clearly telling you that your copy isn't bypassing the security it used. There are only so many ways to do that. I know of more than a few.

Doubt you can legally copy them even if they are abandonware by the way.

solojayda3rd 06-01-2015 08:45 PM

Makes sense...I guess I'm holding out hope because I know someone has done it before with the linux dd.

solojayda3rd 06-01-2015 10:27 PM

ok so in response to an earlier suggestion to unmount the cfcard, it's telling me bash:unmount/dev/sde: No such file or directory. Did I first need to mount it in order to unmount? I just plugged in the card to the card reader and it found it in df -h so i assumed i was good. I'm not very well versed in dd or linux at all so please let me know if i'm doing this wrong. Thanks

syg00 06-01-2015 10:31 PM

That's "umount" - it's missing the (first) "n".

solojayda3rd 06-01-2015 10:42 PM

Yeah sorry I did type umount in the actual terminal. I just typed unmount on here by mistake.

All times are GMT -5. The time now is 02:15 PM.