[ 来源: | 作者: | 时间:2007-07-21 | 收藏 | 推荐 ] 【大 中 小】
Revision: 1.0 (2003-05-08) vd;k;l www.it55.com rdfg
Reference: dcl0adsdit0maymirrgrub-20030508 sflj www.it55.com kg^&fgd
The purpose of this document is to suggest a way of configuring grub on a system where the operating system is mirrored between two disks, so that if the first disk fails completely, the system will boot automatically from the second disk. www.it55.com在线教程
Whether this actually works depends on how precisely the system fails, so there are also instructions on how to get the system up if it still isn't booting. Note that not everything in this document has been fully tested, and the grub documentation suggests there are machines on which they definitely won't work.
vd;k;l www.it55.com rdfg
The assumption is that we have two identically partitioned disks,
containing a mirrored boot partition [1], and we will be booting from the
master boot record on each disk [2]. The examples assume that the first
partition on each disk make up the mirrored disk mounted at /boot, and
that grub numbers these disks (hd0) and
(hd1). Grub numbers disks in order of
detection by the bios. The order is probably the same as the operating
system, but in some cases the ordering may not be obvious, for example
if you have a mixture of IDE and SCSI disks.
免费资源www.it55.com
First make sure that the BIOS setup of your machine will attempt to boot from the second disk if it can't find a valid boot sector on the first disk. Run the grub command from your root prompt and within the grub shell type the following (Note that the install commands may be broken for legibility but should be entered as one long line):
Here the --stage2 value is the
location of the grub stage2 file within the operating system, which
means it writes the changes to the mirrored partition, rather than one
or the other raw disk, and hence avoids corrupting the mirror. The
other file references are in grub format, ie. a partition reference
followed by the location of the file within that partition. We don't
specify an explicit partition for the grub.conf file as the "p" flag tells grub to
remember which partition it found the stage2 file on and make it the
default, and we therefore avoid setting the disk explicitly and use
the current disk, whic http://www.it55.com/
(编辑:IT资讯之家 www.it55.com)