Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KSVn1-0004up-Qa for mharc-grub-devel@gnu.org; Mon, 11 Aug 2008 07:42:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSVmz-0004qi-MJ for grub-devel@gnu.org; Mon, 11 Aug 2008 07:42:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSVmx-0004nc-HI for grub-devel@gnu.org; Mon, 11 Aug 2008 07:42:16 -0400 Received: from [199.232.76.173] (port=57815 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSVmx-0004nQ-BL for grub-devel@gnu.org; Mon, 11 Aug 2008 07:42:15 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]:54395) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSVmw-0008Bz-O5 for grub-devel@gnu.org; Mon, 11 Aug 2008 07:42:15 -0400 Received: from [85.180.26.36] (e180026036.adsl.alicedsl.de [85.180.26.36]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1KSVmv18Ku-0005Q4; Mon, 11 Aug 2008 13:42:13 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-JJeM5unpgcMba8WhYlsV" Date: Mon, 11 Aug 2008 13:42:16 +0200 Message-Id: <1218454936.4035.19.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-Provags-ID: V01U2FsdGVkX19H2o6NdN7z6lyCsRH40ShVRP2Db181gmpeI2P 5O/zmDG3yuBsaV5fFCrhS34yRwnwFLzhFK/jEaTemsRQLIW3i8 QU3Q7UBrtIj8ot8HXsQ0b/N8duKv1pv X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: [PATCH] just skip over invalid/unsupported RAID X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 11:42:18 -0000 --=-JJeM5unpgcMba8WhYlsV Content-Type: text/plain Content-Transfer-Encoding: 7bit I said this already on Bean's RAID topic, but I think I just make now a new topic instead of messing him's up. So here's again a patch which changes grub_error into grub_dprintf, it's the same reason as with these invalid BSD disklabels/partitions See [0] for a good reason. GRUB shouldn't fail to rescue mode, if an unsupport RAID (in this case 6) is used on disks which GRUB doestn't even need to access. Reporter has / and /boot on a raid1 and his raid6 is at the time of the report not even mounted. I wasn't that sure about the last case, I changed. I had this too with my raid 1 experiments, as I forgot to --zero-superblock the second disk. Normaly it sohuld never happen that you have more disks for an array as the super block says you have. [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494501 2008-08-11 Felix Zielcke * disk/raid.c (grub_raid_scan_device): Do not abort on unsupported RAID levels or if something is wrong, use grub_dprintf to issue a warning. --=-JJeM5unpgcMba8WhYlsV Content-Disposition: attachment; filename=raid_dprintf.diff Content-Type: text/x-patch; name=raid_dprintf.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: disk/raid.c =================================================================== --- disk/raid.c (Revision 1799) +++ disk/raid.c (Arbeitskopie) @@ -383,7 +383,7 @@ /* FIXME: Also support version 1.0. */ if (sb.major_version != 0 || sb.minor_version != 90) { - grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, + grub_dprintf ("raid", "Unsupported RAID version: %d.%d", sb.major_version, sb.minor_version); return 0; @@ -394,7 +394,7 @@ /* FIXME: Support all RAID levels. */ if (sb.level != 0 && sb.level != 1 && sb.level != 5) { - grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, + grub_dprintf ("raid", "Unsupported RAID level: %d", sb.level); return 0; @@ -403,7 +403,7 @@ /* FIXME: Support all layouts. */ if (sb.level == 5 && sb.layout != 2) { - grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, + grub_dprintf ("raid", "Unsupported RAID5 layout: %d", sb.layout); return 0; @@ -434,7 +434,7 @@ happen normally, but what is the sanest things to do in such a case? */ - grub_error (GRUB_ERR_BAD_NUMBER, + grub_dprintf ("raid", "array->nr_devs > array->total_devs (%d)?!?", array->total_devs); --=-JJeM5unpgcMba8WhYlsV--