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

Re: RAID b/w GPT and NON GPT partition.



Gary Dale <garydale@torfree.net> wrote:

> If you are referring to the ef02 partition, you don't install grub on 
> it. In fact, installing grub on the mbr is preferred.

The first stage is put into the 512 Bytes of the MBR. The rest (the
core.img) is installed into the bios_grub partititon.

With a MSDOS partition table you had a "magic" blank space after the MBR
and before the first partition, in most cases 62 sectors or 31744 bytes
large (62 sectors: because the first partition started on sector 63 and
the MBR occupied sector 1). This is were the core.img went. 

The GPT does not have such "magic" unallocated and blank spaces. This is
where the EF02-bios_grub partition comes into play. It is a special
reserved place for the bootload images to be put to be loaded via a
simple blocklist and the good old INT13h BIOS call.

Wikipedia has a nice graphic:
https://en.wikipedia.org/wiki/BIOS_boot_partition

In this graphic the first MBR partition starts at sector 2048, which is
used by newer installers and partitions tools as alignment, but the
older installers used sector 63 for the start of the first partition.

I had an interesting problem once, where I upgraded a server from
Squeeze to Wheezy. This server had LVM on MD-RAID and so the core.img
has to include the LVM- and MD-RAID drivers in addition to the ext3
code.

With Squeeze this core.img just so fitted into the 31744 bytes (I think
it was 5 bytes smaller) but with Wheezy the resulting core.img was
bigger (by 20 bytes) and could not be installed.

I tried recompiling, optimizing GRUB2 but to no avail.

End result was me upgrading both partition tables from MSDOS to GPT.
Remote, with only a serial console to help, if anything went wrong.

But because of the RAID I could remove one disk, repartition it, readd
it to the RAID, resync the RAID, remove the other disk, repartition it
as well, readd to the RAID, resync and finally way able to install the
Wheezy-GRUB2 and be able to boot again.

Quite an adventure.

Grüße,
S°

-- 
Sigmentation fault. Core dumped.


Reply to: