From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: partition numbering
Date: Sun, 17 Apr 2005 19:44:33 +0200 [thread overview]
Message-ID: <8764yl8fi6.fsf@student.han.nl> (raw)
In-Reply-To: <0c5e52fe3d2654cb915852cd96d0d7ca@penguinppc.org> (Hollis Blanchard's message of "Sun, 17 Apr 2005 12:10:41 -0500")
Hollis Blanchard <hollis@penguinppc.org> writes:
> On Apr 14, 2005, at 12:05 PM, Marco Gerards wrote:
>
>>>>> + unsigned int partno = grub_strtoul (partition, 0, 0);
>>>>> + partno--; /* GRUB partition numbering is 0-based. */
>>>>
>>>> Right. But how can you be sure both match?
>>>
>>> Eh? OF partition numbers are 1-based. To convert to GRUB's 0-based
>>> numbering, we subtract one. How could that not "match"?
>>
>> Because not in all cases GRUB and the firmware will count partitions
>> the same way. A good example is the PC partition map. In linux
>> primary partitions are numbers from 1 to 4, extended partitions are
>> numbered from 5 (IIRC). One other way to count these partitions is
>> just by starting counting from 1.
>>
>> This is just an example. There are a lot of partition table layouts
>> and many ways to interpret partition numbers. I can imagine GRUB
>> does not always work the same as a specific firmware implementation
>> all the time.
>
> If GRUB counts partition numbers different than Open Firmware, I
> consider this a bug that must be fixed. 0-based partition numbers are
> quite confusing enough.
And I do not consider that a bug. We can not confirm to the way every
OS/firmware implementation numbers its partitions. This is *not*
about 0-basic partition numbers, but about how the same things can be
handled differently. We can adapt to the most popular
implementations. But I am sure things will fail someday.
> In this case, due to the implicit numbering of Apple partition map
> entries, this shouldn't even be an issue.
Right. But this is not always true.
--
Marco
next prev parent reply other threads:[~2005-04-17 18:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-13 16:54 [patch] set prefix on PPC Hollis Blanchard
2005-02-13 18:35 ` Marco Gerards
2005-02-13 19:52 ` Hollis Blanchard
2005-02-14 19:01 ` Marco Gerards
2005-02-15 16:39 ` Hollis Blanchard
2005-02-15 21:31 ` Marco Gerards
2005-02-20 0:21 ` Hollis Blanchard
2005-02-20 17:50 ` Marco Gerards
2005-02-24 4:44 ` Hollis Blanchard
2005-04-14 16:35 ` Marco Gerards
2005-02-21 19:01 ` Marco Gerards
2005-02-24 4:40 ` Hollis Blanchard
2005-04-14 17:05 ` Marco Gerards
2005-04-17 17:10 ` partition numbering (was: set prefix on PPC) Hollis Blanchard
2005-04-17 17:44 ` Marco Gerards [this message]
2005-04-17 18:23 ` partition numbering Hollis Blanchard
2005-04-17 18:57 ` Marco Gerards
2005-04-17 19:24 ` Yoshinori K. Okuji
2005-04-17 19:45 ` Marco Gerards
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=8764yl8fi6.fsf@student.han.nl \
--to=metgerards@student.han.nl \
--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.