grub-devel
[Top][All Lists]
Advanced

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

Software RAID and Fakeraid


From: John Sheu
Subject: Software RAID and Fakeraid
Date: Thu, 25 Nov 2010 02:26:38 -0800

What's the preferred way to differentiate BIOS fakeraid from regular software mdraid?

I ask this as I'm booting with GRUB2 off a system that has one of those Intel fakeraid chipsets.  As of a few months ago, the mdadm package has supported these fakeraid setups, so the RAID array comes up as a /dev/md### device.  This is unfortunate, as GRUB2 assumes that any device of the type /dev/md### must be a pure software RAID device, and in util/grub-setup.c:939, tries to install itself to the RAID members individually:

if (0 && dest_dev[0] == 'm' && dest_dev[1] == 'd'
    && ((dest_dev[2] >= '0' && dest_dev[2] <= '9') || dest_dev[2] == '/'))
  {
    char **devicelist;
    int i;

    devicelist = grub_util_raid_getmembers (dest_dev);

    for (i = 0; devicelist[i]; i++)
      {
        setup (arguments.dir ? : DEFAULT_DIRECTORY,
               arguments.boot_file ? : DEFAULT_BOOT_FILE,
               arguments.core_file ? : DEFAULT_CORE_FILE,
               root_dev, grub_util_get_grub_dev (devicelist[i]), 1,
               arguments.force, arguments.fs_probe);
      }
  }

For a fakeraid setup, however, the BIOS presents the entire device as "regular" int13 device, so GRUB2 really should be installing it to the entire /dev/md### device, not the individual members.

So what's the preferred way to differentiate BIOS fakeraid?  Is there some ioctl that would make this easier than having to parse /proc/mdstat?

Thanks,
-John Sheu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]