LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2015, 06:49 AM   #46
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled

Yes that was just a typo sorry. As for the sync, i'm trying to read up on it online but i don't see examples. Should it be
Code:
sudo sync/dev/sde
or how should i write the command?
 
Old 06-03-2015, 06:56 AM   #47
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
simply:
sudo sync
sudo sync
that's all
 
1 members found this post helpful.
Old 06-03-2015, 08:18 AM   #48
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
I tried the sync, and did everything else like i said, but for some reason it still comees back as binary files differ. At this point I'm a bit confused, especially since i know my dd command is correct since i was able to use dd to get the file on to my hard drive. I'm using the exact same process in reverse but for some reason it's not correctly copying to my blank cf card.
 
Old 06-03-2015, 08:42 AM   #49
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
probably you can see some related info in /var/log
 
1 members found this post helpful.
Old 06-03-2015, 08:47 AM   #50
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Well, unless the blank CF card is exactly the same size... it won't match, as there are more junk blocks of data in the "blank" card (even if the blocks are zeros, just their presence is a difference).

The only thing you can do to test is try it out.
 
1 members found this post helpful.
Old 06-03-2015, 08:48 AM   #51
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
that makes sense, I have an equal size card coming soon, and yes i'll still test it out later on today thanks.
 
Old 06-03-2015, 08:53 AM   #52
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
Using dd you can specify bs=<block size> and count=<count> to specify how much data do you want to read/write. So you can copy a given size onto the hard disk and compare it to the old file.
 
1 members found this post helpful.
Old 06-03-2015, 09:20 AM   #53
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
i am still catcing up but heres a few notes so far:
Quote:
Originally Posted by solojayda3rd View Post
Yeah sorry I did type umount in the actual terminal. I just typed unmount on here by mistake.
to troubleshoot issues, instead of typing just use copy-paste (in [code] tags) to ensure you are typing in commands correctly and also to ensure we are not being hindered by spelling mistakes.

i think it would be ideal to run dd while the disk that is being imaged is unmounted to ensure that nothing is being written to it while the imaging procedure is taking place (like trying to shoot a moving target).

its possible (probable) that the encryption algorithm is using the drives uuid to make sure it is only being allowed on that one drive. i think i remember that ms-windows reads serial information about your cpu/motherboard/ram/hd/videocard/soundcard/... and if you try to image a harddrive to another, it will contact microsofts server to check your configuration and refuse to boot after 30 days. thats why some customers had to call microsoft after their motherboard died to plead for a new license key.
 
1 members found this post helpful.
Old 06-03-2015, 10:44 AM   #54
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
Don't use md5sum. Try "cmp a b" instead.
 
2 members found this post helpful.
Old 06-03-2015, 03:39 PM   #55
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,398

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
To explain. I suggested to boot to live iso and use that to peek into the file you created. See if you did dd the drive correctly. Look into files. Look into any odd partitions. See if any file describes the geometry or unique feature of the cf.
 
1 members found this post helpful.
Old 06-03-2015, 04:18 PM   #56
vincix
Member
 
Registered: Feb 2011
Distribution: Centos 6.7, 7
Posts: 516

Rep: Reputation: 48
Quote:
Originally Posted by solojayda3rd View Post
Yeah sorry I did type umount in the actual terminal. I just typed unmount on here by mistake.
As far as I know, you need to unmount the usbdisk BEFORE using dd (if it doesn't do it automatically anyway). That's the proper way.
 
1 members found this post helpful.
Old 06-03-2015, 05:09 PM   #57
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
to troubleshoot issues, instead of typing just use copy-paste (in [code] tags) to ensure you are typing in commands correctly and also to ensure we are not being hindered by spelling mistakes.
I'll work on that. I'm using oracle virtual machine to run my ubuntu, and haven't figured out how to copy from it to my windows. It was on my list of things to figure out..I'll try to from here on to just copy and paste.

Jefro, I still haven't figure out exactly how to do what you're saying, not sure if you think i need to since i learned through the diff command that previously i was not copying identical files. But if so, can you describe: Do i need to create a cfcard.iso and then in ubuntu look through it. Or try to mount it like an os in my virtual machine? and also how do i use ubuntu to look through it, in the command prompt? or is all of this supposed to take place in the command prompt? I know it's probably a lot to explain, but i tried to look it up and i can't find anything close to even head in the right direction in accomplishing that.

vincix, yea that was the step i was missing for a while. The last 2 times i've done the dd i did umount the usb. Or at least I did umount dev/sde1 which i think is only a partition but that's what kept mounting automatically. I did try to umount the whole /dev/sde but i got the message that it wasn't mounted in the first place.

pan64, I was reading about the bs and count options, in my case should bs be 512 and count be 256MB? The way i was understanding it is that bs is how many bytes are being read and written at a time, and the count was the size of the copy, or is that wrong? my original card is 256Mb if that helps.
 
Old 06-04-2015, 01:02 AM   #58
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
Ok update, I tried the last copy i made, the one that still said "differ" but was made after unmounting the sde1 as mentioned. So i assumed this had a good chance to actually work, but it came up the same when i put the card in the machine i'm trying to run.

So in the meantime I've figured out how to copy and paste my codes so i don't have anymore typos.

I also figured out how to mount the iso file to my ubuntu. I had to save it to my windows, then mount it like a cd in my virtual machine settings. That being said, I can see it, but i don't see any info inside when i click on it. So my next question for jefro, (if I did what you were talking about hopefully correctly) how can i peek inside to see the files? Is that a terminal command thing, or should i be able to do it from ubuntu. I should mentioned the iso is one i made by using dd and using
Code:
if=/home/folder/cfcard of=/home/folder/cfcard.iso
Sorry but that's not copied and pasted since I did that a few days ago, but i'm pretty sure that's what i used. I'm still holding out hope that once my 256mb card arrives i might have better success. Thanks guys so far for all the ideas and suggestions.
 
Old 06-04-2015, 03:02 AM   #59
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
you can mount any file (use as image), for example /home/folder/cfcard.iso, but /home/folder/cfcard is ok too (by the way dd if=/home/folder/cfcard of=/home/folder/cfcard.iso is equal to cp /home/folder/cfcard /home/folder/cfcard.iso, a simple copy).
The mount command would be mount <filename> <mount-point>, so for example mount /home/folder/cfcard.iso /tmp/cfcard - you need to mkdir that mount point beforehand. Next, you can cd /tmp/cfcard and you will see the content of the mounted image.

About block size, see: http://www.computerhope.com/unix/dd.htm
I think you need to say something like: dd bs=1024 count=256K, but you can check the size of the result (so run a dd without bs and count to copy from the original onto the disk and with bs and count and you will need to get the same result). That bs and count can be used to afterward to check the content of the second card.
 
1 members found this post helpful.
Old 06-04-2015, 04:09 AM   #60
solojayda3rd
Member
 
Registered: Jun 2015
Posts: 32

Original Poster
Rep: Reputation: Disabled
So i tried what you said to mount it, i get

mount: you must specify the filesystem type

so then i tried

file -Ls /home/folder/cfcard1.iso

and i got

/home/folder/cfcard1.iso: x86 boot sector

so i'm going to try and mount it like i did previously, i just need to remember how i did it, then i'll try the cd/tmp/cfcard1 once i get it mounted
 
  


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 01:08 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