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

Bug#684128: src:debian-installer: allow use of binary units in disk partitioner



Package: src:debian-installer
Severity: important
Tags: d-i

The version 6.0 installer invites users to specify the sizes of disk
partitions and volumes in units of "K", "M", "G", and "T". Only later do
they find out that what is meant by this is the politically-correct
decimal units 10^3, 10^6, 10^9, and 10^12, rather than the conventional
binary units of 2^10, 2^20, 2^30, and 2^40. One is only likely to
discover this when the installation is complete, and if that is not what
was wanted, it is then too late to do anything about it other than wipe
the disk and start all over again.

This is not a trivial problem. It is quite reasonable, for example, to
want to be able to say "this system has eight gigabytes of main memory"
and "this system has eight gigabytes of swap space", and have those two
values mean the same thing. The difference between a binary and decimal
"gigabyte" is over seven percent, not insignificant when allocating
filesystem storage.

Currently the only solution is to know in advance (probably by learning
the hard way) that decimal units are being used, and if binary units are
wanted, to write them out in full: 1024, 1048576, 1073741824, etc. This
is clearly not adequate.

Possible solutions:

1 - AT AN ABSOLUTE MINIMUM: at the point where the use of metric
suffixes is suggested, explain that these really are decimal, so that
people who want the binary values know that they need to write them out,
as above.

2 - Give the suffixes the same binary values that many people would
expect them to have, and explain this. There is no need to support the
hard disk manufacturers' deceptive marketing strategy. Flash drives are
not specified with decimal units. (Are they?)

3 - Let the user choose at the beginning of partitioning whether these
units will have binary or decimal meanings, both for specifying new
partitions and volumes, and reporting those that are already present, as
well as the sizes of physical media.

4 - The disk partitioner is presumably based on GNU parted, which allows
either binary ("KiB", "MiB", "GiB", "TiB") or decimal ("KB", "MB", "GB",
"TB") units to be used. Explain to the user that they may specify any of
these units, and pass them through to parted.

5 - Solution (4) leaves open the question of what units will be used to
report volume/partition/disk status. Parted provides the "unit" command
for this purpose, as well as that of solution (3). Perhaps this should
be made available as a menu option, or in some other way.

6 - Alternatively, if the size of some disk volume is an exact multiple
of 2^{10,20,30,40}, report it using the appropriate binary unit,
otherwise with a decimal unit.

http://www.gnu.org/software/parted/manual/html_node/unit.html

Hopefully something can be done about this problem before the next major
release.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash


Reply to: