# GRUB. Disk read error

## r.osmanov

Hi.

I have a strange problem with grub. Every day I turn on PC GRUB fails to read disk with message like:

```
GRUB ERROR 25: Disk read error

(or something similar)
```

At that time I press Ctrl-Alt-Del and reboot. The same error. I repeat it 3-4 times, and GRUB eventually finds the boot partition and loads the kernel. 

Sometimes it finds boot partition, but fails at some kind of INIT process(I guess somewhere when it tries to recognize hard drives).

I tried to (re-)install both grub versions 1 and 2 to MBR. Didn't help.

Almost forgot, after it successfully loads OS, I can successfully reboot it many times, and it works. 

But the next day it fails again...

No clue. Please help.

Regards.

----------

## DONAHUE

hardware problem developing.

----------

## r.osmanov

 *DONAHUE wrote:*   

> hardware problem developing.

 

Hmm, yes, it is a hard drive problem  :Smile:  Or maybe GRUB's problem. Or something else. 

This is what I'm actually trying to figure out  :Wink: 

----------

## DONAHUE

emerge and use smartmontools on the drives

----------

## r.osmanov

 *DONAHUE wrote:*   

> emerge and use smartmontools on the drives

 

Emerged smartmontools and set up smartd daemon on default runlevel. The tests passed. SMART status is OK. I have no idea. I'll paste some terminal output here:

```

root@devbox /home/ruslan # badblocks -v /dev/sda1

Checking blocks 0 to 409599

Checking for bad blocks (read-only test): done                                                 

Pass completed, 0 bad blocks found. (0/0/0 errors)

root@devbox /home/ruslan # smartctl -l error /dev/sda

smartctl 5.42 2011-10-20 r3458 [x86_64-linux-3.5.7-gentoo] (local build)

Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===

SMART Error Log Version: 1

No Errors Logged

root@devbox /home/ruslan # fdisk -l /dev/sda

Disk /dev/sda: 250.1 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00069a98

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048      821247      409600   83  Linux

/dev/sda2          821248    17598447     8388600   82  Linux swap / Solaris

/dev/sda3        25989120    78417919    26214400   83  Linux

/dev/sda4        78417920   488396799   204989440    5  Extended

/dev/sda5        78419968   130848767    26214400   83  Linux

/dev/sda6       130850816   141336575     5242880   83  Linux

/dev/sda7       141338624   488396799   173529088   83  Linux

root@devbox /home/ruslan # fsck /dev/sda1

fsck from util-linux 2.21.2

e2fsck 1.42 (29-Nov-2011)

boot: clean, 314/102400 files, 42729/409600 blocks (check in 3 mounts)

```

I'm thinking of using another disk just for boot partition. Should I try to move /boot to /dev/sdb, for instance?

EDIT: Again. There is a strange sequence of boot attempts:

1. I turn on the PC first time. GRUB fails with error 25: disk read error

2. I press Ctrl-Alt-Del and reboot it. GRUB now loads, and the boot process goes until INIT 1. There are some messages about failed disk reads. 

Ctrl-Alt-Del now doesn't work: /sbin/shutdown is unknown command. I press "reset" on the PC box.

3. Now it can catch GRUB's 25 error again for some time. And after some attempts it successfully loads entire system.

Every time it is the same sequence of iterations   :Rolling Eyes: 

----------

## Aquous

 *r.osmanov wrote:*   

> 1. I turn on the PC first time. GRUB fails with error 25: disk read error

 this may point to a hardware problem.

 *Quote:*   

> 2. I press Ctrl-Alt-Del and reboot it. GRUB now loads, and the boot process goes until INIT 1. There are some messages about failed disk reads. 

 this likely points to a hardware problem.

 *Quote:*   

> /sbin/shutdown is unknown command.

 this definitely points to a hardware problem.

you have a hardware problem - most likely the disk itself is dying. Sorry  :Sad: 

----------

## r.osmanov

 *Aquous wrote:*   

>  *r.osmanov wrote:*   1. I turn on the PC first time. GRUB fails with error 25: disk read error this may point to a hardware problem.
> 
>  *Quote:*   2. I press Ctrl-Alt-Del and reboot it. GRUB now loads, and the boot process goes until INIT 1. There are some messages about failed disk reads.  this likely points to a hardware problem.
> 
>  *Quote:*   /sbin/shutdown is unknown command. this definitely points to a hardware problem.
> ...

 

Thanks. But I'd like to see an evidence. Nor S.M.A.R.T, nor other thing reports about the error. 

However, it worked after the following simple procedure:

```

# e2fsck -c /dev/sda1

```

It detected and fixed 3.8% of non-contiguous blocks for my 400MB /dev/sda1(/boot) partition.

It's 3rd or 4th time I boot after shutdown. So far it works flawlessly   :Surprised: 

EDIT: Almost forgot. I've also replaced GRUB legacy with GRUB 2. 

But in attempts to overwrite probably buggy bootloader on MBR I did it before too. It didn't help until `e2fsck`.

----------

## wcg

Power supply failing? Maybe there is a monitor in BIOS setup

that can show you voltages after a cold boot. Wait 5-10

minutes (while everything warms up), then reboot and

enter BIOS setup again, and view the same page. See

how the voltages compare to what they were immediately

after a cold boot.

(If this tells you nothing, try hooking up a different

power supply and see if the behavior persists.)

----------

## Jaglover

This will print a little better report:

```
smartctl --all /dev/sdb | grep -e "Reallocated_Sector_Ct" -e "Current_Pending_Sector" -e "Offline_Uncorrectable" -e "UDMA_CRC_Error_Count" -e "Hardware_ECC_Recovered"
```

----------

