Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I use a disk with GPT partition table on a system with a BIOS but no (U)EFI?

I have a system with a 3 TB drive (no other drives and since this is a remote machine I have no choices here) and with a GPT for obvious reasons. Ubuntu 12.04 is being bootstrapped onto the system and this worked so far. Now after bind-mounting /dev, /proc and /sys from the host into the target system and chrooting into it, I installed linux-image-server which worked fine (after linking /sbin/initctl as /bin/true). Because this is a remote machine I have to do all of this via SSH and have no bootable CD or anything. I can boot into a rescue system if it fails, though (PXE).

Now I know that grub2 is supposed to support the scenario, but for the life of me I cannot figure out how to install it.

The boot (and root) device is to be /dev/md0, composed of /dev/sda1 and /dev/sdb1 in RAID mode 0. With /dev/md0 mounted under /target I am running:

grub-install --root-directory=/target --no-floppy /dev/sda

which fails with:

/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't 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 how can I get grub2 installed in order to have this BIOS-based system boot properly?

Note: it doesn't matter whether I run this inside or outside the chroot environment. The error and output are identical. Likely because I bind-mounted /dev etc into place. Of course appropriate adjustments to the command line (no --root-directory=) have been made.

share|improve this question
    
First you said one drive, then you said raid array. Which is it? –  psusi Jan 10 '13 at 1:30
    
@psusi: it's two physical disks, but the idea is to use software RAID 1, as can be seen from the question. Apologies for the confusion, though. –  0xC0000022L Jan 10 '13 at 2:11
add comment

1 Answer 1

up vote 2 down vote accepted

You need to create a bios_grub partition on the disk. You can do this with parted and setting the bios_grub flag on the partition. 1 MiB is sufficient, but it needs to be in the lower 2TiB of the disk.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.