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

Re: Problem with grub-install (d-i, soft RAID6, Jessie)



On 01/08/2016 01:22 AM, W. Martin Borgert wrote:
> I try to install Jessie with a soft RAID6 of four disks, 1 TB each.
> The idea is to use the complete disk for RAID and then only on top
> separate swap and root.
> 
> The installation worked fine on one machine, but for some reason,
> grub does not install on the fourth disk. It turns out, that the
> fourth disk is GPT, while the others are DOS (= MBR, right?). Also,
> the fourth disks only partition is of type "Linux RAID", while the
> partitions of the other three disks are "Linux raid autodetect".

Ok, if you use MBR, only the first 512 bytes are used for the MBR
partition table, so that the gap between those bytes and the first
partition (and there is *always* a gap, the size depends on the
details of the logical geometry of the disk) has traditionally
been used under Linux (among others) to put the boot loader there.

Problem is that GPT doesn't have such a gap. If you don't use UEFI,
you can create a small GPT partition (1 - 2 Megabytes is
sufficient) of the type "BIOS boot partition" - the boot loader may
then be installed there (if it exists).

If you already have partitioned that disk, it's unclear whether you
can actually fit another partition somewhere. (Note that if the
disk is small enough, with a modern BIOS less than 2 TB, the BIOS
boot partition doesn't have to be at the beginning of the disk, it
could also be at the end.)

So if there is some small amount of space left, just create a new
partition of type "BIOS boot partition" on the GPT disk and then
grub-install should work. Would be the easiest solution.

> AFAIK, I don't need GPT for such small disks, right?

Not necessarily, no. ~2TB is the limit for MBR.

> Is there an easy and safe way to change the disk from GPT to DOS/MBR?

Well, if you can get the exact position of your GPT partition
(start and size), you could wipe the partition table and then
create a new MBR partition table with the same boundaries. I
wouldn't call that safe (because you have to be very careful and
be aware of the units in which you have to specify this) - and
then the MBR partitions may not be aligned properly, which is
probably not a huge issue if you have a Linux-only system
(because Linux + GRUB can cope with that and no other code reads
the partition table), but I'd still be a bit wary of it.

So while possible, I wouldn't classify it as "safe and easy".

OTOH, it's RAID6, so worst case scenario you have to do a bit of
resyncing. ;-)

(The other way round is easier, because you can just use gdisk
that can automatically convert MBR to GPT in most cases.)

> Who did set up the disks in that heterogenous way? d-i? Why?

At least Jessie's d-i appears to only be able to create MBR
partition tables - but if there already is a partition table on
the disk, then (if I remember correctly) it will also use a GPT
table for installation.

So what likely happened is that your disk with GPT already had
a GPT partition table on it, while the others either had a
traditional MBR partition table or none at all - and that the
installer then reused the GPT of the last disk, while reusing
and/or creating the MBRs of the other three disks.

Regards,
Christian

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: