Install grub on /dev/md0, CentOS 6

General support questions

Install grub on /dev/md0, CentOS 6

Postby ebroch » 2011/12/29 00:11:28

Hello,

I am trying to install CentOS 6 on a new Dell Server made for RHEL 6. I am have a problem installing the boot loader on to the software RAID device /dev/md0. When I have done so the machine won't boot. I have read other threads here and posts on other websites that indicate that one must install the boot loader on /dev/sda during installation then run commands at the grub prompt in order to install the boot loader on both drives in the RAID 1 mirror. I've followed those instructions but cannot get the machine to boot when I simulate a disk failure.

I've been running CentOS 5 for years and have installed the boot loader on /dev/md0 on that platform, and on many, many machines, with absolutely no problems. With real and simulated disk failures the machines always boot.

Is there something to a CentOS 6 installation that I'm not taking into account in setting up a bootable software RAID 1 device? Can anyone help me figure this out?
ebroch
 
Posts: 15
Joined: 2011/12/28 23:18:25
Location: MT

Re: Install grub on /dev/md0, CentOS 6

Postby ebroch » 2011/12/29 15:28:19

The above Dell server has NO hardware raid devices, so I'm not sure whether the the information on this link (http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5) applies.

When installing CentOS 6 I went through the same procedure as with CentOS 5 (which I have done many, many times before) when implementing a bootable RAID 1 on /dev/md0. Why does it work in CentOS 5 and not in CentOS 6 when following the same procedures as I've always done?

Any help would be greatly appreciated.
ebroch
 
Posts: 15
Joined: 2011/12/28 23:18:25
Location: MT

Re: Install grub on /dev/md0, CentOS 6

Postby pschaff » 2011/12/31 14:18:15

Did you install GRUB on the MBR on both RAID members as outlined in the Wiki article? That should work if done correctly, although I admittedly have not tested it on CentOS-6.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Install grub on /dev/md0, CentOS 6

Postby ebroch » 2012/01/02 19:52:48

I followed the instructions on this wiki (http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5) and when I failed a drive to test whether the machine would boot from 1 drive or the other I got the message 'kernel panic - not syncing: Attempted to kill init!"
ebroch
 
Posts: 15
Joined: 2011/12/28 23:18:25
Location: MT

Re: Install grub on /dev/md0, CentOS 6

Postby pschaff » 2012/01/02 19:59:32

Please provide more information about your system by running "./getinfo.sh disk" and showing us the output file, along with the contents of /boot/grub/grub.conf.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Install grub on /dev/md0, CentOS 6

Postby gerald_clark » 2012/01/03 18:17:54

If you installed grub on md0, you must have a standard MBRs with the md0 raid partitions marked as active.
gerald_clark
 
Posts: 7182
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Install grub on /dev/md0, CentOS 6

Postby ebroch » 2012/01/04 16:49:02

Sorry about the delay getting the output of 'getinfo.sh' I was in the middle of trying another procedure with the machine.

I followed the instructions here: http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5 with the following exceptions:

1) Installed CentOS 6 minimal install
2) Didn't make /dev/sda1 and /dev/sdb1 primary partitions. Is this necessary?
3) Started network services to do update of system.


To test the system I shut it down, unplugged hd1 and started it. The following error ensued:

Kernel panic - not syncing: Attempted to kill init!
panic occurred, switching back to text console


I've posted the output to 'getinfo.sh' at http://pastebin.centos.org

[Moderator edit] The actual URL is http://pastebin.centos.org/38234 .
ebroch
 
Posts: 15
Joined: 2011/12/28 23:18:25
Location: MT

Re: Install grub on /dev/md0, CentOS 6

Postby gerald_clark » 2012/01/04 17:24:12

They should be primary partitions.
gerald_clark
 
Posts: 7182
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Install grub on /dev/md0, CentOS 6

Postby pschaff » 2012/01/04 21:00:33

So, they are primary partitions. Have you have done
Code: Select all
grub> device (hd0) /dev/sda
grub> device (hd1) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)
grub> quit
?

You forgot /boot/grub/grub.conf
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Install grub on /dev/md0, CentOS 6

Postby ebroch » 2012/01/05 00:08:20

I did the following:

grub> root (hd1,0)
grub> setup (hd1)
grub> root (hd0,0)
grub> setup (hd0)
ebroch
 
Posts: 15
Joined: 2011/12/28 23:18:25
Location: MT

Next

Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 13 guests