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

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



Am 2015-06-30 15:58, schrieb Muhammad Yousuf Khan:
number "5" is the swap partition as i know it from size. and i also
attached that partition to my mdadm drive md1 which was set to swap by
me and it is successfully synced. now my question is as i can not see
the extended partition type in the list by attaching "5" partition to
the swap directory. have i done it the right way thing or i have done
it wrong?

GPT doesn't know extended partitions. The reason they were
introduced in MBR drives is that MBR only supports up to 4
partitions - and that turned out to be far too little for
practical use - so creating an extended partition that then
contains logical partitions

That isn't required for GPT anymore, that supports up to
128 different partitions, so no extended partition is
needed.

(And if you really need to subdivide something in more than
128 pieces, you will want to use LVM or the equivalent of
that for other operating systems, because managing so many
partitions is really just a huge pain.)

my last question is making the new 2TB drive able to boot.
when i run the command grup-install it gives me error. 
# grub-install /dev/sdb
/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot
Partition; embedding wont be possible!.
/usr/sbin/grub-setup: error: embedding is not possible, but this is
required when the root device is on a RAID array or LVM volume.

So if you want to boot from GPT partitions, you need to have a
small-ish (I typically use 100-200 MB or so) FAT32 partition of
the "BIOS Boot Partition" type at the beginning of the drive.
That's where the boot loader will be installed. (And you need
EFI to boot that.)

So in your case, you'd probably need to move all the partitions
a bit to the back of the drive (while the RAID is not assembled,
so boot from a rescue CD and use gparted or similar - and wait
a LONG time to move so much data around) - and then create a
GPT-style boot partition.

Alternatively, you could shrink the first partition a bit (but
be careful, you also have to do that on the other drive, and
you also need to shrink the RAID, so read up on how to do that
properly), then move the first partition on the GPT drive
(again, boot from rescue CD and don't assemble the RAID when
doing that) and then create the GPT-style boot partition (then
you don't need to move > 1 TB but only a couple of GB in your
case, which should make it quite a bit faster).

The reason why GRUB can't be installed traditionally is that
on MBR-style hard drives it uses the empty space of cylinder 0
(typical a couple of MB) after the boot sector (but before
cylinder 1, which is the first cylinder that may be used for a
partition) to put in the executable code that can read the
filesystem of the boot partition. Unfortunately, GPT uses that
space itself, so GRUB can't go there.

There may be a different way of embedding GRUB anyway (and then
booting without EFI from that drive, if your BIOS doesn't get
confused), but you'd have to ask people who are experts in that.

Christian


Reply to: