LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   When iso image is moved to usb, checksum fails?? (https://www.linuxquestions.org/questions/linux-newbie-8/when-iso-image-is-moved-to-usb-checksum-fails-687812/)

mynameisthomas 12-02-2008 02:42 PM

When iso image is moved to usb, checksum fails??
 
I have downloaded Fedora 9 live cd iso image on my hard drive.

After downloading, when I verified that using sha1sum, it was ok.
Quote:

sha1sum -c SHA1SUM
Fedora-9-i686-Live.iso: OK
sha1sum: Fedora-9-i686-Live-KDE.iso: No such file or directory
Fedora-9-i686-Live-KDE.iso: FAILED open or read
sha1sum: WARNING: 1 of 2 listed files could not be read
I used cp to copy the image to my usb.
Now when I check the image on usb, it failed.
Quote:

sha1sum -c SHA1SUM
Fedora-9-i686-Live.iso: FAILED
sha1sum: Fedora-9-i686-Live-KDE.iso: No such file or directory
Fedora-9-i686-Live-KDE.iso: FAILED open or read
sha1sum: WARNING: 1 of 2 listed files could not be read
sha1sum: WARNING: 1 of 1 computed checksum did NOT match
I tried copying to different USBs, but always got the same result.
Then I tried "mv" and then "rsync -av" but to no avail.

What's wrong? When the image is on my hard drive, there isn't any problem.
But as I copy it to some usb, I get this problem.

Here is the verification of my SHA1SUM file
Quote:

gpg --verify SHA1SUM
gpg: Signature made Thu 08 May 2008 07:27:03 AM PKT using DSA key ID 4F2A6FD2
gpg: Good signature from "Fedora Project <fedora@redhat.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: CAB4 4B99 6F27 744E 8612 7CDF B442 69D0 4F2A 6FD2
I faced the same problem with schools-wikipedia-full-20080229.tar.gz.
I can untar it, if it is on my hard drive.
But whenever, I copy this archive to any usb or other computer and then untar it. It stops before completing giving some error that archive is not ok. Same problem of checksum here too.

Now what should I do to move the iso images and tar archive to my usb or other computers without corrupting the checksum.

kaz2100 12-03-2008 06:54 AM

Hya,

Could your problem be file system related?

Happy Penguins!

mynameisthomas 12-04-2008 12:28 PM

Quote:

Originally Posted by kaz2100 (Post 3362920)
Hya,

Could your problem be file system related?

I have tried on ext3 and ntfs both.
I have got same result.

Any idea whats going on?

farslayer 12-04-2008 12:48 PM

did you try the command sync after copying the file but before checking the md5 sum ?

USB devices have a habit of storing data in cache and not writing it all out to the flash drive until it is unmounted. a sync should force this to occur.

man sync

Quote:

sync -- force completion of pending disk writes (flush cache)

mynameisthomas 12-05-2008 12:33 AM

Quote:

Originally Posted by farslayer (Post 3364581)
did you try the command sync after copying the file but before checking the md5 sum ?

USB devices have a habit of storing data in cache and not writing it all out to the flash drive until it is unmounted. a sync should force this to occur.

man sync

I tried but it failed again.

Quote:

[User@dhcppc0]$ cp -r Fedora-9-i686-Live/ /media/usb/
[User@dhcppc0]$ cd /media/usb/Fedora-9-i686-Live
[User@dhcppc0 Fedora-9-i686-Live]$ sync
[User@dhcppc0 Fedora-9-i686-Live]$ sha1sum -c SHA1SUM
Fedora-9-i686-Live.iso: FAILED
sha1sum: Fedora-9-i686-Live-KDE.iso: No such file or directory
Fedora-9-i686-Live-KDE.iso: FAILED open or read
sha1sum: WARNING: 1 of 2 listed files could not be read
sha1sum: WARNING: 1 of 1 computed checksum did NOT match
[User@dhcppc0 Fedora-9-i686-Live]$
I think running sync for once was enough but I did it thrice and then checksum the file but again FAILED.

Any other idea?
Is there any other command (other than cp,mv,rsync) which can be used for moving files?
May be a new command to move the file will help.

mynameisthomas 12-05-2008 02:45 AM

I have observed that this thing only happens when I move image to usb.

I tried moving image to other partition (my home folder is on other partition) and it worked, I didn't get any fail there.

But as I tried it moving it to usb, I got failed on checksum.

Any idea?

onebuck 12-05-2008 06:38 AM

Hi,

Do you use any options with the 'cp' command? What about the flash, the state or condition? Have you checked the device?

mynameisthomas 12-06-2008 01:16 AM

Quote:

Originally Posted by onebuck (Post 3365354)
Hi,
Do you use any options with the 'cp' command?

I used cp -rv as I am moving a folder.
I also tried copying or moving the iso image only.
But all failed.


Quote:

Originally Posted by onebuck (Post 3365354)
Hi,
What about the flash, the state or condition? Have you checked the device?

I have tried this on 3 usbs. All are working otherwise fine.
This only happens with iso images and wikipedia tar files.

May be it is because of size.
Because I have tried moving small iso images and tar files. They work fine. No problem with them.
While the iso of fedora live is about 700 Mb and wikipedia is 2GB.
What do you think?

onebuck 12-06-2008 07:08 AM

Hi,

You should be copying or moving the iso image to the usb or any other device.

To copy a iso;

Code:


~# cp -p myiso.iso /mnt/usb/mynewiso.iso

This would preserve and copy the 'myiso.iso' to the file 'mynewiso.iso' on the mounted 'mnt/usb/'.

If you want to move the iso then;

Code:

~#mv myiso.iso /mnt/usb/mynewios.iso
You should 'man cp' and 'man mv'.


All times are GMT -5. The time now is 05:57 PM.