Parted only runs under GNU/Linux and GNU/Hurd, at the moment. However, it can be used to resize partitions used by, or shared with other operating systems.
When you want to resize a file system, make sure it is not mounted. Parted can't resize mounted partitions (this may change in the future...).
If you modify the partition table on a disk with a partition mounted on it, you should reboot immediately. Linux won't know about the changes you made the partition table. (This will be fixed, with kernel 2.4, and when we add support for it.)
If you want to resize your root or boot partition, use a boot disk See section 1.6 Using a Parted Boot Disk, or use Andreas Dilger's online ext2 resizer, included in the ext2resize package section 6.2 GNU Parted and the Second Extended Filesystem.
Both GNU/Linux and FreeBSD systems are rather flexible about disk labels, supporting many different disk label types.
Because it is rather unusual for a machine to use hard disks with labels normally used on other architectures, standard distributions of the Linux kernel often only support the popular disk labels for the architecture for which the kernel was compiled. For example, a standard Linux kernel compiled for a PC will likely not have support for Mac or Sun disk labels. To access the file systems on disks with unsupported disk labels, the kernel will have to be recompiled.
FreeBSD has a disk label system that is incompatible with MSDOS partition tables, and a partition slice system that is compatible with MSDOS partition tables. Parted only supports the BSD disk label system. It is unlikely to support the partition slice system, because the semantics are rather strange, and don't work like "normal" partition tables do.
MS Windows and OS/2 only supports the msdos disk label. Therefore, if you create a new disk label, you should use:
(parted) mklabel msdos
MacOS (and OpenFirmware) only understands the mac disk label. Therefore, if you create a new disk label, you should use:
(parted) mklabel mac
Note that for Mac partition maps, you should avoid leaving free space around, because free space regions take up entries in the partition map (and Linux doesn't like having more than 15 entries). For example, if you do:
(parted) print Disk geometry for /dev/sda: 0.000-6149.882 megabytes Disk label type: mac Minor Start End Filesystem Name Flags 1 0.000 0.031 Apple 2 0.031 1.000 boot 3 1.000 1000.000 ext2 root root (parted) mkpartfs primary ext2 1001 2000 (parted) print Disk geometry for /dev/sda: 0.000-6149.882 megabytes Disk label type: mac Minor Start End Filesystem Name Flags 1 0.000 0.031 Apple 2 0.031 1.000 boot 3 1.000 1000.000 ext2 root root 4 1001.000 2000.000 ext2
There is 1 megabyte of free space between partitions 3 and 4. You can avoid this, by creating partitions 0.1M apart (in which case, Parted automatically "pushes" them together). So, in the above example, you should do this instead:
(parted) mkpartfs primary ext2 1000.1 2000 (parted) print Disk geometry for /dev/sda: 0.000-6149.882 megabytes Disk label type: mac Minor Start End Filesystem Name Flags 1 0.000 0.031 Apple 2 0.031 1.000 boot 3 1.000 1000.000 ext2 root root 4 1000.000 2000.000 ext2
Go to the first, previous, next, last section, table of contents.