Ubuntu software RAID primary disk failure

OS: Ubuntu 6.06
Setup: 2 disks RAID 1.  3 partitions, 2 of which are md devices.
Problem:Primary disk failure with grub 25 error and bad sectors

Machine was not booting past grub 1.5 and was saying “Error 25”.

Grub error code 25:

 25 : Disk read error: This error is returned if there is a disk read error when trying to probe or read data from a particular disk.

Basically the primary disk was wasted, but, the second disk wouldn’t boot because the primary disk was active enough to start up grub stage 1.5… and fail.

Booted up with the Ubuntu 6.06 CDROM and selected rescue.  Setup networking and then was given an option to try and start a shell on any of the partitions.

Although disk0 was the faulty disk it was not possible to mount any of the disk1 partitions and it gave an error.

Was able to mount the root partition on the faulty disk and use a shell from the rescue disk.

Ran fsck.ext3  on /dev/hdc1, /dev/hdc3 and corrected any errors on the partitions.

In the shell it was possible to mount the mdX raid devices, but, not the individual /dev/hdcX devices as they were already in use.  “cat /proc/mdstat” showed that hdc was being used by the md0/md1 devices.

Mounted the file systems on the secondary disk with:

mount /dev/md1 /mnt
mount /dev/md0 /mnt/boot
chroot /mnt

Then ran grub and following commands:

grub>device (hd0) /dev/hdc
grub>root (hd0,0)
grub>setup (hd0)
grub>quit

Now, grub was definately installed on the second disk but on reboot it would still boot off the first disk.  Removed the partition table from the faulty disk0 using fdisk and rebooted and the system booted up fine other than numerous hda disk errors.

URL:

Leave a Reply

Your email address will not be published. Required fields are marked *