Re: GRUB discussion follow up ?

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

 



Robert P. J. Day wrote:
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)

Not quite, the first two bytes are a relative jmp around a volume label and some more (disk parameter block comes to mind) information of varying length - and so the jmp +afew.

2) define the four entries of the partition table     (4 @ 16 bytes)

The standard (DOS) boot code examines these, looking for one marked active. Having found one, it reads the first sector and executes it.

IBM's PC Techical Reference describes the process and, I think, has the code.

More recently I've seen code from Apple's Darwin to do this. Apple's code loops if it can't find an active partition:-)



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??)?

debug in MSDOS is pretty good, it can disassemble the code.



--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx

Please do not reply off-list

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux