2

This question already has an answer here:

This is my first ever question, I have put this question in front of Red Hat Instructors but didn't find any satisfying answers.

I'm using RHEL/CENTOS6, GRUB Legacy 0.97, and have consulted heaps of documentation explaining linux boot process.

Almost all of the blogs, documentation etc. successfully explain the steps involved and the whole process but fail unanimously at as what actually takes place when loading grub stage2.

Here is my understanding of the process and have done a bit of testing as well;

  1. BIOS(not using EFI) reads MBR, finds partition table, and loads GRUB stage1 (first 446 bytes) into memory
  2. I have /boot partition under 1024 cylinders, and the idea I have extracted from a bunch of documentation is that GRUB stage1 can directly load stage2 if it is located at some place under 1024 cylinders. Some documentation I have consulted mentions that stage1.5 is located right after MBR before sector 63, while others suggest that it can be anywhere in first 1MB of disk and yet another group claimed that stage1.5 is just a GRUB v2 thing and does not apply on GRUB legacy.
  3. GRUB stage2 has all the necessary drivers/modules to read file systems and thus loads kernel and ramdisk and handover control to kernel.
  4. Kernel kicks off init on RHEL/CENTOS 6 and systemd on RHEL/CENTOS 7.

I have dumped all the data from the 1st MB of the disk and can confirm that there is nothing except MBR. I get confused as to how 446 byte GRUB stage1 can load stage2 from a file system? According to some images on wikipedia and a few documents, when GRUB is installed, stage1 contains a LBA48 pointed to stage2.

Playing on the fact, I tried to test if systems boots when stage2 in removed or renamed from /boot/grub/ directory. The systems was still bootable even when there was no stage2 in the filesystem.

Will really appreciate if anyone can explain it.

merged by Michael Mrozek Feb 2 '16 at 0:40

This question was merged with How does Grub Stage1, exactly, access/load stage 2? because it is an exact duplicate of that question.