History log of /netbsd-current/usr.sbin/sysinst/part_edit.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.27 15-May-2022 jmcneill

sysinst: Center the select_part_scheme menu horizontally


# 1.26 05-Dec-2021 msaitoh

s/exisit/exist/ in comment.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.25 31-Jan-2021 rillig

sysinst: remove trailing whitespace from *.c *.h

In contrast to the messages files, this whitespace is not significant.


# 1.24 12-Oct-2020 martin

Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.


# 1.23 12-Oct-2020 martin

PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).


# 1.22 12-Oct-2020 martin

Fix editing start and size of not yet existing outer partitions.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.26 05-Dec-2021 msaitoh

s/exisit/exist/ in comment.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.25 31-Jan-2021 rillig

sysinst: remove trailing whitespace from *.c *.h

In contrast to the messages files, this whitespace is not significant.


# 1.24 12-Oct-2020 martin

Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.


# 1.23 12-Oct-2020 martin

PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).


# 1.22 12-Oct-2020 martin

Fix editing start and size of not yet existing outer partitions.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.25 31-Jan-2021 rillig

sysinst: remove trailing whitespace from *.c *.h

In contrast to the messages files, this whitespace is not significant.


# 1.24 12-Oct-2020 martin

Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.


# 1.23 12-Oct-2020 martin

PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).


# 1.22 12-Oct-2020 martin

Fix editing start and size of not yet existing outer partitions.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.24 12-Oct-2020 martin

Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.


# 1.23 12-Oct-2020 martin

PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).


# 1.22 12-Oct-2020 martin

Fix editing start and size of not yet existing outer partitions.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.22 12-Oct-2020 martin

Fix editing start and size of not yet existing outer partitions.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.21 10-Oct-2020 martin

Remove more pm->ptstart abuse - calculate values localy where needed
instead.


# 1.20 10-Oct-2020 martin

When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).


# 1.19 09-Oct-2020 martin

When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.18 03-Oct-2020 martin

PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.


# 1.17 29-Sep-2020 martin

PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.16 27-Jan-2020 martin

branches: 1.16.4;
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.16 27-Jan-2020 martin

Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.15 20-Jan-2020 martin

First try to bring evbarm installation closer to current reality.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.14 09-Jan-2020 martin

Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.


Revision tags: phil-wifi-20191119
# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.13 16-Nov-2019 joerg

Drop unused variable.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.12 13-Nov-2019 martin

Make cloning support optional, so we can save some space on very small
install media.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.11 12-Nov-2019 martin

Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

branches: 1.7.2;
Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.10 26-Oct-2019 martin

In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.


# 1.9 25-Oct-2019 martin

Honor the "no_mbr" flag (used especially for raid and xbd devices)


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.8 24-Oct-2019 martin

When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.


Revision tags: netbsd-9-base
# 1.7 12-Jul-2019 martin

Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.7 12-Jul-2019 martin

Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.6 09-Jul-2019 martin

When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
on, instead of failing an assertion.
- use the partitions passed as argument and avoid refering (the hopefully
same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.5 22-Jun-2019 christos

no need to initialize fields that are already 0.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.4 20-Jun-2019 christos

Use _fmt_ msg_ methods when formats are needed.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.3 16-Jun-2019 martin

Lower estimates on required install size


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.2 15-Jun-2019 martin

When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.


# 1.1 12-Jun-2019 martin

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.


# 1.1 12-Jun-2019 martin

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.