GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the file systems on them.
This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks, and "disk imaging" -- replicating installations over many computers.
This documentation assumes knowledge of partitions and file systems. If you want to learn more about these, the Partition mini-HOWTO is recommended reading. It is probably included with your distribution, or it is available at
http://www.linuxdoc.org/HOWTO/mini/Partition/index.html
GNU Parted was designed to minimize the chance of data loss. For example, it was designed to avoid data loss during interruptions (like power failure) and performs many safety checks. However there could be bugs in Parted, so you should back up your important files.
The GNU Parted homepage is www.gnu.org/software/parted. It can be downloaded from ftp.gnu.org/gnu/parted.
The Parted mailing list is parted@gnu.org. To subscribe, write to bug-parted-request@gnu.org with `subscribe' in the subject. Subscription information and archives are available at:
http://mail.gnu.org/mailman/listinfo/bug-parted
Please send bug reports to bug-parted@gnu.org. When sending bug reports, please include the version of GNU Parted. If the bug is related to partition tables, then please include the output from these commands:
# fdisk /dev/hda -l # fdisk /dev/hda Command (m for help): p Command (m for help): x Extended command (m for help): p
Feel free to ask for help on this list -- just check that your question isn't answered here first. If you don't understand the documentation, please tell us, so we can explain it better. General philosophy is: if you need to ask for help, then something needs to be fixed so you (and others) don't need to ask for help.
Also, we'd love to hear your ideas :-)
GNU Parted depends on the following packages to build correctly:
Hopefully, this list will grow a lot. If you do not have one of these platforms (Linux at the moment!), then you can use a boot disk. See section 1.6 Using a Parted Boot Disk.
GNU libc 2.1 or higher is required. You can probably use older versions by using the `--disable-nls' option. See section 1.5 Building GNU Parted. (Note: I think we have now dropped this requirement. TODO: check if libc 2.0 works!)
GNU Parted is free software, covered by the GNU General Public License Version 2. This should have been included with the Parted distribution, in the COPYING file. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Libparted is considered part of GNU Parted. It is covered by the GNU General Public License. It is NOT released under the GNU Lesser General Public License (LGPL).
If you want to compile GNU Parted, this is generally done with:
$ ./configure $ make
However, there are a few options for @command{configure}:
--without-readline
--disable-debug
--disable-dynamic-loading
--disable-fs
--disable-nls
--disable-shared
--disable-Werror
--enable-all-static
--enable-discover-only
--enable-mtrace
--enable-read-only
If you want run Parted on a machine without GNU/Linux installed, or you want to resize a root or boot partition, you will need to use a boot disk.
A boot disk image is available from:
ftp://ftp.gnu.org/gnu/parted/bootdisk/partboot.img
To actually create the boot disk, the disk image must be written to a floppy disk. In GNU/Linux, this can be done with
# dd if=partboot.img of=/dev/fd0 bs=1440k
Or use RAWRITE.EXE under DOS.
Unfortunately, the boot disk doesn't support a very wide range of hardware. If your hard disk isn't supported, then you will need to make your own boot disk. You can copy the parted binary from the parted bootdisk onto another disk, or try other boot disks, or make your own. You may find mkparted useful, which is a shell script to make custom parted boot disks. It is available at:
ftp://ftp.tux.org/pub/people/kent-robotti/mkparted
To copy parted from the boot disk onto another disk:
$ parted /dev/fd0 mklabel loop mkpartfs primary ext2 0 1.4
$ mount -t ext2 /dev/fd0 /mnt/floppy
$ cp /sbin/parted /mnt/floppy
$ cp /lib/* /mnt/floppy
$ umount /mnt/floppy
# cd /mnt/floppy # LD_LIBRARY_PATH=. ./parted
Go to the first, previous, next, last section, table of contents.