PartitioningTool

Differences between revisions 1 and 18 (spanning 17 versions)
Revision 1 as of 2005-10-31 17:53:09
Size: 1005
Editor: 187_220_103_66-WIFI_HOTSPOTS
Comment: new spec
Revision 18 as of 2005-11-03 23:36:45
Size: 8651
Editor: 221_220_103_66-WIFI_HOTSPOTS
Comment: Review
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from ExpressPartitioningTool
Line 5: Line 6:
 * '''Contributors''': JaneWeideman, ColinWatson
 * '''Packages affected''':
 * '''Contributors''': JaneWeideman, ColinWatson, MatthewPaulThomas
 * '''Packages affected''': ubuntu-express, partman-auto, gparted
Line 10: Line 11:
A partitioning tool for Ubuntu Expess.For automatic partitioning, we would like to share code with the existing installer component (partman). This will be best accomplished by providing it as an installable binary package (in addition to an installer component), so that it can be added to the live seed and used in a standard environment. partman uses debconf progress indicators, so some consideration is required in order to provide a consistent progress bar in the installation tool. Design a partitioning tool for Ubuntu Express, with reference to existing installer code.
Line 14: Line 15:
For automatic partitioning, we would like to share code with the existing installer component (partman). This will be best accomplished by providing it as an installable binary package (in addition to an installer component), so that it can be added to the live seed and used in a standard environment. partman uses debconf progress indicators, so some consideration is required in order to provide a consistent progress bar in the installation tool.

For advanced/interactive partitioning, we will extend an existing partitioning tool. The selection and development of this tool are discussed in GraphicalPartitioningTool. The installer must unmount all hard disk filesystems and deactivate swap before acting on the partition table, or launching an external partition editor.

{{{XXX:smurf:unmounting disks et al. is an Implementation problem}}}

We only ever attempt to automatically present one partition for resizing, because attempting to resize more than one involves either (a) creating non-contiguous free space or (b) moving partitions around and thus risking breaking existing boot arrangements for the operating systems on those partitions.

{{{XXX:smurf:That should probably be a Limitations subsection of Implementation.
Anyway, what's wrong with noncontiguous free space? I can get that easily if I delete
the first and last partition on my three-partition disk. What do you do when that happens?}}}
Line 15: Line 28:

 * A user wants to install Ubuntu onto a new (second) hard disk.
 * A user wants to install Edubuntu into unpartitioned space on a hard disk.
 * A user has an existing installation of Windows with some free space on that partition, and would like to downsize Windows to make space to install Kubuntu into part of that free space.
Line 18: Line 35:
This specification considers only the partitioning component of UbuntuExpress, and the associated user interface issues.
Line 20: Line 39:
== Implementation == The implementor should feel free to decide on the exact text used in the following dialogs, in consultation with usability experts. Decisions may be influenced by translated text already available elsewhere.
Line 22: Line 41:
=== Code === Some effort has been made in the dialogs below to account for languages with non-trivial plural forms (e.g. by not spelling out numbers in English, and by consolidating various possibilities into single dialogs), but the result may not be perfect.
Line 24: Line 43:
=== Data preservation and migration === === Choosing a disk ===

This stage will be skipped if only one disk is present.

The disk chooser should make sure enough information is available to allow the user to make an informed decision. For example:

{{{
The following hard disks are present:

(*) <description of disk>, with 10 GB free space

( ) <description of disk>, empty

( ) <description of disk>, with 5 GB free space on Windows partition

( ) <description of disk>, no free space

( ) Specify partitions manually (advanced)
}}}

=== Partitioning the disk ===

==== Simple case ====

(Appears if no resizable systems were detected on the chosen disk)

{{{
The Seagate 18.2 GB hard disk has 4.1 GB of free space. What do you
want to do?

(*) Install Ubuntu in the free space

( ) Erase everything on the disk, and replace it with Ubuntu
    Warning: This will delete all documents, programs, and other
    files on the disk.

( ) Specify partitions manually (advanced)
}}}

==== Other systems on this disk ====

(Appears if other systems detected on the chosen disk)

{{{
It looks like the Seagate 18.2 GB hard disk has the following other
systems on it already:

  Mac OS
  Mac OS X
  DebianPPC

What do you want to do with these systems?

(*) Put Ubuntu alongside, so you choose a system on each startup
    If you choose this option, you'll need to decide how much space
    should be reserved for each system.

( ) Erase them all, and replace them with Ubuntu
    Warning: This will delete all documents, programs, and other
    files on the disk.

[If more than one other system was detected:]
( ) Erase just this one, and replace it with Ubuntu:
    +-----------------------------+-+
    |(*) Mac OS |A|
    |( ) Mac OS X |:|
    |( ) DebianPPC |V|
    +-----------------------------+-+

You will be able to confirm the changes that will be made to your
disks before any of these changes are made.
[If there is another disk:] To choose another disk, click "Go Back".

( ) Specify partitions manually (advanced)
}}}

==== Partition the disk ====

(Appears if dual-/multiple-booting)

{{{
Once Ubuntu is added to the disk "Seagate HD", there will be 4.9 GB left
for documents and other files you add later. How much of this space do
you want to allocate for each system?

  Windows 98: [ 2.4]H GB =====V=====
      Ubuntu: [ 2.5]H GB =====V=====
       Total: 4.9 GB
}}}

==== Advanced partitioning ====

In the [:UbuntuExpress/GnomeUserInterface:GNOME user interface], the advanced partitioning option will consist of `gparted --installer` (which already has some modifications for this situation) with its toolbar removed. In the [:KubuntuExpress:KDE user interface], we expect it to consist of a modified version of `qtparted`, at the discretion of the implementors of KubuntuExpress.

Pressing the Back button in the advanced partitioning tool will ask the user whether to commit or undo changes (since it is a separate application and needs to commit or undo on exit) and will then try automatic partitioning again. This allows deleting more carefully selected partitions than those offered by automatic partitioning, but still being able to take advantage of automatic partitioning to lay out the new partitions required.

=== Progress display ===

The partitioning process should take only a small percentage (say 10%, depending on stopwatch measurements) of the total progress bar. Since we can accurately estimate time remaining for resizing and partitioning, but we cannot accurately estimate time remaining for resizing, partitioning, and copying files, this is necessarily a guess.

Additionally, we will show progress of individual steps in text next to the progress bar, e.g. "Resizing Windows partition: 40% complete", to provide more detailed feedback.

=== Integration with partman ===

It is strongly desirable to reuse code from partman, in order to take advantage of clever automatic partitioning algorithms, logic for disabling swap while changing the partition table, and so on. Thanks to the `debconffilter` framework from OEMInstaller, we expect that this can be done with few modifications to partman (only those required to handle devfs paths).

The automatic partitioning stage of UbuntuExpress will run the `partman` script, with all interesting debconf questions wrapped in appropriate widgets for the user interface. Asking the `partman/choose_partition` question will stop the parted server, invoke the advanced partitioner, and restart the parted server. If the advanced partitioner wishes to back up, that debconf `GO` command will return `30 backup` to cause partman to return to its automatic partitioning menu.

It will be necessary to rearrange some questions to fit into the user interface outline above. Since we are filtering the debconf protocol, this is relatively easy, since we can display only the choices we want. It is possible that we may need to add a small number of extra partman scripts to support the user interface model above, and run those in UbuntuExpress instead of some of the standard ones (which is a simple build system change). This can be done incrementally, starting with a user interface modelling the options presented by the standard partman and evolving until we reach the desired user interface.
Line 28: Line 155:
== BoF agenda and discussion ==  * Look at [http://www.google.com/images?q=yast%20partitioning Yast's partitioning tool].

 * Minimise uses of the word Ubuntu in sentences, to make it easier for derivatives such as Kubuntu, Edubuntu, Impilinux, Guadalinex, etc. to use UbuntuExpress without modifications; see BrandingForDerivatives.

Summary

Design a partitioning tool for Ubuntu Express, with reference to existing installer code.

Rationale

For automatic partitioning, we would like to share code with the existing installer component (partman). This will be best accomplished by providing it as an installable binary package (in addition to an installer component), so that it can be added to the live seed and used in a standard environment. partman uses debconf progress indicators, so some consideration is required in order to provide a consistent progress bar in the installation tool.

For advanced/interactive partitioning, we will extend an existing partitioning tool. The selection and development of this tool are discussed in GraphicalPartitioningTool. The installer must unmount all hard disk filesystems and deactivate swap before acting on the partition table, or launching an external partition editor.

XXX:smurf:unmounting disks et al. is an Implementation problem

We only ever attempt to automatically present one partition for resizing, because attempting to resize more than one involves either (a) creating non-contiguous free space or (b) moving partitions around and thus risking breaking existing boot arrangements for the operating systems on those partitions.

{{{XXX:smurf:That should probably be a Limitations subsection of Implementation. Anyway, what's wrong with noncontiguous free space? I can get that easily if I delete the first and last partition on my three-partition disk. What do you do when that happens?}}}

Use cases

  • A user wants to install Ubuntu onto a new (second) hard disk.
  • A user wants to install Edubuntu into unpartitioned space on a hard disk.
  • A user has an existing installation of Windows with some free space on that partition, and would like to downsize Windows to make space to install Kubuntu into part of that free space.

Scope

This specification considers only the partitioning component of UbuntuExpress, and the associated user interface issues.

Design

The implementor should feel free to decide on the exact text used in the following dialogs, in consultation with usability experts. Decisions may be influenced by translated text already available elsewhere.

Some effort has been made in the dialogs below to account for languages with non-trivial plural forms (e.g. by not spelling out numbers in English, and by consolidating various possibilities into single dialogs), but the result may not be perfect.

Choosing a disk

This stage will be skipped if only one disk is present.

The disk chooser should make sure enough information is available to allow the user to make an informed decision. For example:

The following hard disks are present:

(*) <description of disk>, with 10 GB free space

( ) <description of disk>, empty

( ) <description of disk>, with 5 GB free space on Windows partition

( ) <description of disk>, no free space

( ) Specify partitions manually (advanced)

Partitioning the disk

Simple case

(Appears if no resizable systems were detected on the chosen disk)

The Seagate 18.2 GB hard disk has 4.1 GB of free space. What do you
want to do?

(*) Install Ubuntu in the free space

( ) Erase everything on the disk, and replace it with Ubuntu
    Warning: This will delete all documents, programs, and other
    files on the disk.

( ) Specify partitions manually (advanced)

Other systems on this disk

(Appears if other systems detected on the chosen disk)

It looks like the Seagate 18.2 GB hard disk has the following other
systems on it already:

  Mac OS
  Mac OS X
  DebianPPC

What do you want to do with these systems?

(*) Put Ubuntu alongside, so you choose a system on each startup
    If you choose this option, you'll need to decide how much space
    should be reserved for each system.

( ) Erase them all, and replace them with Ubuntu
    Warning: This will delete all documents, programs, and other
    files on the disk.

[If more than one other system was detected:]
( ) Erase just this one, and replace it with Ubuntu:
    +-----------------------------+-+
    |(*) Mac OS                   |A|
    |( ) Mac OS X                 |:|
    |( ) DebianPPC                |V|
    +-----------------------------+-+

You will be able to confirm the changes that will be made to your
disks before any of these changes are made.
[If there is another disk:] To choose another disk, click "Go Back".

( ) Specify partitions manually (advanced)

Partition the disk

(Appears if dual-/multiple-booting)

Once Ubuntu is added to the disk "Seagate HD", there will be 4.9 GB left
for documents and other files you add later. How much of this space do
you want to allocate for each system?

  Windows 98: [ 2.4]H GB =====V=====
      Ubuntu: [ 2.5]H GB =====V=====
       Total:   4.9   GB

Advanced partitioning

In the [:UbuntuExpress/GnomeUserInterface:GNOME user interface], the advanced partitioning option will consist of gparted --installer (which already has some modifications for this situation) with its toolbar removed. In the [:KubuntuExpress:KDE user interface], we expect it to consist of a modified version of qtparted, at the discretion of the implementors of KubuntuExpress.

Pressing the Back button in the advanced partitioning tool will ask the user whether to commit or undo changes (since it is a separate application and needs to commit or undo on exit) and will then try automatic partitioning again. This allows deleting more carefully selected partitions than those offered by automatic partitioning, but still being able to take advantage of automatic partitioning to lay out the new partitions required.

Progress display

The partitioning process should take only a small percentage (say 10%, depending on stopwatch measurements) of the total progress bar. Since we can accurately estimate time remaining for resizing and partitioning, but we cannot accurately estimate time remaining for resizing, partitioning, and copying files, this is necessarily a guess.

Additionally, we will show progress of individual steps in text next to the progress bar, e.g. "Resizing Windows partition: 40% complete", to provide more detailed feedback.

Integration with partman

It is strongly desirable to reuse code from partman, in order to take advantage of clever automatic partitioning algorithms, logic for disabling swap while changing the partition table, and so on. Thanks to the debconffilter framework from OEMInstaller, we expect that this can be done with few modifications to partman (only those required to handle devfs paths).

The automatic partitioning stage of UbuntuExpress will run the partman script, with all interesting debconf questions wrapped in appropriate widgets for the user interface. Asking the partman/choose_partition question will stop the parted server, invoke the advanced partitioner, and restart the parted server. If the advanced partitioner wishes to back up, that debconf GO command will return 30 backup to cause partman to return to its automatic partitioning menu.

It will be necessary to rearrange some questions to fit into the user interface outline above. Since we are filtering the debconf protocol, this is relatively easy, since we can display only the choices we want. It is possible that we may need to add a small number of extra partman scripts to support the user interface model above, and run those in UbuntuExpress instead of some of the standard ones (which is a simple build system change). This can be done incrementally, starting with a user interface modelling the options presented by the standard partman and evolving until we reach the desired user interface.

Outstanding issues

UbuntuExpress/PartitioningTool (last edited 2008-08-06 16:32:54 by localhost)