LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 05: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, 05:22 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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, 05: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, 05:52 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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, 06: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, 06:13 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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, 06: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, 04:13 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
"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, 04: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, 05:52 PM   #10
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

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

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
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 07:44 PM.
 
Old 06-01-2015, 07: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, 09: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, 09:31 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That's "umount" - it's missing the (first) "n".
 
Old 06-01-2015, 09: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



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 08:48 PM
Installing Ubuntu Server on a Compact Flash Card haroldjclements Linux - Newbie 1 05-15-2008 01:57 AM
FFS partition on Compact Flash card - how to copy ??? rkaluzinski Linux - General 0 02-24-2006 03:48 PM
Make an exact copy of a compact flash card Pimple Linux - General 8 02-01-2006 11:37 AM
Exact Copy of Compact Flash Card Onyx^ Linux - Software 1 09-01-2004 04:30 AM

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

All times are GMT -5. The time now is 03:34 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
Open Source Consulting | Domain Registration