LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2015, 06:11 AM   #1
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Rep: Reputation: Disabled
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.
 
Old 06-01-2015, 06:22 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,895

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
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.
 
1 members found this post helpful.
Old 06-01-2015, 06:48 AM   #3
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
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?
 
Old 06-01-2015, 06:52 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,895

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
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.
 
1 members found this post helpful.
Old 06-01-2015, 07:06 AM   #5
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
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?
 
Old 06-01-2015, 07:13 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,895

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
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.
 
1 members found this post helpful.
Old 06-01-2015, 07:33 AM   #7
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
ok thanks for the advice, I will try it and post again with an update in about 15 hours.
 
Old 06-01-2015, 05:13 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,188

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
"card isn't a licensed or corrupted." Could be they put the card or format info into a file to check.
 
Old 06-01-2015, 05:31 PM   #9
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
but wouldn't that file also be copied when I do that DD?
 
Old 06-01-2015, 06:52 PM   #10
JeremyBoden
Senior Member
 
Registered: Nov 2011
Distribution: Debian
Posts: 1,187

Rep: Reputation: 243Reputation: 243Reputation: 243
If you could copy these encrypted cards easily, there wouldn't be much point in encrypting them.
 
Old 06-01-2015, 08:43 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,188

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
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.

Last edited by jefro; 06-01-2015 at 08:44 PM.
 
Old 06-01-2015, 08:45 PM   #12
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Makes sense...I guess I'm holding out hope because I know someone has done it before with the linux dd.
 
Old 06-01-2015, 10:27 PM   #13
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
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
 
Old 06-01-2015, 10:31 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,995

Rep: Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218Reputation: 2218
That's "umount" - it's missing the (first) "n".
 
Old 06-01-2015, 10:42 PM   #15
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Yeah sorry I did type umount in the actual terminal. I just typed unmount on here by mistake.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you duplicate a 512 Meg Compact flash to a 1 GB compact flash using dd??? allen00860 Linux - Newbie 5 05-23-2009 09:48 PM
Installing Ubuntu Server on a Compact Flash Card haroldjclements Linux - Newbie 1 05-15-2008 02:57 AM
FFS partition on Compact Flash card - how to copy ??? rkaluzinski Linux - General 0 02-24-2006 04:48 PM
Make an exact copy of a compact flash card Pimple Linux - General 8 02-01-2006 12:37 PM
Exact Copy of Compact Flash Card Onyx^ Linux - Software 1 09-01-2004 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration