Copy encrypted compact flash issues with dd in ubuntu
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
which got the iso mounted, I was able to look around but then realized I have no idea what i was looking for lol. I'll keep everyone posted once I get my 256mb card to see if it made a difference, otherwise i'm not sure where to go next.
Hello all, so as an update, today I got the 256MB compact flash and performed the dd and this is what I got
user@user-VirtualBox:~$ df -h
Filesystem Size Used Avail Use Mounted on
/dev/sda1 7.3G 5.0G 1.9G 73 /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 493M 4.0K 493M 1% /dev
tmpfs 101M 1.2M 100M 2% /run
none 5.0M 0 5.0M 0% /run/lock
none 502M 152K 502M 1% /run/shm
none 100M 32K 100M 1% /run/user
/dev/sde1 244M 27M 217M 11% /media/user/SM250
user@user-VirtualBox:~$ sudo umount /dev/sde1
[sudo] password for user:
user@user-VirtualBox:~$ sudo dd if=/home/folder/cfcard of=/dev/sde oflag=sync
501760+0 records in
501760+0 records out
256901120 bytes (257 MB) copied, 5697.51 s, 45.1 kB/s
user@user-VirtualBox:~$ sudo sync
[sudo] password for user:
user@user-VirtualBox:~$ sudo sync
user@user-VirtualBox:~$ sudo diff /home/folder/cfcard /dev/sde
user@user-VirtualBox:~$ sudo diff -s /home/folder/cfcard /dev/sde
Files /home/folder/cfcard and /dev/sde are identical
However when I installed it in the machine i'm trying to run I still get the license or corrupted message. To be more exact it doesn't boot to windows until i put the unit in safe mode, then it gives me that message. I'm not sure if that's relevant but I figured i should mention it just in case.
I know nothing about encryption or licensing or linux for that matter. I'm basing all this effort of what another owner of this machine told me in a post, that he did a dd in linux and was able to make it work. (though i haven't been able to contact him further to ask exactly how.)
But as far as I can see, the files should all be the same. Obviously something is different, Jefro mentioned manually checking inside to see for such a folder, not sure what to look for though because there are a lot of folders with strange names that don't mean anything in particular to me.
Any other suggestions, ideas, comments?
Even if not, Thanks to everyone who got me this far, it's been fun to learn and experiment with linux.
edit: I just did the cmp and this was the result
user@user-VirtualBox:~$ sudo cmp /dev/sde /home/folder/cfcard
/dev/sde /home/folder/cfcard differ: byte 129587, line 265
Not sure why this one says they differ, and the diff said they were identical. How can I use this information though? Is there a way to find byte 129578 and change it?
Last edited by solojayda3rd; 06-05-2015 at 09:25 PM.
Reason: more information
But are the two flash cards identical in every possible way?
That's actually my question too. I was told the dd works if you have matching series numbers. He specified series not serial. I've been looking all over to find a way to order such a specification. Can't find it. The cards i'm copying from only has information on it about the company who makes the machine, and the size and ser H. I don't even know the brand. This one i'm using now as a blank is a sandisk same size.
I haven't figured out yet how to be more similar. Any way to be any more thorough?
So I decided to get my hands on my good cfcard again and try to cmp it against my copy on my hard drive. Got the same diff byte 129587, line 265. So then I made another copy and called it cfcardtest. I did the cmp against my copy on my hard drive and got the same diff byte 129587, line 265. And finally did the cmp again to compare my good card and my new copy cfcardtest and got the same diff byte 129587, line 265. So no matter which copy, the original, or any copy i dd on my hard drive it differs on the same line same byte. I'm wondering if that byte stores the time it was created, that's the only thing i can think of that should be different among the three. Either way I'm still looking into a way to see that byte and see if i can manual change it to match the original.
There's a file in on the cf card called "event log" and the type is "application log (text/x-log)" Earlier I tried to use this command
user@user-VirtualBox:~$ head -265 /home/folder/cfcard | tail -1
And it resulted in a lot of characters and letters:
I can see the words event log in there. I'm wondering if something about that file isn't copying. I can't access the file on the cf card I get the message "there was a problem opening..." also says "the file you opened has invalid characters"
can you please try to execute sudo cmp /dev/sde /home/folder/cfcard several times. Will it report the same difference or probably not?
Yea I tried that command 2 or 3 times with the same result. I can try it again Monday, because I wont be back to work until then. I also tried sudo diff /dev/sde /home/folder/cfcard and it came back files differ.
Every time I did the sudo cmp /dev/sde /home/folder/cfcard it said Binary files differ byte 129587, line 265
And i'm not sure if it matters but I also bought another compact flash card reader and plugged it in. It became sdf. And when I tried sudo cmp /dev/sdf /home/folder/cfcard
I also got the same message binary files differ byte 129587, line 265
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.