2

I'd like to create a 5GB (1000) as one partition during the install of Debian. However, I'm not sure if if the partition manager uses Gib or GB.

The version of Debian to be installed is 8.4 using the ext4 file system.

  • Try it! See what happens! You're formatting the drive anyways.... Take a chance! – lornix Apr 4 '16 at 4:15
3

Debian installer will show 5 GB as power of 1000 (SI prefix base-10), which means user can immediately know 5 GB is 5*1000*1000*1000 bytes.

Before installation

Just yesterday, I had Debian 8.2 Xfce desktop release installed on my old test machine. The machine has a 60 GB hard disk, which I had setup manually to create 2.0 GB swap and 10.0 GB ext4 primary partitions. The remaining free disk space is untouched.

Debian Jessie partition setup

After installation

I had installed and run GNOME Disks to view disk partitions. The partitions that Debian installer had created have with the same size, which is shown in the screenshot as follows.

GNOME Disks viewing partition

What shows GB or GiB

It is important to use applications that follows consistent unit prefixes. Then again, some applications don't always use SI prefix base-10 to show the size of disks.

For example, GParted follows consistent unit prefixes, but uses IEC base-2 units to show the size of disks. On the other hand, some command line tools provide options to use either IEC prefix base-2 (KiB, MiB, GiB...) or SI prefix base-10 unit (kB, MB, GB...).

For a quick comparison:

  • Debian installer: 2.0 GB swap 10.0 GB ext4 (SI prefix base-10)
  • GNOME Disks: 2.0 GB swap 10.0 GB ext4 (SI prefix base-10)
  • GParted: 1.86 GiB swap 9.31 GiB ext4 (IEC prefix base-2)

TL;DR Linux users can assume 1 kB is 1000 bytes unless mentioned otherwise. To avoid confusion, use applications that follow consistent unit prefixes. Note that IEC prefix base-2 uses uppercase K in KiB, while SI prefix base-10 uses lowercase k in kB.

1

This is not a definitive answer, but looking at the latest sources for partman, which seems to be one of the underlying tools that you are going to be running, it seems only powers of 1000 suffixes are used and understood, so "1GB" means 1000,000,000 bytes.

You can browse the sources here, in particular the file base.sh which has the function longint2human which translates values into suitable suffixes. human2longint does the reverse.

Sadly, the IEC prefixes are not handled. This was noted as a wishlist bug in 2004, and there was a major discussion in 2007 which pushed the matter "to the next release".

Unfortunately some think that IEC units are just for scientists and not ordinary people, so we will never see them adopted universally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.