grub-devel
[Top][All Lists]
Advanced

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

Re: partition map reorganization


From: Marco Gerards
Subject: Re: partition map reorganization
Date: Tue, 02 Nov 2004 16:23:22 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hollis Blanchard <address@hidden> writes:

>> Please make sure that for every partition type the endian is converted
>> to the host endian.
>
> I'm actually not writing any partition map code, just rearranging the
> code that's already present.

IMHO it is part of the job.  I think most code was written to be
portable, but I think it has not been tested.  If it all works, just
ignore what I said here.

>>> In order to support both partition types (and potentially more, should
>>> the need arise) in the same binary, I'm introducing a "partition_ops"
>>> structure to struct grub_disk, which contains a couple function
>>> pointers that are set as appropriate at grub_disk_open time. There is
>>> one ops structure per partition map type (i.e. DOS and Apple right
>>> now).
>>
>> Does this mean it will be possible to create modules for partitions?
>> For example applepartmap.mod or so.  This is really important to me.
>
> Why is that important?
>
> Also, please describe how a partition map or filesystem module can be
> loaded at runtime when that partition map or filesystem would be
> needed to load anything from the disk in the first place?

First of all it is about modularity.  On the PC the user can configure
the core module to support ext2fs, for example.  In that case normal
mode can be loaded from disk.  After that it can also load other
filesystems, for example to load the kernel from a jfs partition or
so.

What I want in the future is that it is not only possible to have a
disk driver and filesystem in a module, but partition map support as
well.

On the PC port nothing will change, you just have to add support for
PC style partitions to the core module.  There is not a chicken-egg
problem here (from what you are saying, it sounds like you expect
one), the main issue is modularity.

> I was not initially planning to support a register/unregister model
> for partition map support. But that should be easy enough as a
> follow-on patch.

Please implement it because it is really important in the future.  It
is also how everything else in GRUB 2 works.  So basically you need to
be able to load and register partition map modules, just like you can
load a disk driver (as they are in disk/) and filesystem modules (like
in filesystem/).

Until we have module support on the PPC, all partition modules should
be activated by default for grubof.  It is important that the
partition type can be detected somehow, perhaps some partition schemes
can live side by side, etc.  At the moment only PC and apple
partitions are supported.  In the future I plan to add amiga style
partitions.

Thanks,
Marco






reply via email to

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