Re: GRUB discussion follow up ?

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

 



On Sun, 21 Oct 2007, William Case wrote:

> Hi;
>
> As a result of the ongoing GRUB discussion, I have been trying to
> trace the use of GRUB from BIOS to the end of GRUB stage 2.  I am
> particularly interested in seeing how the MBR is used.

all the MBR does is:

1) provide up to 446 bytes of initial boot code       (446 bytes)
2) define the four entries of the partition table     (4 @ 16 bytes)
3) have a boot block signature of x'55aa' at the end  (final 2 bytes)

if you add that up, you get 512.

> I can create a temporary copy of my MBR using:
> # dd if=/dev/sdX of=/tmp/sda-mbr.bin bs=512 count=1

yup, so far, so good.

> My question is; what program should I use to read this file in a human
> meaningful way (hexdump??)?

# hexdump -C /dev/sda | less     (for example)

> I am trying to see how the MBR names partitions; and how GRUB uses
> those names.

the MBR does not "name" partitions, it simply defines them.  any
"names" assigned to devices and partitions are OS-specific.

> That is, are the partitions named in MBR actually named hd0,0 (ie
> the binary or hex equivalent of hd0,0) etc. or is there a further
> translation step required by GRUB? Does the device/partitioning
> system used by MBR and GRUB have a name(s)? (For Internet search
> purposes).

again, the MBR itself does not "name" the partitions.  the notation
used by GRUB -- (hd0,0) for example -- simply defines the first disk,
first partition.  try not to think of it as a "name".  it's just an
identifier.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux