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

Re: Attempt to Move Root



Le duodi 2 nivôse, an CCXXIV, Sven Hartge a écrit :
> And this is why I love the GPT. There is a defined space for the
> bootloader to be and no nether region of swirly unknowness between the
> MBR and the start of the first partition.

The UEFI boot system is indeed a great improvement, or would be if it was
correctly implemented by vendors, but do not expect too much of it.

You can have already a partition dedicated to the bootloader with old-style
MBR partitions.

If dealing with programs that bypass the operating system and write outside
partitions, GPT will not help. It may even make things worse if the program
does not know it and gets confused.

The core of it is: no program, even an operating system, should ever write
outside partitions except at the direct request of the administrator. If
this rule is kept, then there is nothing to worry about, except mistakes,
and GRUB's hack works. If this rule is violated, then there is nothing to be
done, all hell can break loose at any time.

> Also this: Sit back kids, Uncle Sven tells a story from the trenches of
> the 1st GRUB war.
> 
> I was upgrading a remote server from Squeeze to Wheezy. This server uses
> LVM on top of an MD-RAID1, /boot is included in / which is a LV. so GRUB
> needs to know about MD and LVM (and the filesystem of / of course).
> 
> With Squeeze everything was fine and dandy.
> 
> But after upgrading to Wheezy, GRUB would no longer install into the
> 31744 byte-sized space after the MBR. Its core.img with all needed
> componenents was 12 bytes to large, about 60 bytes bigger than the one
> from Squeeze!
> 

> What to do? Using the old one from Squeeze? Psshht, needing to hold the
> old package for ever, maybe making the system unbootable in the worst
> moment? Not an option!

You seem to be missing something here: there is absolutely no requirement
that the GRUB version installed as a package on the distribution is the same
as the version installed as bootloader. You could have left the upgrade
replace GRUB or even removed the package for GRUB, just leaving the old
bootloader, that is not a problem.
> 
> But we have a MD-RAID! I removed one disk from the RAID, repartitioned
> it as GPT, added a bios_grub partition of the right (and future-proof!)
> size before the data partition, readded this to the running half of the
> RAID, let the RAID resync, repeated the whole procedure with the other
> disk, installed GRUB to its new home, rebooted while hoping/praying and
> ... tadaaa ... the system came right up.

The same thing would have worked with without GPT. Especially if you use a
bios_grub partition instead of an EFI system partition.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature


Reply to: