Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

It looks like currently most OS installers insist on putting /boot on a non-RAID partition (or the kind of RAID1 partition that "looks like" a non-RAID partition), even the installers that support RAID5 and GRUB2.

I'm guessing this limitation is a historical relic leftover from Grub1. My understanding is that Grub1 doesn't know anything about RAID and so can't boot off any kind of RAID array -- except for RAID arrays that "look like" a non-RAID array.

Is this a limitation of Grub2, or of the OS installers?

I've heard rumors that Grub2 is "able to support /boot on RAID-0, RAID-1 or RAID-5, metadata 0.90, 1.0, 1.1 or 1.2".

Does Grub2 really support putting /boot on a software RAID1 partition with 1.2 metadata?

Does Grub2 really support putting /boot on a software RAID5 partition?

An ideal answer would link to a tutorial that explains how to move a /boot partition (on a non-RAID partition) to a RAID5 partition.

By "looks like" a non-RAID partition, I mean either

  • when Grub1 reads only one hard drive of a software RAID1 array with a ext3 or ext4 filesystem and ignores the RAID metadata 0.90 or 1.0 at the end of the partition, it looks just like the a non-RAID ext2 file system that Grub1 can handle. Or
  • Not a software or fake-RAID, but a full hardware raid that looks like a normal non-RAID disk.
share|improve this question
    
Data points: in Ubuntu 10.04, Grub2 supports some RAID arrangements but not the mdraid modes with the metadata at the beginning. In Ubuntu 11.10, Grub2 supports all mdraid modes. –  Gilles Jan 6 '12 at 23:39
    
@Gilles: Backporting later versions of Grub2 should not be a problem. It has basically no dependencies. –  Faheem Mitha Jan 7 '12 at 5:39
    
add comment

2 Answers 2

up vote 5 down vote accepted

Yes grub2 is fully raid ( and LVM ) aware. In fact you do not need a separate /boot partition at all; you can just put everything on the raid5.

Ideally you want to not install with a /boot partition at all, but removing it after the fact simply means copying all of the files to the root partition, and reinstalling grub, like this:

umount /boot
mount /dev/[bootpart] /mnt
cp -ax /mnt/* /boot
grub-install /dev/sda

Of course you then need to remove the /boot line from /etc/fstab, and you still have the partition laying around, just unused.

Note you can also grub-install to all of the drives in the raid5 so that you can boot from any of them. The Ubuntu grub-pc package will prompt you ( dpkg-reconfigure grub-pc to get it to ask again ) to check off all of the drives you want it installed on and install it for you.

share|improve this answer
    
So I don't have to use metadata=0.9? –  CMCDragonkai Jul 2 at 8:52
    
@CMCDragonkai, no, nor should you. –  psusi Jul 3 at 1:22
add comment

This is a frightful mess in linux. The default superblock version using mdadm is version 1.20. Once you go above 0.90 for booting you are in uncharted territory. Certainly lilo shows no interest above 1.0. Your best bet is to form the raid arrays (tip: use the parameter --metadata=0.90 in your mdadm create) before you use the installation procedure. Then you can install on the RAID array and use your favourite bootloader.

share|improve this answer
    
You can not use LILO to boot from a raid5 no matter what metadata format you use. –  psusi Jul 3 at 1:23
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.