473,396 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Debian MD5 Digests

After 4 failed attempts at installing Debian Linux from CDs
that were burned from downloaded .iso files, I've finally come to
the conclusion that my CD Burner is not working properly ....

The md5 digests of all downloaded .iso files has checked out OK
in each case PRIOR to burning them to CD and in each case
the burned CDs always boot and begin the Debian install proc
which ultimately fails due to md5 errors .....

The Debian installer doesn't present the user
with the opportunity to check CD-ROM integrity
until AFTER the above failures have occurred,
which seems a bit late ....

I wrote a small script to check md5s of the burned CD files
against those in the supplied md5sum.txt file,
but since the burned CD I have is corrupted,
testing the script is somewhat tedious and fails
at different points in processing with the following error
attributed to permissions ....

Traceback (most recent call last):
File "K:\Python\py_Work\file\deb_md5.py", line 76, in ?
that_md5 = md5_digest( this_path )
File "K:\Python\py_Work\file\deb_md5.py", line 53, in md5_digest
xFile = file( xPath , 'rb' ).read()
IOError: [Errno 13] Permission denied

I'm not particularly interested in getting rid of that particular error
as I think/hope it will go away when I get a good CD burn ....

However, I would like to hear from someone
who has a Debian CD with the md5sum.txt file
on it that would test the script and see if it
actually runs all the way to completion ....

Are all the files that are listed in the md5sum.txt file
always included on the CD ????

I added a check for this after seeing file not found errors
in the script ....

# ------------------------------------------------------------------------------------------

import md5 , os , sys

if len( sys.argv ) < 2 :
print ' Usage .......... python deb_md5.py base_path_to_CD'
sys.exit( -1 )

base_path = sys.argv[ 1 ]

if not os.path.exists( base_path ) :
print ' **** Base Path NOT Found ****'
sys.exit( -2 )

os.chdir( base_path )

file_in = file( 'md5sum.txt' , 'r' )

def md5_digest( xPath ) :
xFile = file( xPath , 'rb' ).read()
m = md5.new()
m.update( xFile )
return m.hexdigest()

rec_num = 0

for this_line in file_in :

this_list = this_line.split()

this_md5 = this_list[ 0 ]
this_path = this_list[ 1 ]

rec_num += 1

if os.path.exists( this_path ) :

that_md5 = md5_digest( this_path )

if this_md5 != that_md5 :
print '%4d * MD5 Error * %s ' % ( rec_num , this_path )

else :
print '%4d %s' % ( rec_num , this_path )

else :
print '%4d * Not Found * %s' % ( rec_num , this_path )

file_in.close()

--
Cousin Stanley
Human Being
Phoenix, Arizona

Jul 18 '05 #1
0 1030

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Colin J. Williams | last post by:
The distutils download page has: -------------------------------------------------------- Current stable release The current stable release is Distutils 1.0.2; you can download it as: *...
3
by: Alex Stapleton | last post by:
Whenever I run python I get "Warning! you are running an untested version of Python." prepended to the start of any output on stdout. This is with Debian and python 2.3 (running the debian...
7
by: Oliver Elphick | last post by:
Debian packages of PostgreSQL 7.4beta4 are available in the experimental section of the Debian archive. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight,...
7
by: Oliver Elphick | last post by:
Debian packages of 7.4 have been uploaded to Debian's experimental archive. Because of certain issues with interlocking dependencies, I will not move them to unstable until version 7.3.4-9 is...
1
by: Erwin Brandstetter | last post by:
Hi Newsgroup! Some weeks back (2003-11-18), Oliver Elphick wrote in this newsgroup: > A version built for woody (stable) is available at > http://people.debian.org/~elphick/debian This is...
9
by: amhoov | last post by:
Hi all, I'm trying to install wxPython on Debian using 'apt-get install python-wxgtk2.4.' I've got both Python 2.3 and 2.4 installed with 2.4 set as my default. For whatever reason, wxPython...
4
by: Brian van den Broek | last post by:
Hi all, I know that this is something for which I could (keep) STFW, but I'm mostly ignorant of the subject area and under a bit of a deadline. So I hope people won't mind if I truncate my...
0
by: gandalf | last post by:
I am trying to install oracle 9i on debian. The oracle 9i linux installation manual provides a checklist of pre-installation changes that have to be made to linux before installing oracle. I am...
2
by: Niranjan | last post by:
Hi everyone, How to get single emails instead of digests for this newsgroup? I do not want to get messages in digest. Any comments/help will be appreciated. Thanks, Niranjan.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.