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

Re: Attempt to Move Root



Nicolas George <george@nsup.org> wrote:
> 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.

>> 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.

Yes, but I wanted to be sure that there will be no suprises for me or
another administrator in the future. Having no GRUB package installed
would have deviated from the norm, could cause strange side-effects with
other packages or the packages manager and keeping the old version
installed would have been ugly.

The idea was to have a system which fits one of the server templates
used and not create another special snowflake which needs manual
attention every time.

>> 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.

Eh? I did use a bios_grub partition, because the server in question uses
a legacy BIOS to boot.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: