[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grub and raid



On Sun, Feb 03, 2008 at 01:22:43PM -0800, Alex Malinovich wrote:
> Stage 1 is the portion of GRUB that is stored in the MBR itself. When
> you install grub it copies stage 1 from the filesystem into the MBR. So
> a stage 1 error would indicate that either the file that was used for
> writing it is corrupt, as Marcus suggests, or that the data in the MBR
> was corrupted either during or after writing somehow. Most commonly this
> will happen if you use tools that like to mess with your MBR, most
> notably if you still have LILO installed, or if you happen to do certain
> operation from a Windows partition or a Windows install disk.
> 
> I do remember hearing that software RAID uses the MBR for some things as
> well so this could very well be the problem, but I know very little
> about it as I don't use it myself.

Well if you run raid directly on the raw device with no partition table,
then yes there could be a problem.  If however you make partitions and
use those for raid, then there is no problem since the raid will stay
entirely inside the partition.  Using partitions is of course the normal
and recommended method.

> One thing that might help you with troubleshooting is a brief breakdown
> of the various GRUB stages and what they do.
> 
> http://en.wikipedia.org/wiki/GNU_GRUB#Boot_process
> http://www.phrack.org/issues.html?issue=63&id=10&mode=txt
> 
> In a nutshell:
> 
> stage1: The core GRUB functionality stored in the MBR. (512 bytes)
> 
> stage1.5: (optional) stage1.5 is only written if it is necessary, and it
> goes into the extended area after the MBR. (30KB) If you're using a
> filesystem that can't be relied upon to store a file as an easily
> readable block on disk (i.e. pretty much every FS other than ext2/3),
> then you need 1.5. Loading 1.5 loads actual filesystem drivers as well
> as extended device drivers for things like LVM and, I would assume,
> software RAID as well.

Well grub 0.97 doesn't do LVM at all, and as for raid it doesn't have a
clue but simply relies on the fact you can read a raid1 device
independantly of it's clone.  grub2 (1.95 and higher) does support LVM,
and possibly raid other than raid1 (I haven't checked if raid support
has been updated).

> stage2: This is the full GRUB functionality. This is the portion that
> actually lives on your boot partition and needs to have the original
> file around. (You can, if you choose, delete the files stage1, and
> stage1.5 from disk after installing GRUB, but stage 2 must stay there.)
> This is the portion that does most of the heavy lifting, loads the
> menu.lst, etc.
> 
> Hope that helps. Wish I knew more about software RAID in the hopes of
> being more helpful, but I've never had need to use it. (I use hardware
> RAID boards.)

--
Len Sorensen


Reply to: