User: Password:
Subscribe / Log in / New account



Posted Jun 17, 2004 3:43 UTC (Thu) by jreiser (subscriber, #11027)
Parent article: LILO vs. GRUB

LILO stores information about the location of the kernel or other operating system on the Master Boot Record (MBR).

GRUB often stores its own program in "no mans's land": the remaining sectors of the first track. Usually this is LBA sectors 1 through 63 (31.5KB). This is exactly the place to get clobbered by Cedilla or other dreck associated with MS Wind*ws, and there were more than a few multi-booting users in the US whose Linux became disabled when they installed Intuit's TurboTax 2002. Some storage media have many fewer sectors on the first track, and any disk can have a partition table that puts those sectors inside a partition; GRUB will have a hard time on such a device.

It is possible to write an MBR+ext2 bootloader for x86 that boots a kernel and initrd by name lookup in the root filesystem, and resides entirely in the (512-64-n) bytes of the MBR plus the 1KB boot block of a minimal ext2/ext3 filesystem. See and [Note that e2boot4c is for 1KB blocks, and requires modification for 4KB blocks. Also, this work was done in 1998 and does not observe the Extended BIOS Data Area below 0xA0000.]

(Log in to post comments)


Posted Jun 17, 2004 14:01 UTC (Thu) by lutchann (✭ supporter ✭, #8872) [Link]

I assume you're referring to the stage1.5 component, which by default gets installed into the sectors following the MBR. It can also be installed into the boot area of your Linux boot partition for filesystems that support it, and Windows stuff had better not be touching that.

Heck, stage1.5 is optional, so if you want you can have GRUB read the stage2 file directly off the hard drive sector-by-sector in the same technique LILO uses. I believe this is how RedHat's installer usually installs GRUB to be immune to apps that trash the spare sectors. (Of course, then you might be susceptible to geometry changes, just like when using LILO.)


Posted Jun 24, 2004 15:23 UTC (Thu) by ranmachan (subscriber, #21283) [Link]

I think it is bad practice to put the Linux loader (whether it be GRUB, LILO or any other) into the MBR, since that is not the purpose of the MBR and a rather fragile place (e.g. reinstalling the Redmond OS on a dual boot system usually overwrites the MBR). Putting it into the first sector of the boot partition is much better.


Posted Jun 28, 2004 1:54 UTC (Mon) by Sergio1704 (guest, #19452) [Link]

I couldn't agree more.
This is the point that both users and especially developers ought to understand.
There is a particular distro that offers no choice, only GRUB into the MBR.
Since I bought my new desktop it refuses to install.
And besides, in order to get a clean MBR I need to run fixmbr every time I try to install
said distribution.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds