Re: where does grub put the MBR?
Alvin Oga wrote:
On Wed, 3 May 2006, Hugo Vanwoerkom wrote:
Roberto C. Sanchez wrote:
Hugo Vanwoerkom wrote:
Hi,
Is there a way to know *for sure* where grub puts the MBR? (No setup
command)
yes...
Well the MBR, is always in the same place. It is *always* the first 512
bytes on the physical disk.
the MBR is the first 446 bytes of each partition ....
16 bytes for each of the 4 primary partition
2 bytes for the boot flag
The MBR is the first sector (512 bytes) of a hard disc. It is
also sometimes called the Boot Label. As part of a standard
MBR is a Partition Table. The part of the MBR which is not
in the Partition Table is 446 bytes.
and if you have more than one partition, the "boot record" is the
first 448 bytes of each primary primary
The Boot Record (BR) is the first 512 bytes of the partition. It
contains the BIOS Parameter Block (BPB). It is also sometimes
called the "geometry" of the partition.
Now, what I think you want to ask is,
"where does grub install itself?" As to that, I don't know, other than
scanning the disk and its partitions to see. Though, I am not certain
how one would do that.
grub stage1 or lilo, etc is loaded by the bios into 0x7C00
grub stage1.5 is loaded by the bios into 0x8K
The question AIUI has nothing to do with memory addresses.
GRUB is initially loaded into 0000:7C00. GRUB loads succeeding
stages into memory itself, not the BIOS, unless you call
GRUB making BIOS calls to use the disc read routines "the BIOS
loading GRUB stage1.5".
And what would I look for?
you don't ... but if you insist... use a diskeditor to read the contents
of any random cylinder/head/sector "to look for" stuff
Less than useful reply. He can use dd to read the disc, using
information obtained using
# fdisk -l
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
Reply to: