PDA

View Full Version : sha1sum giving different outputs each time



bingoUV
1st June 2008, 02:11 PM
This is my full story http://fedoraforum.org/forum/showthread.php?t=190426 , but the issue has changed a lot now. So posting a new thread with a more relevant title.

When I run sha1sum for a file, I get different outputs each time I run. Even if there is no change in the file, file's last modification date is well in the past. This is in my installed Fedora 8, but the same in Knoppix Live CD too. Any ideas?



$ sha1sum Fedora-9-i386-DVD.iso
290473d13c8be0cec9fe11aaeec283b036ae7a91 Fedora-9-i386-DVD.iso
$ vim SHA1SUM
$ sha1sum Fedora-9-i386-DVD.iso
4846eb3769ca81830aeec1e93a1881113f0bca46 Fedora-9-i386-DVD.iso
$ sha1sum Fedora-9-i386-DVD.iso
05b947c7ff7ee5068589bd46374353bff8e5a9fc Fedora-9-i386-DVD.iso

knoppix@Knoppix:/media/sdb5/images/linux/fixed$ sha1sum Fedora-9-i386-DVD.iso
89b2a7d9dc6d6d828e5455884801179c337fc888 Fedora-9-i386-DVD.iso
knoppix@Knoppix:/media/sdb5/images/linux/fixed$ sha1sum Fedora-9-i386-DVD.iso
466d3f39b8371f2112da38a0a1c71d7d3ee14f4b Fedora-9-i386-DVD.iso
knoppix@Knoppix:/media/sdb5/images/linux/fixed$ sha1sum Fedora-9-i386-DVD.iso
a6d18b07ab323f0e1e1c77bfc9587e49e289fb2c Fedora-9-i386-DVD.iso

stevea
1st June 2008, 02:26 PM
There is an excellent probability that you have a DRAM error.
Try

su -
yum -y install memtest86+
cat >>/boot/grub/grub.conf <<EOF
title memtest86+
kernel (hd0,0)/memtest86+-1.70
EOF

You'll have to fill in the exact disk & partition "(hd0,0)" and the exact memtest86+ file name (may not be rev "-1.70").

Then reboot and select memtest86+ at the grub boot menu.
Run the test overnight.


Also if you suspect your disk, and if it has smart technology you can ...
smartctl -d ata -a /dev/sda
and look at the raw read error rate (should be zero).
Hardware_ECC_Recovered can be large (millions) and doesn't represent a cause of your problem.

bingoUV
1st June 2008, 02:29 PM
should I replace (hd0,0) by /boot partition, or / partition?

I have tested on 3 different partitions spread over 2 drives (sda and sdb) so maybe hard disk is healthy. Still thanks for letting me know this.

EDIT : Will the smartctl command take a long time?

stevea
1st June 2008, 02:40 PM
should I replace (hd0,0) by /boot partition, or / partition?

I have tested on 3 different partitions spread over 2 drives (sda and sdb) so maybe hard disk is healthy. Still thanks for letting me know this.

EDIT : Will the smartctl command take a long time?

Smartctl takes abt 1 second or less, but not all disks support smartctl..

the file /boot/memtest86+-1.xx is installed in the same locatation as your Linux kernels - so follow the pattern n your grub.conf file ...

For example on one system I have a separate /boot partition (the Fedora installer default) so my grub.conf file looks like ....

