LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-28-2015, 01:28 PM   #1
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Rep: Reputation: 0
Question MD5Sum - How do I compute the MD5Sum of a downloaded iso?


Was running Windows 8.1 Pro till it got sick and died. I managed to install Ubuntu 14.04 on my sick computer over Windows wiping it out.

I first installed Linux Mint and downloaded Ubuntu. Somehow I was able to verify checksums or MD5Sums. I think my age is catching up with me and my mind doesn't work like it used to.

How do I find the MD5sum of a downloaded iso file. I've downloaded debian-7.8.0-amd64-DVD-1-3.iso's and both update DVD's as well. I've located the MD5Sum files on the Mirror. Now, how do I compare those numbers/letters with the iso's I've downloaded.

I know I need to run a program to compute the MD5 but can't find it in the menu. I see I need to read man pages and info pages, but can't find them either.

A brain is a terrible thing to waste, but mine needs help.

Thanks,
Stephen

Last edited by kd6tzf; 01-28-2015 at 01:32 PM.
 
Old 01-28-2015, 01:37 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
The program is called md5sum. Open a terminal and run:
Code:
md5sum file.iso
If you have an md5 file, you can check it with the -c flag
Code:
md5sum -c file.iso.md5
It will read the md5 file, get the name of the file to check out of it, calculate the md5, compare it to what's in the file, and tell you if there are any differences.

Last edited by suicidaleggroll; 01-28-2015 at 01:41 PM.
 
1 members found this post helpful.
Old 01-28-2015, 01:52 PM   #3
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Also, if I run MD5Sum in a Terminal Window, do I need to be in the same directory where the files are located?

How do I compare the new created MD5Sum with the one posted on the Mirror? Do I just have to read it letter by letter, or is that an input for the MD5Sum program?

I know enough about Linux to be dangereous. I appreciate any guidance you may provide.

Thanks,
 
Old 01-28-2015, 02:00 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Yes you should be in the same directory as the files.

See my edit on the -c flag.
 
1 members found this post helpful.
Old 01-28-2015, 02:06 PM   #5
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Here is the command I entered at the terminal and the result.

stephen@stephen:~/Downloads$ md5sum debian-update-7.8.0-amd64-DVD-1.iso.MD5SUMS
md5sum: debian-update-7.8.0-amd64-DVD-1.iso.MD5SUMS: No such file or directory

Here is the other info in this Directory;

stephen@stephen:~/Downloads$ ls
Audio Disc.toc debian-7.8.0-amd64-DVD-3.iso
Audio Disc.toc.bin debian-update-7.8.0-amd64-DVD-1.iso
debian-7.8.0-amd64-DVD-1.iso debian-update-7.8.0-amd64-DVD-2.iso
debian-7.8.0-amd64-DVD-2.iso MD5SUMS
 
Old 01-28-2015, 02:10 PM   #6
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
stephen@stephen:~/Downloads$ md5sum -c debian-update-7.8.0-amd64-DVD-1.iso.MD5SUMS
md5sum: debian-update-7.8.0-amd64-DVD-1.iso.MD5SUMS: No such file or directory
stephen@stephen:~/Downloads$
 
Old 01-28-2015, 02:12 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
As you can see from the output of ls, there is no file called "debian-update-7.8.0-amd64-DVD-1.iso.MD5SUMS". The file is just called "MD5SUMS".
 
1 members found this post helpful.
Old 01-28-2015, 02:15 PM   #8
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
stephen@stephen:~/Downloads$ md5sum -c file.iso.md5
md5sum: file.iso.md5: No such file or directory
stephen@stephen:~/Downloads$
 
Old 01-28-2015, 02:21 PM   #9
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
stephen@stephen:~/Downloads$ md5sum -c file.iso.MD5SUMS
md5sum: file.iso.MD5SUMS: No such file or directory
stephen@stephen:~/Downloads$

I'm not trying to be difficult. I know Linux is short on explaining errors. I know the file I want checked is in this directory as is the mdd5sums file. I'm just having difficulty with it.

Thank you for trying to assist me.
 
Old 01-28-2015, 02:26 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
It's not short on explaining errors, it's telling you exactly what the error is. You keep typing in random names that don't exist. You might as well be running "md5sum -c thisisnotafile.andisgoingtofail".

Typing random non-existent file names into the terminal will accomplish nothing. As I said before, and as you can see from the output of the "ls" you ran earlier, the file is called "MD5SUMS".

Code:
md5sum -c MD5SUMS
With Linux, you can't just hammer on the keyboard and hope for the best, you need to think about what you're running and why. What do you hope to accomplish? How will the command know what it is you're trying to do? If you don't understand how to use a command, visit its man page with the "man" command. In this case:

Code:
$ man md5sum
MD5SUM(1)                        User Commands                        MD5SUM(1)

NAME
       md5sum - compute and check MD5 message digest

SYNOPSIS
       md5sum [OPTION]... [FILE]...

DESCRIPTION
       Print  or  check MD5 (128-bit) checksums.  With no FILE, or when FILE is
       -, read standard input.

       -c, --check
              read MD5 sums from the FILEs and check them
