bug-grub
[Top][All Lists]
Advanced

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

Re: EZ-Bios and embeding stage 1.5


From: Jochen Hoenicke
Subject: Re: EZ-Bios and embeding stage 1.5
Date: Fri, 29 Dec 2000 15:41:10 +0100 (MET)

Hello Michael,

I can answer some of your questions, as I have added the EZ support to
grub.

You should first get the latest CVS version of grub if you don't have
it already.  grub-0.5.96.1 can destroy your MBR if you use it with
EZ-BIOS.

On Dec 29, Michael Haub wrote:
> i try to figure out if it is possible to embed stage 1.5 on a hd
> with EZ-Bios.

Currently that is not possible.

> Due to information from Western Digital, EZ-BIOS uses:
> sector1: Bootloader MBR
> sector2: copy of MBR before EZ-BIOS was installed (access to MBR should be 
> remaped to this)
> sector3-17: EZ-BIOS INT13 handler code

This is consistent with the EZ-BIOS version I have seen (except that
grub counts the sectors starting with 0).  But there is no guarantee
that other versions of EZ-BIOS take more space.

> As it is common to start the first partition on:
> cylinder 0,  head 1, sector 1
> and the CHS-translation uses 63 sectors per track,
> the rest of the first track (cylinder 0, head 0, sector 18-63) is unused by 
> EZ-BIOS.

AFAIK EZ-BIOS uses the last sectors before the first partition to keep
backup copies of old MBRs.

> The stage 1.5 for FAT needs 14 sectors (with 512byte sector size).
> It seems that this would fit into the rest of the first track.

Yes, there's still a lot of space, but how can we be sure that EZ-BIOS
won't use them, e.g. for MBR backup purposes, especially since it
doesn't know of grub.  

> How can i tell the embed command to start with sector 18 (or up)?
> may be: embed (fd0)/boot/grub/fat_stage1_5 (hd0)19

No, this doesn't work.  embed always takes a partition, see embed_func
in builtin.c.  There's no way to put stage1_5 at this special place.

> Does the install command recognize it?
> may be: install (fd0)/boot/grub/stage1 (hd0)18 (hd0)19+14 
> (hd0,0)/boot/grub/stage2 (hd0,0)/boot/grub/menu.lst

The destination partition must be again a partition, but you can
safely give (hd0) if you use the latest CVS version of grub.  This
will install stage1 to sector 2.

> Is it true that EZ-Bios uses the first track only up to sector 17?
> Does this apply to all versions of EZ-BIOS for all times?

I don't know.  You can, of course, check the version number of ez-bios
and refuse if it is unknown.  But how many different versions are
common and should be supported?  And is it really worth the trouble.

The embedding isn't really needed, it is quite safe to boot stage2
from an ext2 partition via a sector map.  For FAT partition its enough
to mark stage2 as system file, so the defragmenter won't move it.  And
for reiserfs partition you can embed stage1_5 in the reiserfs boot
area.

> What does EZ-blabla mean by asking to make a 63 sector offset to be
> compatible to Ontracks DiskManager?

The DiskManager maps sector 63+x to sector x, so that it can use the
first 63 sectors for its own purposes.  At sector 63 there is the
previous MBR, followed by the usual empty space and the first
partition starts at sector 126.  Once the INT13 handler of diskmanager
is installed (or a DiskManager aware OS like linux is booted) the
first 63 sectors aren't accessible anymore, and the remaining part
looks like a normal harddisk.

  Jochen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]