grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] disk/mdraid1x: Fix >2TB RAID detection with BIOS


From: Robert LeBlanc
Subject: Re: [PATCH] disk/mdraid1x: Fix >2TB RAID detection with BIOS
Date: Tue, 24 Jan 2017 10:22:56 -0700

OK, I'll rework the patch and resubmit it. Thanks for the feedback.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1


On Tue, Jan 24, 2017 at 2:57 AM, Vladimir 'phcoder' Serbinenko
<address@hidden> wrote:
> This fix is buggy as you don't reset grub_errno on this path. Also you
> probably want to ignore only a single error type GRUB_ERR_OUT_OF_RANGE as
> others are likely still fatal.
>
> On Wed, 11 Jan 2017, 20:26 Robert LeBlanc <address@hidden> wrote:
>>
>> Can we get this fix merged in?
>>
>> Thanks
>> ----------------
>> Robert LeBlanc
>> PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1
>>
>>
>> On Thu, Nov 17, 2016 at 1:09 PM, Robert LeBlanc <address@hidden>
>> wrote:
>> > 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 <address@hidden>
>> > ---
>> >  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
>> >
>>
>> _______________________________________________
>> Grub-devel mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

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