If you want more information, at the bottom of the man page is the command for more info
Code:
info coreutils 'md5sum invocation'
Which has this tiddbit on the -c flag
Code:
'-c'
'--check'
     Read file names and checksum information (not data) from each FILE
     (or from stdin if no FILE was specified) and report whether the
     checksums match the contents of the named files.  The input to this
     mode of 'md5sum' is usually the output of a prior,
     checksum-generating run of 'md5sum'.  Each valid line of input
     consists of an MD5 checksum, a binary/text flag, and then a file
     name.  Binary mode is indicated with '*', text with ' ' (space).
     For each such line, 'md5sum' reads the named file and computes its
     MD5 checksum.  Then, if the computed message digest does not match
     the one on the line with the file name, the file is noted as having
     failed the test.  Otherwise, the file passes the test.  By default,
     for each valid line, one line is written to standard output
     indicating whether the named file passed the test.  After all
     checks have been performed, if there were any failures, a warning
     is issued to standard error.  Use the '--status' option to inhibit
     that output.  If any listed file cannot be opened or read, if any
     valid line has an MD5 checksum inconsistent with the associated
     file, or if no valid line is found, 'md5sum' exits with nonzero
     status.  Otherwise, it exits successfully.

Last edited by suicidaleggroll; 01-28-2015 at 02:39 PM.
 
1 members found this post helpful.
Old 01-28-2015, 02:39 PM   #11
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Here is the output of the last attempt. It looks like we are making headway. I use copy and paste as much as possible to eliminate typos.

stephen@stephen:~/Downloads$ md5sum -c MD5SUMS
debian-7.8.0-amd64-DVD-1.iso: OK
md5sum: debian-7.8.0-amd64-DVD-10.iso: No such file or directory
debian-7.8.0-amd64-DVD-10.iso: FAILED open or read
debian-7.8.0-amd64-DVD-2.iso: OK
debian-7.8.0-amd64-DVD-3.iso: OK
md5sum: debian-7.8.0-amd64-DVD-4.iso: No such file or directory
debian-7.8.0-amd64-DVD-4.iso: FAILED open or read
md5sum: debian-7.8.0-amd64-DVD-5.iso: No such file or directory
debian-7.8.0-amd64-DVD-5.iso: FAILED open or read
md5sum: debian-7.8.0-amd64-DVD-6.iso: No such file or directory
debian-7.8.0-amd64-DVD-6.iso: FAILED open or read
md5sum: debian-7.8.0-amd64-DVD-7.iso: No such file or directory
debian-7.8.0-amd64-DVD-7.iso: FAILED open or read
md5sum: debian-7.8.0-amd64-DVD-8.iso: No such file or directory
debian-7.8.0-amd64-DVD-8.iso: FAILED open or read
md5sum: debian-7.8.0-amd64-DVD-9.iso: No such file or directory
debian-7.8.0-amd64-DVD-9.iso: FAILED open or read
md5sum: WARNING: 7 listed files could not be read
stephen@stephen:~/Downloads$ ls
Audio Disc.toc debian-7.8.0-amd64-DVD-3.iso
Audio Disc.toc.bin debian-update-7.8.0-amd64-DVD-1.iso
debian-7.8.0-amd64-DVD-1.iso debian-update-7.8.0-amd64-DVD-2.iso
debian-7.8.0-amd64-DVD-2.iso MD5SUMS
stephen@stephen:~/Downloads$

Also included ls of directory.
 
Old 01-28-2015, 02:41 PM   #12
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
So debian-7.8.0-amd64-DVD-1.iso, debian-7.8.0-amd64-DVD-2.iso, and debian-7.8.0-amd64-DVD-3.iso all checked out ok. You didn't download any of the others, so it just printed an error saying it couldn't find them. For some reason the update ISOs you downloaded weren't in the MD5SUMS file.
 
1 members found this post helpful.
Old 01-28-2015, 02:46 PM   #13
kd6tzf
LQ Newbie
 
Registered: Dec 2007
Location: Morrow, AR
Distribution: Hardy Heron 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
I used gedit to open the MD5SUMS file and learned that I only have iso's for 1,2 and 3. The md5's for the update iso's are not included. Looks like 1,2 and 3 are all OK.

Thank you for your help. It is much appreciated.

Stephen
 
Old 01-29-2015, 12:15 PM   #14
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
Here is how to do it without the MD5SUMS file:
1) Copy the correct md5sum number from the website into a new text file in your text editor -
EXAMPLE: 0307ffcd5046c176599904193899426e
2) In your File Manager, right-click on the folder containing the .iso file you downloaded, then chose Open In Terminal
3) In the terminal, enter the command: md5sum debian-update-7.8.0-amd64-DVD-1.iso
4) After a few seconds, it will give you the number. Copy the number to your text file, placing it under the original number, so that you can compare them at a glance.
EXAMPLE:
0307ffcd5046c176599904193899426e
0307ffcd5046c176599904193899426e
 
  


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
[SOLVED] Downloaded Ubuntu 12.04.2 from Linuxiso.org. Md5sum mismatch gcinglis Linux - Newbie 4 03-05-2013 10:38 PM
md5sum error of a completely downloaded debian ISO rajuchal Linux - Newbie 5 04-27-2011 11:08 PM
MD5sum of iso and dvd is different? G00fy Linux - General 5 11-19-2007 06:59 AM
ISO download - md5sum does not match tvsrao Red Hat 2 12-08-2006 10:42 AM
MD5SUM failed for slackcurrent downloaded from mirrors firebird Slackware 3 03-29-2005 10:37 PM

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

All times are GMT -5. The time now is 07:39 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
Open Source Consulting | Domain Registration