linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Jason Lunz <lunz@falooley.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Grub vs Lilo
Date: Wed, 26 Jul 2006 22:00:06 +0400	[thread overview]
Message-ID: <44C7ADA6.7020200@tls.msk.ru> (raw)
In-Reply-To: <ea865p$7o0$1@sea.gmane.org>

Jason Lunz wrote:
> mylists@blue-matrix.org said:
>> Wondering if anyone can comment on an easy way to get grub to update
>> all components in a raid1 array.  I have a raid1 /boot with a raid10
>> /root and have previously used lilo with the raid-extra-boot option to
>> install to boot sectors of all component devices.  With grub it
>> appears that you can only update non default devices via the command
>> line.  I like the ability to be able to type lilo and have all updated
>> in one hit.  Is there a way to do this with grub?  
> 
> assuming your /boot is made of hda1 and hdc1:
> 
> grub-install /dev/hda1
> grub-install /dev/hdc1

Don't do that.
Because if your hda dies, and you will try to boot off hdc instead (which
will be hda in this case), grub will try to read hdc which is gone, and
will fail.

Most of the time (unless the bootloader is really smart and understands
mirroring in full - lilo and grub does not) you want to have THE SAME
boot code on both (or more, in case of 3 or 4 disks mirrors) your disks,
including bios disk codes.  after the above two commands, grub will write
code to boot from disk 0x80 to hda, and from disk 0x81 (or 0x82) to hdc.
So when your hdc becomes hda, it will not boot.

In order to solve this all, you have to write diskmap file and run grub-install
twice.  Both times, diskmap should list 0x80 for the device to which you're
installing grub.

I don't remember the syntax of the diskmap file (or even if it's really
called 'diskmap'), but assuming hda and hdc notation, I mean the following:

  echo /dev/hda 0x80 > /boot/grub/diskmap
  grub-install /dev/hda1

  echo /dev/hdc 0x80 > /boot/grub/diskmap # overwrite it!
  grub-install /dev/hdc1

The thing with all this "my RAID devices works, it is really simple!" thing is:
for too many people it indeed works, so they think it's good and correct way.
But it works up to the actual failure, which, in most setups, isn't tested.
But once something failed, umm...  Jason, try to remove your hda (pretend it
is failed) and boot off hdc to see what I mean ;)  (Well yes, rescue disk will
help in that case... hopefully.  But not RAID, which, when installed properly,
will really make disk failure transparent).

/mjt

  reply	other threads:[~2006-07-26 18:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26  9:43 Grub vs Lilo Lewis Shobbrook
2006-07-26 10:40 ` Michael Tokarev
2006-07-26 16:44 ` Jason Lunz
2006-07-26 18:00   ` Michael Tokarev [this message]
2006-07-26 18:59     ` Bernd Rieke
2006-07-26 19:58       ` Michael Tokarev
  -- strict thread matches above, loose matches on Subject: below --
2006-07-27 13:16 Lewis Shobbrook
2006-07-27 11:50 ` Simen Thoresen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44C7ADA6.7020200@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=linux-raid@vger.kernel.org \
    --cc=lunz@falooley.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).