LinuxQuestions.org
Help answer threads with 0 replies.
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 09-11-2009, 06:42 AM   #1
linuxkatty
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
How to check if the downloaded ISO in the build server is CORRUPTED or NOT


Hi LinuxGods,

I currently have a scenario that i have to take care of. I will explain the steps and i seek your help in resolving my clarifications.

Problem statement - I ftp an iso image from my build server to the windows server and then i try to do an L2 upgrade on the build server from a lower linux version to a higher linux version. The iso image that has been initially stored frm the build server to windows server was through ascii transfer. ( I know that the transfer should not be ascii because it may corrupt the data as binary iso is transferred as ASCII ).

During the L2 upgrade, i face an error saying that the mount cannot be created. This is precisely because the file is corrupted.

I NEED TO WRITE A CHECK IN MY SCRIPT TO FLASH an error saying that the iso is CORRUPTED. But i dont KNOW HOW TO ascertain that iso is corrupted )

COMMANDS I HAVE TRIED ::
---------------------------
1) md5sum is not an option here. Please suggest any other thing
2) FILE command gives the details on the type of file but it actually has no difference between a normal iso file and a corrupted one.


ASSUMPTIONS ::
-------------------
The WIndows server has already been added of the build server IP for FTP permissions using the IIS manager.

Steps ::
-----------
1) Copy from build server to windows server through FTP
2) Now start an L2 Upgrade in the build server and during the time when the image needs to be provided, say the location as the ISO in windows server and choose file transfer mode as FTP
3) Now the iso will be downloaded but it will not be able to mount to the disk.


PLEASE help me rectify the issue by assisting me in knowing how to check if the ISO is corrupted after the download.

Regards,
LinuxKatty
 
Old 09-11-2009, 08:04 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
The only way (apart from trying to use the ISO) is to do a checksum test. Why is that not an option here?

Oops, almost forgot - welcome to LQ
 
Old 09-11-2009, 10:05 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
/
Quote:
But i dont KNOW HOW TO ascertain that iso is corrupted
--$: md5sum -b FILENAME

--$: md5sum -w

this tool command is proven to be reliable
-----------------

Quote:
1) md5sum is not an option here. Please suggest any other thing
Why not an option?
-----------------
 
Old 09-11-2009, 10:33 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by linuxkatty View Post
1) md5sum is not an option here. Please suggest any other thing
hows about CRC32 then, if you're going to be recalcitrant?
 
Old 09-12-2009, 03:24 AM   #5
linuxkatty
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Folks, thanks a lot for the answers. And honestly i expected a late reply on a forum and i now can actually adjudje that this is a very active forum.

NOW To answer my statement of WHY NOT CHCKING FOR MD5SUM !!!

From my existing script perspective, the ISO initially gets downloaded and is mounted properly on the build server. After the mount is created, that is when the MD5 checksum is initiated to check the integrity of the downloaded ISO image.

KEEPING IN MIND, that we FTP'd in ascii mode from the build server to windows server aqnd back to the buid server again through FTP, the binary ISO file would already have gotten corrupted for sure during stage 1 ftp from build server to windows server ( This is becaue typically if a binary file is ftp'd in ascii mode there is some manipulation of the message).

Now due to the corrupted file, the mount is not creAted properly and hence it has a premature termination, which is why the MD5 calculation is not made.

SO now, request the gurus to let me know if there is a possibility of another check implementation on thee image downloaded to ascertain a corruption in the image, or i need to go about changing the logic in the script.

Any help for another check will he gretly helpful !!!

Thanks gurus !
 
Old 09-12-2009, 03:30 AM   #6
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
if you issue the 'bin' ftp command before the get, it will force the mode to binary. Once the file is transferred, you still should verify the integrity with md5 or sha1 before starting an install to head off any potential problems with the iso.
 
Old 09-12-2009, 06:48 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Why not add in a check at each point to determine when it gets corrupted? That way you can isolate potential problems. So:
download - check md5
copy to server1 - check md5
copy to server2 - check md5
copy back to server1 - check md5

If you do this, without mounting the iso, you will have a better chance of working out where you're hitting issues.
 
Old 09-13-2009, 11:48 AM   #8
linuxkatty
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by XavierP View Post
Why not add in a check at each point to determine when it gets corrupted? That way you can isolate potential problems. So:
download - check md5
copy to server1 - check md5
copy to server2 - check md5
copy back to server1 - check md5

If you do this, without mounting the iso, you will have a better chance of working out where you're hitting issues.


Yes Xavier, thats exactly what i had in mind as the last option.

I thought i never needed too much to actually check for the MD5 for any copy between any devices, but just before doing the upgrade with the ftp downloaded ISO.

THANK you very much for your prompt opinions and solutions.

Grateful to all of you.

Reg,
LinKAT
 
  


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
corrupted file in downloaded music now stuck in mp4's mini SD card helphelphelp Linux - Newbie 10 12-28-2006 12:48 AM
I use the iso i downloaded joshd1982 Linux - Newbie 6 01-27-2006 11:17 AM
How to re-build a corrupted content file ? ]un]ie Solaris / OpenSolaris 0 09-06-2004 05:16 AM
I downloaded the gentoo iso in mandrake, what program do i burn the iso with backflippin General 4 04-05-2004 10:20 AM
corrupted iso melinda_sayang Linux - General 1 04-03-2004 12:25 PM

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

All times are GMT -5. The time now is 09:09 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