[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Sun Jan 6 10:00:48 UTC 2013


 doc/parted.texi |   39 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)

New commits:
commit 21be64fc6ef60a1e9dc7bc352131be58cc59d61d
Author: Jim Meyering <jim at meyering.net>
Date:   Wed Jan 2 12:52:14 2013 +0100

    doc: 1MiB-alignment is not enough for cheap flash drives
    
    * doc/parted.texi: Add an example that aligns to 4GiB, and
    reference Arnd Bergman's LWN article.

diff --git a/doc/parted.texi b/doc/parted.texi
index b8db19d..008c383 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -14,7 +14,7 @@ and manipulating partition tables.
 @ifnottex @c texi2pdf don't understand copying and insertcopying ???
 @c modifications must also be done in the titlepage
 @copying
-Copyright @copyright{} 1999-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1999-2013 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -577,15 +577,44 @@ partition table.
 @item ufs
 @end itemize
 
-Example:
+For example, the following creates a logical partition that will contain
+an ext2 file system.  The partition will start at the beginning of the disk,
+and end 692.1 megabytes into the disk.
 
 @example
 (parted) @kbd{mkpart logical 0.0 692.1}
 @end example
 
-Create a logical partition that will contain an ext2 file system.  The
-partition will start at the beginning of the disk, and end 692.1
-megabytes into the disk.
+Now, we will show how to partition a low-end flash
+device (``low-end'', as of 2011/2012).
+For such devices, you should use 4MiB-aligned partitions at footnote{
+Cheap flash drives will be with us for a long time to
+come, and, for them, 1MiB alignment is not enough.
+Use at least 4MiB-aligned partitions.
+For details, see Arnd Bergman's article,
+ at uref{http://http://lwn.net/Articles/428584/} and its many comments.}.
+This command creates a tiny place-holder partition at the beginning, and
+then uses all remaining space to create the partition you'll actually use:
+
+ at example
+$ @kbd{parted -s /dev/sdX -- mklabel msdos \}
+ at kbd{    mkpart primary fat32 64s 4MiB \}
+ at kbd{    mkpart primary fat32 4MiB -1s}
+ at end example
+
+Note the use of @samp{--}, to prevent the following @samp{-1s} last-sector
+indicator from being interpreted as an invalid command-line option.
+The above creates two empty partitions.  The first is unaligned and tiny,
+with length less than 4MiB.
+The second partition starts precisely at the 4MiB mark
+and extends to the end of the device.
+
+The next step is typically to create a file system in the second partition:
+
+ at example
+$ @kbd{mkfs.vfat /dev/sdX2}
+ at end example
+
 
 @end deffn
 



More information about the Parted-commits mailing list