LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 01-28-2004, 02:20 AM   #1
Mynar
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Rep: Reputation: 0
RH9 Software Raid 1 hard drive failure - GRUB loader errors


Background:

Trying to help a company that is using a RH9 2.4.20.18-9 box as a Firewall / IDS / Proxy server recover from a hard drive failure. I didn't do the original install (ha! I was lucky to get RH9 installed on my own "spare" computer to learn how it works .. sorta ) at home. I know enough about RH9 Linux to know that I don't know what I'm doing.

The box was running 2 - 20GB HD's. One drive failed, the other didn't "kick in" automatically. I fixed that problem by commenting out a line the /etc/fstab that was referring to a /dev/hdb1 /boot2 command. I was able to RMA the defective drive under warranty, Ghost'd (7.5 ) the "good" drive to the new one, the Raid 1 recovered (eventually) and all was grand. I can't recall all of the details, I just know I got it to work again!

Fast forward 2 months - the older 20GB suffered a hardware failure. The system is now running on a single drive with RAID complaining about not having a spare available to reconstruct the array.

The "powers that be" want a pair of 40GB drives installed into the box with all of the data intact. They apparently run a proxy server that only allows their users to access websites they authorize. Fresh install and configuration ( even if I knew exactly how ) isn't an option since the person that set all of this up is not available.

Situation:

I used Ghost 7.5 to clone 20GB to the 40GB using drive to drive copy. I reset the partition sizes to match the old sizes before cloning. It said it completely successfully - had 20GB or so of unpartitioned space on the drive. I then disconnected the 20GB, set the 40GB as Master (single) and attempted to boot. I got a message that read:

GRUB GRUB GRUB (ASCII smiley face) GEOM error

I did some Googlin' and found that a recommended solution was to /sbin/grub -install /dev/hda from a boot disk or CD. I downloaded the RH9 Shrike Distro ISO1, made a CD and booted from it. Typed Linux Rescue (enter a few times ) and got the choice to Continue, RO, Skip. Continue said it couldn't find any Linux partitions, dropped me to a shell. I tried to mount /dev/hda without any luck. /sbin didn't have any GRUB or LILO stuff in it. I thought to myself "Self, perhaps we need to partition the drive in Linux and try using Ghost 7.5 in a part to part copy mode."

I hooked up the original drive by itself and ran a fdisk -l :


Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 10 80293+ 83 Linux
/dev/hda2 11 43 265072+ 82 Linux swap
/dev/hda3 44 2434 19205707+ fd Linux raid autodetect

Further digging revealed that hda1 is /boot, hda2 is Swap, hda3 is /dev/md0 mounted as /.

At this point, I shut down the server, installed the pair of 40GB drives, and ran a fresh install procedure. I created hda1 and 2 as close to the original sizes I could, then created hda3 using the rest of the disk ( figuring I could go ahead and resize the partition since it's a raid volume anyway ). I did this in graphical mode so that I could use the "minimal" install procedure. I let it finish the installation, rebooted into a clean install of RH9, everything seemed fine - no errors on boot. Shutdown the server.

I then hooked up one of the 40's as a slave, the old 20 as a master and did a ghost partition to partition of hda1 ( /boot ) and /hda3 ( / ) only. (EDIT: Ghost 7.5 only recognized Ext2 and Ext3 partitions .... the Software RAID volume was "unknown" ) I figured the swap file didn't need to be done, since it would be empty anyway. I shutdown, disco'd the 20GB, set the Ghosted 40 as Master, the other Slave, booted up - same GRUB error. Tried to boot off CD and it again wouldn't recognize any Linux partitions on the drives.

I'm completely stumped at this point - I'm not really sure how to migrate the data from the 20GB to the 40GB and make it all work exactly the way it did before.

screams for help from the "mastah's" !!!! Ok ok .... sorry for the 'net speak ... I'm so confused and tired right now .... I need to find something humorous

Contents of /etc/fstab (from 20G drive)

cat /etc/fstab
/dev/md0 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
# LABEL=/boot2 /boot2 ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb2 swap swap defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


Contents of /boot/grub/grub.conf

cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/md0
# initrd /initrd-version.img
#boot=/dev/hda
#default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-18.9)
root (hd0,0)
kernel /vmlinuz-2.4.20-18.9 ro root=/dev/md0
initrd /initrd-2.4.20-18.9.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=/dev/md0
initrd /initrd-2.4.20-8.img


Thanks in advance for any help you can provide. I apologize for the long post - I am just trying to give as much information as I can.

~M~

Last edited by Mynar; 01-28-2004 at 02:24 AM.
 
Old 01-28-2004, 10:25 AM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, SolydK 2013
Posts: 7,434

Rep: Reputation: 134Reputation: 134
I suggest that you abandon the ghost approach of cloning hard drives. You run into too many problems when the disk geometries of the two hard drives are different. Instead I suggest that you use a file tree approach. Use tar to back up your old RAID hard drives to CD-R or whatever. Set up your new hardware and restore the file trees from your tar backup.

As a general rule, backing up and restoring by file is easier than backing up and restoring by hard drive.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
  


Reply

Tags
boot, grub


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Software RAID 1 setup on CentOS using Grub boot loader kumarsundaram Linux - Software 1 11-30-2005 12:57 PM
GRUB errors, booting on 2nd hard drive p1800 Linux - Newbie 14 12-02-2004 01:05 PM
verify faulty software raid hard drive jwstric2 Linux - Hardware 0 07-06-2004 10:58 PM
HPT raid + RH9 boot loader ?? GuitsBoy Linux - General 0 01-16-2004 10:07 AM


All times are GMT -5. The time now is 03:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration