After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697848 - Failure to Create 1 MiB NTFS Partition
Failure to Create 1 MiB NTFS Partition
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.15.0
Other Linux
: Normal minor
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2013-04-12 02:49 UTC by Strz4life2
Modified: 2013-09-18 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set NTFS minimum partitoin size to 2 MiB patch (1.32 KB, patch)
2013-05-30 19:00 UTC, Curtis Gedak
none Details | Review

Description Strz4life2 2013-04-12 02:49:24 UTC
GParted thinks that a 1 MB partition is 1023 KB instead of 1024 KB when creating a 1 MB partition that's why there's an error saying that the partition is too small when creating a 1 MB partition.
Comment 1 Curtis Gedak 2013-04-12 15:12:41 UTC
Would you be able to provide the gparted_details.htm log file when this problem occurs?


I tried to reproduce the problem you describe by creating a 1 MiB unformatted partition and GParted 0.15.0 created it for me with no problems.
Comment 2 Strz4life2 2013-04-13 09:11:44 UTC
This problem occurs when creating a 1 MB NTFS partition.
Comment 3 Strz4life2 2013-04-14 01:33:14 UTC
When creating a 1 MB NTFS partition an error occurs saying that the partition is not big enough?
Comment 4 Curtis Gedak 2013-04-14 15:20:06 UTC
With an NTFS file system, space is needed within the partition for the file system plus one extra sector at the end for the backup Partition Boot Record (PBR).

See the notes regarding Total Sectors ( in the Volume ) at offset 28h in:
An Examination of the NTFS Volume Boot Record
http://thestarman.pcministry.com/asm/mbr/NTFSBR.htm

Hence it appears from practice that a 1 MiB NTFS file system actually requires
1 MiB + 1 sector.  With MiB alignment in GParted, 2 MiB would be needed to meet this requirement.

A note in the Microsoft TechNet recommends a minimum volume size of 10 MB for an NTFS partition.

See NTFS compared to FAT and FAT32:
http://technet.microsoft.com/en-us/library/cc779002%28WS.10%29.aspx

Since the minimum allocatable unit in GParted is 1 MiB, I think the best way to address this problem is to increase the minimum size for NTFS in GParted to 2 MiB.  That way people who would like to create partitions smaller than 10 MB can still do so.
Comment 5 Curtis Gedak 2013-04-15 21:41:49 UTC
Moving this report to component application from livecd.
Comment 6 Curtis Gedak 2013-04-30 16:43:39 UTC
Rename title from "1 MB Partition" to "Failure to create 1 MiB NTFS Partition"
Comment 7 Curtis Gedak 2013-05-30 19:00:36 UTC
Created attachment 245668 [details] [review]
Set NTFS minimum partitoin size to 2 MiB patch

The attached patch sets the NTFS minimum partition size to 2 MiB.
Comment 8 Mike Fleetwood 2013-05-30 20:37:50 UTC
Hi Curtis,

Curiously creating a 2 MiB NTFS partition and resizing it down to 1 MiB
succeeds.

Also the Resize/Move dialog sets the new size to the minimum size
(reasonable) but if that is larger than the current size it doesn't
enable the Resize/Move button.  Can't decide whether to raise a separate
bug or just sweep it under the carpet as it's a very unlikely case for
GParted to come across any file system smaller than it thinks is the
minimum size for it.

Anyway I've tested your fix and it's works fine.

Thanks,
Mike


Patch fixing this bug report has been committed to GParted GIT
repository and can be found here:

Set NTFS minimum partition size to 2 MiB (#697848)
https://git.gnome.org/browse/gparted/commit/?id=8ed7155e6d447da8c2f8af95c81bf2e116750ece
Comment 9 Curtis Gedak 2013-05-30 21:40:51 UTC
Hi Mike,

> Curiously creating a 2 MiB NTFS partition and resizing it down to 1 MiB
> succeeds.

Confirmed.  This is curious behaviour indeed.

> Also the Resize/Move dialog sets the new size to the minimum size
> (reasonable) but if that is larger than the current size it doesn't
> enable the Resize/Move button.  Can't decide whether to raise a separate
> bug or just sweep it under the carpet as it's a very unlikely case for
> GParted to come across any file system smaller than it thinks is the
> minimum size for it.

I am having difficulty understanding this.  Would you be able to describe this another way?

I created a 2 MiB ntfs partition, shrunk it to 1 MiB (using code prior to
this patch), and then selected the Resize/Move dialog.  The partition is
shown as 1 MiB.  When I increase the size to 2 MiB using the spin-button
arrow, the Resize/Move button is enabled.


Or are you talking about the following bug report?

Bug #583888 - Resize/move dialog does not unfade 'Resize' button when
              size entered using keyboard
Comment 10 Mike Fleetwood 2013-05-30 21:59:51 UTC
(In reply to comment #9)
> I am having difficulty understanding this.  Would you be able to describe this
> another way?

1) Create your 1 MiB ntfs with the old code as described above in
   comment #8.
2) Using the new code open Resize/Move dialog.
   Minimum size has been automatically increased from 1 MiB to 2 MiB but
   the Resize/Move dialog button is disabled.
Comment 11 Curtis Gedak 2013-05-31 01:33:12 UTC
Thank you Mike for the steps in comment #10 to reproduce the situation.  Now I see what you were talking about.

With so many more important bugs and enhancements to implement, and with the small likelihood of this situation occurring, I too lean towards ignoring this anomaly for now.
Comment 12 Phillip Susi 2013-06-18 15:45:49 UTC
It seems that this is a bug in mkntfs.  It claims the minimum size is 1024k and the device is only 1023k, when it is in fact, 1024k.  I have reported this to the ntfs-3g dev list, so I think this can now be closed as NOTGNOME.
Comment 13 Curtis Gedak 2013-09-18 16:46:03 UTC
The patch to address this report has been included in GParted 0.16.2 released on September 18, 2013.