grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Robert LeBlanc <robert@leblancnet.us>
To: robert@leblancnet.us, grub-devel@gnu.org
Subject: [PATCH] disk/mdraid1x: Fix >2TB RAID detection with BIOS
Date: Thu, 17 Nov 2016 13:09:07 -0700	[thread overview]
Message-ID: <20161117200907.18342-1-robert@leblancnet.us> (raw)

When a mdadm RAID array is on a drive larger than 2TB, the array is not
able to be detected and as such even if the array has a partition that
holds /boot under the 2TB limit, it is unable to boot the machine. This
is caused by metadata 1.0 being tested first which allocates the
superblock at the end of the device. When it tries to access the end of
the device it throws an error and the code returns without trying to
find the superblock at other locations (metadata 1.1 and 1.2). This
patch changes the error to not be fatal and allow for the checking for
the other metadata versions and allowing the machine to boot as long as
/boot is under the 2TB BIOS limit. This won't cause issues with 1.0
metadata because GRUB is able to read the partitions from the front of
the drive/partition without having to determine the data offset, since
the data for metadata 1.0 starts at sector 0.

Signed-off-by: Robert LeBlanc <robert@leblancnet.us>
---
 grub-core/disk/mdraid1x_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/disk/mdraid1x_linux.c b/grub-core/disk/mdraid1x_linux.c
index 7cc80d3..cc7350c 100644
--- a/grub-core/disk/mdraid1x_linux.c
+++ b/grub-core/disk/mdraid1x_linux.c
@@ -148,7 +148,7 @@ grub_mdraid_detect (grub_disk_t disk,
 
       if (grub_disk_read (disk, sector, 0, sizeof (struct grub_raid_super_1x),
 			  &sb))
-	return NULL;
+	continue;
 
       if (sb.magic != grub_cpu_to_le32_compile_time (SB_MAGIC)
 	  || grub_le_to_cpu64 (sb.super_offset) != sector)
-- 
2.10.1



             reply	other threads:[~2016-11-17 20:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 20:09 Robert LeBlanc [this message]
2016-11-18  4:16 ` [PATCH] disk/mdraid1x: Fix >2TB RAID detection with BIOS Andrei Borzenkov
2016-11-18 16:49   ` Robert LeBlanc
2016-11-18 17:31     ` Andrei Borzenkov
2016-11-18 18:06       ` Robert LeBlanc
2016-11-18 18:15         ` Andrei Borzenkov
2016-11-18 18:19           ` Robert LeBlanc
2016-11-18 18:24             ` Andrei Borzenkov
2016-11-18 20:43               ` Robert LeBlanc
2016-11-19  8:59                 ` Andrei Borzenkov
2016-11-19 17:57                   ` Robert LeBlanc
2016-11-19 18:40                     ` Andrei Borzenkov
2016-11-20  2:47                       ` Robert LeBlanc
2016-11-20  3:38                         ` Robert LeBlanc
2016-11-20  6:53                         ` Andrei Borzenkov
2016-11-22 19:00                           ` Robert LeBlanc
2016-12-06 16:59                             ` Robert LeBlanc
2017-01-11 17:21 ` Robert LeBlanc
2017-01-24  9:57   ` Vladimir 'phcoder' Serbinenko
2017-01-24 17:22     ` Robert LeBlanc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161117200907.18342-1-robert@leblancnet.us \
    --to=robert@leblancnet.us \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).