How to check if the downloaded ISO in the build server is CORRUPTED or NOT
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.
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.
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 !!!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.