From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Bug#478238: grub-probe: fails to find drive for /dev/sda10
Date: Mon, 12 May 2008 17:44:10 +0200 [thread overview]
Message-ID: <20080512154409.GD1841@thorin> (raw)
In-Reply-To: <4826DA0D.9070302@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
On Sun, May 11, 2008 at 02:35:41PM +0300, Török Edwin wrote:
>
> /dev/sda9 is not a valid OpenBSD partition, and in partmap/pc.c:176 the
> iteration fails with an error: invalid disk label magic 0x%x.
> If I replace that return with a continue, it works.
>
> The problem is that grub2 stops looking for more partitions as soon as
> it encountered the invalid partition,
I think a correct fix for this belongs in grub_partition_iterate(). It should
only let its hook determine abortability rather than mandate that invalid
partitions should cause abortion. Please, can you test the attached patch?
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
[-- Attachment #2: partition_iterate.diff --]
[-- Type: text/x-diff, Size: 524 bytes --]
diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp ../grub2/kern/partition.c ./kern/partition.c
--- ../grub2/kern/partition.c 2007-07-22 01:32:26.000000000 +0200
+++ ./kern/partition.c 2008-05-12 17:41:51.000000000 +0200
@@ -89,7 +89,7 @@ grub_partition_iterate (struct grub_disk
const grub_partition_t partition))
{
grub_partition_map_t partmap = 0;
- int ret = 0;
+ int ret = 1;
auto int part_map_iterate (const grub_partition_map_t p);
auto int part_map_iterate_hook (grub_disk_t d,
next prev parent reply other threads:[~2008-05-12 15:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <481590B8.7000405@gmail.com>
[not found] ` <20080429134626.GB8328@thorin>
[not found] ` <481DC1BC.6020002@gmail.com>
[not found] ` <20080506133126.GG5055@thorin>
2008-05-11 11:35 ` Bug#478238: grub-probe: fails to find drive for /dev/sda10 Török Edwin
2008-05-12 15:44 ` Robert Millan [this message]
2008-05-12 16:02 ` Török Edwin
2008-05-12 18:43 ` Robert Millan
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=20080512154409.GD1841@thorin \
--to=rmh@aybabtu.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.