Setup grub2 on a GPT software raid 3 TB HDD

5,897

Even with GPT you should still be able to install GRUB on the drive (/dev/sda?) Try these commands:

# grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

it should make you a working GRUB install. You will however probably need to tune some options in the GRUB config files to get grub the way you like it.

On legacy BIOS machines you need a "BIOS boot partition" which may be as small as 30kb on the drive, this is required to store stage 2 of the GRUB boot process.

To create this BIOS boot partition do the following:

A BIOS Boot partition can be created using any of several different disk utilities:

In GParted, create a partition (an unformatted one works fine), then right-click it and select Manage Flags. Check the bios_grub flag, click Close, and apply your changes.

In GNU Parted (parted), create a partition, then type set 1 bios_grub on, changing 1 to the number of the partition you want to mark as a BIOS Boot partition.

In GPT fdisk (gdisk), create a partition and give it a type code of EF02.

Source: http://en.wikipedia.org/wiki/BIOS_Boot_Partition_%28GPT%29

Share:
5,897

Related videos on Youtube

burnersk
Author by

burnersk

Updated on September 18, 2022

Comments

  • burnersk
    burnersk over 1 year

    I like to setup grub2 on a GPT softare raid 3 TB HDD.

    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048         1050623   512.0 MiB   FD00  Linux RAID
       2         1050624      5860533134   2.7 TiB     FD00  Linux RAID
    

    The first partition is boot, the second is LVM. After bootstrapping I installed grub2 which died with "missing BIOS boot". But I can't change partition 1 to BIOS boot because of the software raid, right?

    How to solve this situation?

    Info: Debian Wheezy x86_64

    Error:

    /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 for cross-disk install.
    
  • burnersk
    burnersk almost 12 years
    Same error as before: /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 for cross-disk install.
  • Flash
    Flash almost 12 years
    Edit my post concerning the boot partition.
  • Flash
    Flash over 10 years
    grub-mkconfig is still current, as the time of writing so was grub_bios-install. noaways for grub2 its just grub-install the options remains the same, also the bios boot partition is probably still required for your setup.