Commit Graph

10 Commits

Author SHA1 Message Date
martin 13c212dcb2 Too much disklabel magic happening in the kernel - to compensate force
MBR first when trying to identify the existing partitioning scheme of
a disk.
2020-01-28 07:43:42 +00:00
martin 86906049de Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.
2020-01-27 21:21:21 +00:00
martin 3a4f84ca06 Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.
2019-12-15 12:01:05 +00:00
martin 194b0d85bc When finding (paritioning scheme native) partition types for file systems
from our install description, pass the partition type (not only the file
system type). Sometimes (e.g. EFI boot partition on GPT) the filesystem
type (MSDOS) is not a unique selector.
2019-12-13 22:12:41 +00:00
martin 2d2d93336c PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
2019-12-09 19:16:53 +00:00
martin f77b58b179 Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
2019-11-12 16:33:14 +00:00
martin 4327f8a536 In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.
2019-10-26 07:32:52 +00:00
martin f96c1808ac On device where we do not want a MBR (raid, xbd) skip the MBR partitioning
scheme when trying to read partitions from disk. The generic reader will
fall back to disklabel then.
2019-10-25 12:49:58 +00:00
martin b04f4d6257 On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.
2019-08-14 13:02:23 +00:00
martin 4103857b9a Rework internal data structures and "interfaces to user interface" functions
to get rid of all disklabel assumptions.

Previously (even for GPT partitioning) struct disklabel was used, which
obviously breaks large disk setups. Also many MD parts and parts of the
user interface assumed (a) a struct disklabel is used internally to
store partitioning information and (b) partitions are named 'a' ... $MAXPART.

Get rid of this and replace it with a quite abstract interface that should
be able to deal with all variants in partition storage:

 - partitions are stored in a (partly abstract) struct disk_partitions
   and most parts of it are only accessed via accessor functions provided
   by a "partitioning scheme".

 - implement partitioning schemes for MBR, disklabel and GPT (with likely
   RDB [amiga] and Apple Partition Map [mac*] to follow soon)

 - partitioning schemes may be cascaded, e.g. on x86 when using MBR as
   "outer partitions", we have disklabel as "inner partitions".

 - all user interface goes via accessor functions in the partitioning scheme,
   some of which return pointers to special user interface descriptors
   (e.g. to allow editing partition flags, which are scheme specific)

Overall the user interface changes (in this initial step) are minimal but
noticable. A new Anita is needed for automatic test setups - many thanks
to Andreas Gustafsson for lots of early testing and a new Anita version,
and to Manuel Bouyer for cooperation and tests of the Anita release.

This work was sponsored by The NetBSD Foundation, Inc.
2019-06-12 06:20:17 +00:00