[gparted] Set NTFS minimum partition size to 2 MiB (#697848)



commit 8ed7155e6d447da8c2f8af95c81bf2e116750ece
Author: Curtis Gedak <gedakc gmail com>
Date:   Thu May 30 12:57:39 2013 -0600

    Set NTFS minimum partition size to 2 MiB (#697848)
    
    The minimum NTFS volume size supported by the ntfs-3g mkntfs command
    is 1 MiB.  Since 1 extra sector is required for the backup NTFS boot
    sector, an NTFS partition must be at least 1 MiB plus 1 sector.
    
    To demonstrate, create a 1 MiB unformatted partition using MiB
    alignment (/dev/sdd1), and then try to format the partition as NTFS.
    
    # mkntfs -Q -v -L "ntfs-test" /dev/sdd1
    Device is too small (1023kiB).  Minimum NTFS volume size is 1MiB.
    
    For GParted this means a minimum NTFS partition size of 2 MiB since
    the smallest unit in the GUI is MiB.
    
    Bug #697848 - Failure to Create 1 MiB NTFS Partition

 src/ntfs.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/ntfs.cc b/src/ntfs.cc
index b82eddd..12b8ac6 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -105,6 +105,11 @@ FS ntfs::get_filesystem_support()
 
        fs .online_read = FS::GPARTED ;
 
+       //Minimum NTFS partition size = (Minimum NTFS volume size) + (backup NTFS boot sector)
+       //                            = (1 MiB) + (1 sector)
+       // For GParted this means 2 MiB because smallest GUI unit is MiB.
+       fs. MIN = 2 * MEBIBYTE;
+
        return fs ;
 }
 


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