From: Colin Watson <cjwatson@ubuntu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Which partitioning schemes should be supported by GRUB?
Date: Mon, 14 Jun 2010 12:37:03 +0100 [thread overview]
Message-ID: <20100614113702.GN21862@riva.ucam.org> (raw)
In-Reply-To: <4C15044D.9050608@gmail.com>
On Sun, Jun 13, 2010 at 06:16:13PM +0200, Grégoire Sutre wrote:
> On 06/12/2010 07:26 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> And currently grub isn't changed to new partition notation
>> completely. E.g. during startup prefix is calculated with old syntax
>> and confusing A+B with either A or B is likely to make user drop into
>> rescue shell
>
> Is someone working on making the startup prefix use the new notation?
I've only looked at the i386-pc startup sequence here, but the thing
that jumps out at me is that grub_install_dos_part and
grub_install_bsd_part are both longs. I doubt we really need to support
2 billion partitions. How about we split off, say, a byte of that to
hold the partition map type, and then it would be easy enough for the
startup code to turn that into appropriate prefixes?
There are two downsides that I can see:
* We would need to maintain an enum of partition map identifiers; but
there's precedent for this approach already, such as
grub_disk_dev_id.
* The names of all the partition maps would have to live in the kernel
somewhere; packed as sequential strings, this comes to 42 bytes plus
the code to use it, which isn't a lot by most measures but I know we
never have much slack in the kernel.
I can think of an alternative. We do still need grub_install_dos_part
and grub_install_bsd_part for the multiboot trampoline, which is in
assembly, so it's difficult to abandon them altogether. However,
there's no reason we need to use them in make_install_device. How about
we invent a way to encode most of the information in string form in
grub_prefix, while leaving a placeholder for make_install_device to fill
in the disk? There are 64 bytes available for grub_prefix, which should
be plenty. For example, how about the following (with \0 standing for
ASCII NUL):
(\0,msdos1,bsd1)/boot/grub
It's then just a matter of spotting the "(\0," sequence and replacing
the \0 with the drive name. I think this can probably be done using
less code than the first option above, and all told it feels a bit less
hacky to me.
What do people prefer?
--
Colin Watson [cjwatson@ubuntu.com]
next prev parent reply other threads:[~2010-06-14 11:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-06 18:02 Which partitioning schemes should be supported by GRUB? Grégoire Sutre
2010-06-07 20:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-09 22:45 ` Grégoire Sutre
2010-06-09 23:03 ` C. P. Ghost
2010-06-12 16:32 ` Grégoire Sutre
2010-06-12 17:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-13 16:16 ` Grégoire Sutre
2010-06-14 11:37 ` Colin Watson [this message]
2010-06-14 13:07 ` richardvoigt
2010-06-14 13:25 ` Colin Watson
2010-06-14 15:02 ` Colin Watson
2010-06-14 15:58 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-14 16:43 ` Colin Watson
2010-06-14 16:55 ` Seth Goldberg
2010-06-14 17:33 ` Colin Watson
2010-06-14 17:12 ` Grégoire Sutre
2010-06-15 11:21 ` Colin Watson
2010-06-15 21:07 ` Grégoire Sutre
2010-06-16 13:01 ` Colin Watson
2010-06-16 23:31 ` Grégoire Sutre
2010-06-17 0:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-17 11:29 ` Colin Watson
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=20100614113702.GN21862@riva.ucam.org \
--to=cjwatson@ubuntu.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.