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

Re: lilo removal in squeeze (or, "please test grub2")



Stefan Monnier wrote:
for much.  But I am opposed to the removal of lilo.  Both grub-legacy and
grub-pc use sectors on the hard disk outside of the master boot record
(cylinder 0, head 0, sector 1).  In other words they use cylinder 0, head 0,
sector 2 and possibly subsequent sectors on cylinder 0 head 0.

Really?  Never heard of it, and it sounds very odd: why would they do
that when they can (and do, AFAICT) use sectors on specified partitions?
Is that documented/discussed somewhere?

It is, yes. At least I remember reading about it for grub1. Actually you don't *have* to use that space, it's just that it's convenient to store an intermediary stage (called 1.5) there, which typically holds filesystem drivers. The reason for this extra space is that traditionally, the first partition on a DOS partition table can only start at the second cylinder (correct me if I'm wrong), so boot loaders just used to use the remaining space from the first cylinder so they didn't have to ask anything to anybody, since it was always sufficient.

For grub1 at least, the 'install' command (not the same as the 'grub-install' script) was well documented and allowed to tweak this by manually specifying an address for the next stage (be it 1.5 or directly 2) that you would allocate yourself with a partition just like you're suggesting (I think there is about zero tools helping you with this however). Note that pointing to a stage2 file directly makes grub behave much like lilo; you would put a filesystem on the partition and then you have tools to update the address in stage1 automatically when you upgrade.

Maybe someone can point to similar documentation for grub2, as I'd bet it still allows it.

So yes, the first cylinder situation is a mess, and silly backup software are not the only programs carelessly using the extra space in it without checking for bootloader stuff; for example Windows stores information about its LDM thingy ("Logical Disk Manager" or "Dynamic Disks", comparable to LVM and dmraid, but crappy) in there too, making dual-boot with software RAID a real PITA. To be fair, there's never been an authority dictating that the space was reserved to boot loaders (AFAIK), so there's really no-one to blame.

Fortunately, GPT answers this with new conventions. Each of these pieces of software can have their own partition and partition type and many already support it out of the box (grub2 included). I think administrators should really consider GPT for their new setups now; it has definitely more advantages than just "allowing for big partitions", and it's darn simple (not sure how anybody could defend the "I stick to what I know" point here). Note that this partition scheme doesn't need EFI hardware, it's entirely backward compatible with PC/BIOS systems (you can even have hybrid GUID/DOS partition tables if you're really stuck with crappy software).

-thib


Reply to: