[SOLVED] How do I install GRUB on both MBRs of a two disk RAID1 array (Ubuntu server)?
Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How do I install GRUB on both MBRs of a two disk RAID1 array (Ubuntu server)?
I'm very new to Linux but have set myself some goals and am learning as I go.
I have installed Ubuntu Server 8.04 on a new server with two SATA disks configured as RAID1. There are several partitions on each disk, the first one on each disk set as bootable. ('dev' and 'boot' both appear under '/', which is on the first partition)
The server boots fine via GRUB and runs ok.
/proc/mdstat shows md0 thru to md5, listed as sda1, sda5, sda6,sda7, sda8, sda9, and similarly for sdb1, sdb5, etc. and each one shows as active raid1 [UU]. So far so good.
What I want to do now is install GRUB on the 2nd disk and make other necessary config changes so in the event the 1st disk fails then I can still boot off the 2nd disk.
$ sudo grub-install /dev/sdb1
It returned several lines including 'Installation finished. No errors reported'. It also reported device.map as set to:
To double-check I ran:
$ cat /boot/grub/device.map and it returned...
I believe that my next step is to run GRUB and then do this:
There are a couple of ways to go about this, I suppose. Personally, I've never been a fan of grub-install and the "device" command, and prefer to use a boot floppy or CD to install grub from the grub prompt. However, you used it successfully to install grub on sdb1, and you say you are successfully booting the system using grub. What does your menu.lst look like?
Note the change from hd0 to hd1. It should boot identically to the lines you have given your successful RAID1 install. If that works, then do the following. I presume the BIOS is set to boot off of the first SATA disk. Try switching the order in BIOS to boot off the second SATA disk to see if Ubuntu has already put Grub on both disks. If that works then you are done. If not, I would make a grub boot floppy: http://www.gnu.org/software/grub/man...ot-floppy.html
and reinstall grub to the second SATA disk. That's done by booting the floppy, and typing
at the grub prompt. Note that hd0 will be the first disk in boot order according to BIOS. If you switch the order you'll be installing to a different disk. If you want to install to /dev/sdb, and it's currently the second disk according to BIOS, you'll type:
If you have no floppy drive you'll have to use a boot CD such as "supergrub"
Last edited by mostlyharmless; 07-24-2008 at 01:53 PM.
Thanks for the various info, Guys. I've already explored around these areas but will revisit them and retest as I may well have missed something vital last time around. I'll report back with results. And it's a fakeraid.