From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PLZ2K-0001wN-4r for mharc-grub-devel@gnu.org; Thu, 25 Nov 2010 05:26:44 -0500 Received: from [140.186.70.92] (port=57200 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLZ2H-0001vI-8A for grub-devel@gnu.org; Thu, 25 Nov 2010 05:26:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLZ2G-0006Ik-Ap for grub-devel@gnu.org; Thu, 25 Nov 2010 05:26:41 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:61841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLZ2G-0006FU-0E for grub-devel@gnu.org; Thu, 25 Nov 2010 05:26:40 -0500 Received: by fxm20 with SMTP id 20so3668145fxm.0 for ; Thu, 25 Nov 2010 02:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=wDxBQLXqYk/IEr5nfcigIwpyfbF4512hep/o7/EkaPA=; b=ovBTx3tHczHZvhaZ+SpArT+IQEm+aCzWjktNMLg22mlpWpN0FieKpoanpSKiHYskJj Zoz6ESn1oS4zH8l5D7Cvjv8JjhnF5CXaXz9HvNW04j2l+Taa5KsGcCiE+CkyqMntCWjt WmWQFwFCpw54tAfYkGARIoa4IISmzGPWj5tdQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=szfafdhyGwNP5u1zAyzaRvCG9PTim/Q+Y3iXd0NARnMeDSG+b0cwua9LYHnSiI3b7U 7NiYxK7QjYJ6NAcRly71dcn3LQJBkhMiQlp5ylVU7rBpxLKQB7Ero7maX6DFCHS7Nia1 /mmVH0xEHGCSmrDGa1LN6WR0Ue7xXD0KgsynU= MIME-Version: 1.0 Received: by 10.223.73.207 with SMTP id r15mr494863faj.141.1290680798296; Thu, 25 Nov 2010 02:26:38 -0800 (PST) Received: by 10.223.1.80 with HTTP; Thu, 25 Nov 2010 02:26:38 -0800 (PST) Date: Thu, 25 Nov 2010 02:26:38 -0800 Message-ID: From: John Sheu To: grub-devel@gnu.org Content-Type: multipart/alternative; boundary=20cf3054a4cd8041480495de0ab1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Software RAID and Fakeraid X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2010 10:26:42 -0000 --20cf3054a4cd8041480495de0ab1 Content-Type: text/plain; charset=ISO-8859-1 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 --20cf3054a4cd8041480495de0ab1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable What's the preferred way to differentiate BIOS fakeraid from regular so= ftware mdraid?

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

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

=A0=A0=A0 devicelist =3D grub_util_raid_getmembers = (dest_dev);

=A0=A0=A0 for (i =3D 0; devicelist[i]; i++)
=A0=A0=A0= =A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 setup (arguments.dir ? : DEFAULT_DIRECTOR= Y,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 arguments.boot_file ? : DE= FAULT_BOOT_FILE,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 arguments.core_file ? : DEFAULT_= CORE_FILE,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 root_dev, grub_uti= l_get_grub_dev (devicelist[i]), 1,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 arguments.force, arguments.fs_probe);
=A0=A0=A0=A0=A0 }
=A0 }<= br>
For a fakeraid setup, however, the BIOS presents the entire device a= s "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?=A0 Is t= here some ioctl that would make this easier than having to parse /proc/mdst= at?

Thanks,
-John Sheu
--20cf3054a4cd8041480495de0ab1--