LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-04-2015, 04:27 AM   #61
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267

http://www.cyberciti.biz/tips/how-to...der-linux.html
 
1 members found this post helpful.
Old 06-04-2015, 05:48 AM   #62
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
If you copied the whole device including partition table,

losetup --find --show --read-only --partscan file.iso

and then mount -o ro /dev/loop0p1 /mnt/somewhere
 
2 members found this post helpful.
Old 06-04-2015, 06:31 AM   #63
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Thanks, I ended up following this guys example

https://major.io/2010/12/14/mounting...scue-in-linux/

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.
 
Old 06-05-2015, 09:36 PM   #64
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
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 10:25 PM. Reason: more information
 
Old 06-05-2015, 10:16 PM   #65
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 938

Rep: Reputation: 174Reputation: 174
But are the two flash cards identical in every possible way?
 
Old 06-05-2015, 10:37 PM   #66
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JeremyBoden View Post
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?
 
Old 06-06-2015, 03:48 AM   #67
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
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:


 !"#$&,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~AEvent.L ogEVENT LOG Ux#.Fs'>@


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"

Just throwing that out there in case it's useful.

 
Old 06-06-2015, 06:31 AM   #68
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
can you please try to execute sudo cmp /dev/sde /home/folder/cfcard several times. Will it report the same difference or probably not?
 
Old 06-06-2015, 06:54 AM   #69
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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
 
Old 06-06-2015, 07:07 AM   #70
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
ok, so try cmp -b /dev/sde /home/folder/cfcard to check if the difference is the same every time
 
Old 06-06-2015, 09:33 AM   #71
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
you can try using hexedit or od to examine individual hex bytes.

just a thought: maybe ddrescue is better in this instance ?

Last edited by schneidz; 06-06-2015 at 09:35 AM.
 
  


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


All times are GMT -5. The time now is 08:32 PM.

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