LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 06-17-2011, 08:05 PM   #1
wagonlips
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Rep: Reputation: 0
Tried to Ext3 a 3TB drive, now grub can't find the kernel Centos 5.6 Raid 1


After setting the partition on the new external 3TB drive (using gdisk), I rebooted and that's when the trouble began. The external drive, which was to back up some other failing drives, none of which is the boot disk, seemed to be preventing boot. Probably, I should have made more careful note of what the computer said at that time, but it was late and I was tired and... http://xkcd.com/349/ Probably, I should have just unplugged the new drive and started over, but instead I tried to fix things by commenting out the new drive in fstab.

In rescue mode, I can chroot /mnt/sysimage, so I assume it's mostly in good shape. I just need to figure out how to fix grub. But since it's a Raid 1, things are a teeny bit more complicated. It's a software raid that is managed by the Intel BIOS on an Inspiron 530s, Intel Celeron 450 (2.20GHz,800FSB).

So far, I've tried to install-grub on /dev/mapper/isw_caaccjcibc_mercurial1 and received the error message: "The file /boot/grub/stage1 not read correctly." Not sure what to make of that.

Suggestions? Advice? Amusing anecdotes or favorite web comics?

fdisk -l looks like this:
Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       60800   488271577+  8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14       60800   488271577+  8e  Linux LVM
fstab:
Code:
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/sdj2       /mnt/temp   ntfs-3g  ro,umask=0222,defaults 0 0
#/dev/sde1       /media/backup2011 ext3 defaults 0 2
/boot/grub/device.map:
Code:
# this device map was generated by anaconda
(hd0) /dev/mapper/isw_caaccjcibc_mercurial1
/boot/grub/grub.conf:
Code:
# 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/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/mapper/isw_caaccjcibc_mercurial1
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-238.12.1.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-238.12.1.el5
	module /vmlinuz-2.6.18-238.12.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	module /initrd-2.6.18-238.12.1.el5xen.img
title CentOS (2.6.18-238.12.1.el5debug)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-238.12.1.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-238.12.1.el5debug.img
title CentOS (2.6.18-238.9.1.el5debug)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-238.9.1.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-238.9.1.el5debug.img
title CentOS (2.6.18-238.9.1.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-238.9.1.el5
	module /vmlinuz-2.6.18-238.9.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	module /initrd-2.6.18-238.9.1.el5xen.img
title CentOS (2.6.18-238.5.1.el5debug)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-238.5.1.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-238.5.1.el5debug.img
title CentOS (2.6.18-238.5.1.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-238.5.1.el5
	module /vmlinuz-2.6.18-238.5.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	module /initrd-2.6.18-238.5.1.el5xen.img
title CentOS (2.6.18-194.32.1.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-194.32.1.el5
	module /vmlinuz-2.6.18-194.32.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	module /initrd-2.6.18-194.32.1.el5xen.img
title CentOS (2.6.18-194.32.1.el5debug)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.32.1.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-194.32.1.el5debug.img
title CentOS (2.6.18-194.26.1.el5debug)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.26.1.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-194.26.1.el5debug.img
title CentOS (2.6.18-194.26.1.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-194.26.1.el5
	module /vmlinuz-2.6.18-194.26.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	module /initrd-2.6.18-194.26.1.el5xen.img

Last edited by wagonlips; 06-18-2011 at 11:54 AM. Reason: Removed references to /dev/sdc which is an external drive I thought I had disconnected.
 
Old 06-19-2011, 11:28 AM   #2
wagonlips
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Manually Rebuild Grub

I thought this looked like a close match to my problem:
http://idolinux.blogspot.com/2009/07...er-on-md0.html
Only it didn't work for me.
Code:
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... failed
Error 2: Bad file or directory type
 
Old 06-19-2011, 12:06 PM   #3
wagonlips
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Manually Rebuild Grub

Next, this link shows some interesting stuff: http://www.linuxquestions.org/

So I type 'root (hd0,' and then hit the tab key and see this:
Code:
Possible partitions are:
  Partition num: 0, Filesystem type is ext2fs, partition type 0x83
  Partition num: 1, Filesystem type is unknown, partition type 0x8e
Thanks to this page: Partition types: List of partition identifiers for PCs I can see that 0x83 is a 'Linux native partition' and 0x8e is a 'Linux Logical Volume Manager partition.' But that doesn't really help me much, since running setup on the 0x8e partition fails with the message: "Error 17: Cannot mount selected partition."

But something has happened: now when I try to boot, CentOS starts, sort of. Instead of the Grub shell, I land on a page with the blue CentOS logo in the background and 'GNU GRUB version 0.97 (616K lower / 2085440K upper memory)' at the top. And a big list of kernels:
2.6.18-194.26.1.el5xen
2.6.18-194.32.1.el5xen
2.6.18-238.5.1.el5xen
2.6.18-238.9.1.el5xen
2.6.28-238.12.1.el5xen
and all of their debug versions, too.
Unfortunately, choosing most of these simply leads me to the 'Bad file or directory type' error message and at least one of them causes a kernel panic.

Tune in next week for the next exciting installment!
 
Old 06-24-2011, 11:31 PM   #4
wagonlips
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Supergrub

Downloaded supergrub (http://www.supergrubdisk.org/). And this looks like a fine utility, but it hasn't improved my situation any. I think, for the most part, I had already repaired grub. And now, whenever I try to boot any of the kernels, grub says: Error 2: Bad file or directory type. And this page here: http://www.uruk.org/orig-grub/errors.html tells me that "This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO." But I don't think I can take that at face value. Based on what I've read, I'm developing a suspicion that the raid is the problem, that grub just doesn't see the raid as a proper/bootable disk. Not sure how it worked in the first place, but I'll make sure my boot drive is just a regular old hard drive in the future. I think next I will try to see if I can convert my raid 1 drives into normal drives.
 
Old 06-25-2011, 01:07 AM   #5
wagonlips
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Reset Raid 1 to non-raid

And that seems to have worked. Using Intel Matrix Storage Manager, I simply converted one drive and then the other back to non-raid, rebooted, and pointed grub at the drive that was not hd0 (I think it was hd5 or something weird like that, probably I installed them goofily). But the next thing I know, my server is running again. Oh, and I should mention that I had everything backed up already. The Storage Manager issues a "you will lose all your data" warning when you convert to non-raid, but apparently that's not a sure thing with Raid 1, at least it wasn't in my case. Raid 0, you'd probably be screwed.

Anywayz... cheers! umm... all of you. Now I can get back to working on that 3TB drive.
 
  


Reply

Tags
centos5, fdisk, fstab, 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Raid 0 /dev/md0 shows only 9.7 gbs. Why is it not showing 3tb? davide123 Linux - Hardware 10 11-03-2010 08:34 AM
Parition Limits on CentOS (Can't Make 3TB Paritition) r00tb00t Linux - Newbie 2 07-30-2008 03:30 AM
ext3 RAID 1 on a USB External Two Disk Hard Drive - Possible? Runge_Kutta Linux - Hardware 3 08-17-2007 06:28 PM
3TB Raid 5 with adaptec 2820sa can't boot raf_iso Linux - Hardware 3 05-07-2007 02:15 PM
3TB IDE Software Raid-5 Server!!! sanwizard Linux - General 1 11-21-2004 11:31 PM


All times are GMT -5. The time now is 04:07 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