title Fedora (2.6.24.7-92.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.24.7-92.fc8 ro root=/dev/VG0/root1 rhgb quiet vga=795
initrd /initrd-2.6.24.7-92.fc8.img
......
title memtest86+
kernel (hd0,0)/memtest86+-1.70


The Linux kernel boot uses "root (hd0,0)", and the Linux kernel uses "kernel /vmlinuz-2...". so construct memtest86+ the same way "kernel (hd0,0)/memtest....".

Note that some Fedora custom installs may have "/boot/vmlinuz..." then use "(hdN,M)/boot/memtest86+...".


[edit]
http://www.memtest86.com/

Memtest86+ is a really sweet test utility, GPL'ed. All the PC builders use it Linux or otherwise. If you have a really significant memory problem (like yours, I suspect) you'll probabaly see errors appear in the first 3 or 4 test of the suite - say within the first minute. For more subtle errors you may have to let the whole suite repeat half a dozen times before you see an error.

The address of the error may hint at which memory stick has the problem.

Hlingler
1st June 2008, 02:54 PM
Also if you suspect your disk, and if it has smart technology you can ...
smartctl -d ata -a /dev/sda
and look at the raw read error rate (should be zero).
Hardware_ECC_Recovered can be large (millions) and doesn't represent a cause of your problem.Hi, stevea:

Um, that's a very interesting statement. I see values in the tens-of-thousands ot even millions on my main box, and these HDDs aren't that old. What's the criterion, or where to find more info on that subject? Or: should I be concerned?

Thanx and Regards,
V

stevea
1st June 2008, 03:43 PM
Hi, stevea:

Um, that's a very interesting statement. I see values in the tens-of-thousands ot even millions on my main box, and these HDDs aren't that old. What's the criterion, or where to find more info on that subject? Or: should I be concerned?

Thanx and Regards,
V

Interesting ...

I just tested a total of 10 disks. 8 have zero counts. Two (bother older seagate 7200.7 series) have significant counts. One of these went bad ~18 months ago and I had to use a seagate utility to map out bad blocks and "hard" reformat. Both have 30000+ hours. So these are vendor specific and so I'm probably wrong to insist on zero counts. An older 7200.1 has a zero count too !

No - I know basic drive physics, but I don't have special insight into SMART parameters.
http://gentoo-wiki.com/HOWTO_Monitor_your_hard_disk(s)_with_smartmontools

You're probably better off doing:
smartctl -H /dev/sda
and letting the utility evaluate the parameters.


I guess I'll read up on the issue. My soho server have some well worn disks. Aside from some temporary power outages these have been spinning for 4+ years.

Hlingler
1st June 2008, 03:50 PM
Tested both older boxes, (4) other HDDs, two very old (one had to use '-T permissive' to get a read from smartctl, but it got in): 0, 0, 0, 1 (on the oldest disk). Hmm.... guess I'll read up on this, too - I can't afford two HDD failures on main box with most of my data. Especially with LVM.

V

bingoUV
1st June 2008, 07:35 PM
You are spot on stevea. Memtest shows the error in 5 seconds.

Unfortunately one of my "higher end" modules went bad. What is your experience of getting warranty replacement because of memtest failure? Dealer would surely show me the BIOS information after plugging it in, which is flawless.

Hlingler
1st June 2008, 08:02 PM
Does your BIOS have a setting to suppress extended RAM tests and just do "quickies"? Mine does - if so, change it to allow longer/deeper BIOS RAM tests.

V

bingoUV
1st June 2008, 08:09 PM
You mean you don't need memtest to do RAM tests, your BIOS provides a utility? Mine does not have such a utility. I'll look for the option though. What is it called in BIOS terminology?

Hlingler
1st June 2008, 08:26 PM
Ummm... I forget. It's something "mem" or "memory", and actually there's a setting to "enable quick-boots", which effectively skips the RAM tests (it says so on the side-bar). This is an IBM mobo, can't remember the BIOS vendor (it seems I'm having some memory problems too... :D ). It's been so long since I re-booted - re-boots occur so infrequently with Fedora, only when there's a power failure....

Besides, any BIOS RAM test will never be as thorough as 'memtest86+'.

V

stevea
2nd June 2008, 12:15 AM
As for the memory problem ... you'll probably need to replace a dram stick. FWIW whenever I buy a new bit of memory I run memtest86 overnight and if I don't get a clean run - it goes back. I just got 4GB of Mushkin this week and it passed cleanly.

First look at the system & cpu temps. If your memory or CPU (either one) is too hot you will get mem errors.

Also you *MAY* be able to get your system to pass memtest86+ if you can get into the bios and slow down the memory timing (increase the RAS/CAS and CYCLE by 1 cycle each and try again) . Some cheaper memories sticks don't really make the memory timing they claim in the SPD.

The good news for you - memory is as cheap as it will get (perhaps before Ragnarok) so stock up.

cheers,
-SteveA