[CentOS] Analyzing the MBR

Cliff Pratt enkiduonthenet at gmail.com
Sat Jun 7 01:19:07 UTC 2014


I believe that the whole of the first track on a disk used to be "reserved"
or rather used to contain the MBR only (and anything else needed by the
boot loader) and the first filesystem on disk used to start at track 1. Of
course, with the larger disks this got more complicated.

Cheers,

Cliff


On Fri, Jun 6, 2014 at 2:09 PM, Robert Nichols <rnicholsNOSPAM at comcast.net>
wrote:

> On 06/05/2014 03:31 PM, John R Pierce wrote:
> > traditional PC partitioning tools, dating back to MSDOS, put partitions
> > on 'cylinder' boundaries.   this is a bad idea on modern disks, whether
> > they be SSD's that often have 128K physical write blocks, or newer HD's
> > with 4096 byte physical sectors, or raids where there's several of the
> > above striped together.
> >
> > the rest of the space between the sector 0 MBR and the first primary
> > partition is completely empty, nothing puts anything there.
>
> That last sentence is simply wrong.  GRUB will try to install stage1_5 of
> the boot loader there if space is available.  This is to eliminate the
> problem with the boot sequence breaking if the stage2 boot loader ever
> gets physically moved on the disk.  The stage1_5 boot loader understands
> one type of filesystem (there is a different stage1_5 for each supported
> filesystem), and loads stage2 from there.  There is simply not enough
> room in the MBR for code to handle anything more complex than a short
> list of absolute disk addresses.
>
> If there is not space for a stage1_5, GRUB will still install successfully
> (you see an error message with "This is not fatal"), but will have to
> be reinstalled if the stage_2 file ever moves to a different physical
> location on the disk.  This can result in a time bomb, because booting
> can work successfully for a while using the data still present in what
> are now free blocks in the filesystem, and will fail when some totally
> unrelated action causes those blocks to be rewritten with something else.
>
> A lot of other boot loaders and boot managers do something similar with
> that space.
>
> --
> Bob Nichols     "NOSPAM" is really part of my email address.
>                  Do NOT delete it.
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



More information about the CentOS mailing list