How to use Gparted
This article is from sourceforge.net
GParted Manual
This manual describes version 0.4.6 of GParted
Copyright © 2009 Curtis Gedak
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or at http://www.fsf.org/licensing/licenses/fdl.htmlll or in the file COPYING-DOCS distributed with this manual.
Feedback
To report a bug or make a suggestion regarding the gparted application or this manual, follow the directions at http://gparted.sourceforge.net/bugs.php.
Revision History | |
---|---|
Revision GParted Manual V1.1 | July 2009 |
Curtis Gedak GParted Project |
Abstract
GParted is the Gnome Partition Editor for creating, reorganizing, and deleting disk partitions. GParted enables you to change the partition organization while preserving the partition contents.
Table of Contents
The gparted application is the GNOME partition editor for creating, reorganizing, and deleting disk partitions.
A disk device can be subdivided into one or more partitions. The gparted application enables you to change the partition organization on a disk device while preserving the contents of the partition.
With gparted you can accomplish the following tasks:
-
Create a partition table on a disk device.
-
Enable and disable partition flags such as boot and hidden.
-
Perform actions with partitions such as create, delete, resize, move, check, label, copy, and paste.
Caution
Editing partitions has the potential to cause LOSS of DATA.
The gparted application is designed to enable you to edit partitions while reducing the risk of data loss. The application is carefully tested and is used by the GParted project team. However, loss of data might occur due to software bugs, hardware problems, or power failure.
You can help to reduce the risk of data loss by not mounting or unmounting partitions outside of the gparted application while gparted is running.
You are advised to BACKUP your DATA before using the gparted application.
You can start gparted in the following ways:
- menu
-
Choose
→ . - Command line
-
Execute the following command: gparted
On startup, gparted will scan your computer for disk devices.
When you start gparted, the following window is displayed:
The gparted window contains the following elements:
- Menubar
-
The menus on the menubar contain all of the commands you need to work with disk devices and partitions in gparted.
- Toolbar
-
The toolbar contains a subset of the commands that you can access from the menubar.
- Graphic Display Area
-
The graphic display area contains the visual representation of the partitions on the selected disk device.
- Text Display Area
-
The text display area contains the text list of the partitions on the selected disk device.
- Statusbar
-
The statusbar displays information about current gparted activity or the number of operations pending.
- Device Information Pane
-
The device information pane displays details about the selected disk device.
By default the device information pane is not shown. To show the device information pane, choose
→ . - Pending Operations Pane
-
The pending operations pane displays the current list of partition operations in the queue.
By default the pending operations pane is not shown when there are 0 pending operations. To show the pending operations pane, choose
→ .
When you left-click in either display area, you select a partition to use for partition editing actions.
When you Right-click in either display area, the application displays a popup menu. The popup menu contains the most common partition editing actions.
Like other GNOME applications, actions in gparted can be performed in several ways: with the menu, with the toolbar, or with shortcut keys.
To view the actions supported on file systems, choose: File System Support dialog.
→ . The application displays the-
To view details about the chart, click
. The application displays more information about the chart. -
If you have installed software while gparted is running, click to refresh the chart. The application refreshes the display of the chart.
To close the File System Support dialog, click .
To select a disk device, choose: gparted window.
→ and select a device from the list. The application displays the device partition layout in theTo view information about a disk device:
-
Select a disk device. See the section called “Selecting a Device”.
-
Select: gparted window and displays information about the device.
→ . The application opens a side pane in the
To close the Device Information side pane, deselect: → .
To refresh all disk devices, choose: gparted window.
→ . The application rescans all the disk devices and refreshes the device partition layout in theTo create a new partition table on a disk device:
-
Select a disk device. See the section called “Selecting a Device”.
-
Choose: Create partition table on
→ . The application displays a/path-to-device
dialog. -
If you want a partition table other than msdos, click
and select a partition table type from the list. -
Click gparted window.
to create the new partition table. The application writes the new partition table to the disk device. The application refreshes the device partition layout in the
Caution
WARNING: This will ERASE ALL DATA on the ENTIRE DISK DEVICE.
If you accidentally overwrite your partition table, see the section called “Recovering Partition Tables”.
These actions will not alter partitions on your disk device.
To select a partition, use one of the following:
-
Click on a partition in the graphic display area.
-
Click on a partition in the text display area.
The application highlights the partition in both the graphic display area and the text display area in the gparted window.
Note
Partition operations such as delete, resize, move, copy, format, check, and label require the partition to be unmounted. See the section called “Unmounting a Partition”.
To select unallocated space, use one of the following:
-
Click on unallocated in the graphic display area.
-
Click on unallocated in the text display area.
The application highlights the unallocated space in both the graphic display area and the text display area in the gparted window.
Tip
If you do not have any disk devices with unallocated space, you might try the following:
-
Add a new disk device to your computer.
-
Shrink a partition that contains unused space. See the section called “Resizing a Partition”.
To view information about a partition:
-
Select a partition. See the section called “Selecting a Partition”.
-
Choose: Information about
→ . The application opens an/path-to-partition
dialog.
To close the Information
about
/path-to-partition
dialog, click
.
To mount a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: gparted window.
→ and select a mount point from the list. The application mounts the partition on the mount point and refreshes the device partition layout in the
Note
If gparted does not know where the partition should be mounted.
→ is not visible, thenTo unmount a partition:
-
Select a mounted partition. See the section called “Selecting a Partition”.
-
Choose: gparted window.
→ . The application unmounts the partition from the mount point and refreshes the device partition layout in the
Tip
If
→ does not succeed, then the partition is probably in use.To have all partitions unmounted and available for partition editing actions, boot from a Live CD and use gparted. See the section called “Acquiring GParted on Live CD”
These actions will alter partitions on your disk device. These actions will not modify the start or end boundaries of your existing partitions.
To create a new partition:
-
Select an unallocated space on the disk device. See the section called “Selecting Unallocated Space”.
-
Choose: Create new Partition dialog.
→ . The application displays the -
Specify the size and the location for the partition. See the section called “Specifying Partition Size and Location”.
-
Specify the alignment for the partition. See the section called “Specifying Partition Alignment”.
-
Specify the type of partition. See the section called “Specifying Partition Type”.
-
Specify the type of file system for the partition. See the section called “Specifying Partition File System”.
-
Specify the label for the partition. See the section called “Specifying Partition Label”.
-
Click Pending Operations pane in the gparted window.
to add the create partition operation to the operation queue. The application displays the create partition operation in the
To delete a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Pending Operations pane.
→ . The application displays the delete partition operation in the
Caution
If you delete a logical partition, then all existing logical partitions after the deleted logical partition will experience changes in device names.
For example, an extended partition contains four logical partitions A, B, C, and D. These logical partitions are accessed by the operating system as follows:
-
Partition A as /dev/sda5.
-
Partition B as /dev/sda6.
-
Partition C as /dev/sda7.
-
Partition D as /dev/sda8.
If partition B is deleted, then the remaining logical partitions will be accessed by the operating system as follows:
-
Partition A as /dev/sda5.
-
Partition C as /dev/sda6. Note the change in device name.
-
Partition D as /dev/sda7. Note the change in device name.
Changes in a device name can cause problems if a partition is mounted using a device name. You can avoid the problem by using the label or the Universally Unique Identifier (UUID) of the partition when mounting the partition.
Changes in a device name might adversely affect the following files:
-
/etc/fstab - Contains a list of file systems to mount.
-
/boot/grub/menu.lst - Contains operating system boot instructions for the grub boot loader.
To format a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Operations Pending pane.
→ , and select a type of file system from the list. The application displays the format partition operation in the
To set a label or a volume name for a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Set partition label on
→ . The application opens a/path-to-partition
dialog. -
Type a label name in the Label text box.
-
Click Operations Pending pane.
. The application displays the set partition label operation in the
Specifying partition details is useful when performing actions such as create, resize, and move.
To specify the size and the location of the partition, use one or a combination of the following:
-
Click-and-hold the arrow at either end of the graphic area. Drag the arrow left or right within the display range.
-
Click-and-hold the middle of the partition in the graphic area. Drag the partition left or right within the display range.
-
Click the spin button arrows, or type numeric values to adjust the following fields:
-
Free Space Preceding
-
New Size
-
Free Space Following
-
The application refreshes both the graphic area and the numbers beside the three field labels.
To specify the alignment of the partition, use the Round to cylinders check box.
-
To enable, select the Round to cylinders check box.
-
To disable, deselect the Round to cylinders check box.
Note
When enabled, Round to cylinders aligns partition boundaries on the cylinder boundaries for the disk device. Enabled is the default setting.
Tip
If you want to maintain compatibility with old operating systems, enable Round to cylinders.
If you do not want the start of an existing partition to move, then disable Round to cylinders and do not change the free space preceding value.
To specify the partition type, click the Create as arrow button, and select from the list.
Note
The msdos partition table limits partitions as follows:
-
Maximum of 4 primary partitions.
-
Maximum of 3 primary partitions, and 1 extended partition.
The extended partition can contain multiple logical partitions. Some GNU/Linux distributions support accessing at most 15 partitions on a disk device.
-
Maximum size of a partition is 2 Terabytes using a sector size of 512 bytes. The partition must also start within the first 2 Terabytes of the disk device.
Tip
Primary partitions provide better data recoverability because the partition boundaries are stored at known locations on the disk device.
To specify the type of file system for the partition, click the File System arrow button, and select from the list.
Note
Examples of uses for some file systems are as follows:
-
Ext2, and ext3 file systems can be used for installing GNU/Linux, and for data.
-
Linux-swap can be used with GNU/Linux to increase the virtual memory of your computer.
-
Fat16 and fat32 file systems can be used to share data between free and commercial operating systems.
-
Unformatted can be used if you want to create a partition with no file system.
These actions will alter partitions on your disk device. These actions might modify the start or end boundaries of your existing partitions. These actions might cause operating systems to fail to boot.
Resizing and moving a partition can be performed by a single gparted operation.
To resize a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Resize/Move
→ . The application displays the/path-to-partition
dialog. -
Adjust the size of the partition. See the section called “Specifying Partition Size and Location”.
-
Specify the alignment of the partition. See the section called “Specifying Partition Alignment”.
-
Click Pending Operations pane.
. The application displays the resize/move partition operation in the -
Examine the operation that was added to the Pending Operations pane.
If the operation involves a move step, then consider the following:
-
A move step might take a long time to complete.
-
If the partition is an operating system boot partition, then a move step might cause the operating system to fail to boot.
If you are not prepared to wait or to fix potential operating system boot problems, then you might want to undo the operation. See the section called “Undoing Last Operation”.
-
Tip
To grow or move a partition, unallocated space must be available adjacent to the partition.
If you are growing a logical partition, then the unallocated space must be within the extended partition.
If you are growing a primary partition, then the unallocated space must not be within the extended partition.
You can move unallocated space to be inside or outside of the extended partition by resizing the extended partition boundaries.
Tip
To improve the ability to shrink NTFS partitions, you might consider one or more of the following:
-
Defragment the file system.
Booting into Safe Mode with the commercial operating system that uses NTFS can improve the ability to defragment the file system. To enter Safe Mode press F8 while your computer is booting the operating system.
-
Check the partition for errors with the following command:
C:>
chkdsk /f /rRemember to reboot back into the commercial operating system that uses NTFS to allow the chkdsk command to execute.
-
Temporarily disable the paging file. The paging file occupies a fixed location in the partition that the defragmentation process is unable to move.
-
Temporarily move large files to another partition or disk device. Large files are defined as greater than a few hundred Megabytes (MB).
-
Ensure a proper shut down of the commercial operating system that uses NTFS before you resize the NTFS partition
-
Leave at least 10 percent unused space in the NTFS partition. If you shrink the partition too much, then the commercial operating system might have difficulty functioning properly.
-
Reboot twice into the commercial operating system that uses NTFS after shrinking the NTFS partition.
Moving and resizing a partition can be performed by a single gparted operation.
To move a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Resize/Move
→ . The application displays the/path-to-partition
dialog. -
Adjust the location of the partition. See the section called “Specifying Partition Size and Location”.
-
Specify the alignment of the partition. See the section called “Specifying Partition Alignment”.
-
Click Pending Operations pane.
. The application displays the resize/move partition operation in the
Tip
If the partition is an operating system boot partition, then the operating system might not boot after the move operation is applied.
If the operating system fails to boot, see the section called “Fixing Operating System Boot Problems”.
To copy a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose:
→ . The application marks the partition as the source partition.
To Paste a partition:
-
Select an unallocated space on a disk device. See the section called “Selecting Unallocated Space”.
-
Choose: Paste
→ . The application displays the/path-to-partition
dialog. -
If you want you can adjust the size and location of the partition. See the section called “Specifying Partition Size and Location”.
-
If you want you can specify the alignment of partition. See the section called “Specifying Partition Alignment”.
-
Click Pending Operations pane.
. The application displays the copy partition operation in the
Caution
The copy of the partition has the same label and the same Universally Unique Identifier (UUID) as the source partition. This can cause a problem when mount actions use the partition label or the UUID to identify the partition. The problem is that the label and the UUID are not unique.
You are advised to do one of the following:
-
Change the UUID of the partition. If the partition label is not blank, change the label of the partition.
-
Use some other method to ensure that the source partition and the copy of the source partition are not used on the same computer at the same time.
To manage partition flags:
-
Select a partition. See the section called “Selecting a Partition”.
-
Choose: Manage flags on
→ . The application opens a/path-to-partition
dialog.-
To enable a flag, select the check box beside the flag. The application writes the enabled flag to the partition and refreshes the Manage flags on
/path-to-partition
dialog. -
To disable a flag, deselect the check box beside the flag. The application writes the disabled flag to the partition and refreshes the Manage flags on
/path-to-partition
dialog.
-
To close the Manage flags
on /path-to-partition
dialog, click .
Note
A description of flags in an msdos partition table follows:
-
Boot is used by some commercial operating system boot loaders. The boot flag indicates the partition is active or bootable. Only one partition on a disk device can be active.
-
Hidden is used by some commercial operating systems. The hidden flag makes the partition invisible to the operating system.
-
LBA is used by some commercial operating system boot loaders. The LBA flag indicates the partition should be accessed using Logical Block Addressing (LBA), instead of Cylinder-Head-Sector (CHS) addressing.
-
LVM is used to indicate the partition is used by a Logical Volume Manager (LVM).
-
Palo is used by the Precision Architecture - Reduced Instruction Set Computing (PA-RISC) boot loader, palo.
-
Prep is used to indicate the boot partition on Power Performance Computing (PowerPC) hardware.
-
RAID is used to indicate the partition is used in a Redundant Array of Inexpensive Disks (RAID).
Checking a partition will attempt to find and fix problems in the file system. Checking a partition will attempt to grow the file system to fill the partition.
To check a partition:
-
Select an unmounted partition. See the section called “Selecting a Partition”.
-
Choose: Pending Operations pane.
→ . The application displays the check partition operation in the
To undo the last operation in the operation queue, choose: Pending Operations pane. If there are no operations remaining in the queue, the application closes the Pending Operations pane.
→ . The application removes the last operation from the queue displayed in theTo clear all operations in the operation queue, choose: Pending Operations pane.
→ . The application removes all operations from the queue and closes theTo apply all operations:
-
Choose: Apply operations to device dialog.
→ . The application displays anCaution
Editing partitions has the potential to cause LOSS of DATA. You are advised to backup your data before applying your partition editing operations.
-
Click Applying pending operations dialog. The application applies each pending operation in the order you created the operations. The application displays a status update when each operation is completed.
. The application displays an-
To view more information, click
. The application displays more details about operations.To view more information about the steps in each operation, click the arrow button beside each step.
-
To stop the operations while they are executing, click
. The application displays a warning dialog.You are advised to click
because might cause SEVERE file system damage. Cancel the operation only if you agree to the consequences.When the application finishes applying all operations, the application displays the
button and the button.
-
-
If you want to save the details from applying all operations, then click Save Details dialog.
. The application displays a-
If you want to change the default file name, then type a file name in the Name text box.
-
If you want to save the file in a folder different than /root, Click
. The application displays a file system navigator.Use the file system navigator to select a folder.
-
Click
to save the file. The application saves the details file.
Caution
If you use gparted from a Live CD, then the root file system exists in RAM memory. All files saved to the Live CD root file system will be lost when you shut down the computer.
If you saved the gparted details to the Live CD root file system, then you need to copy the file to more permanent storage. Examples of more permanent storage are a hard disk drive or a USB flash memory drive.
-
-
Click Applying pending operations dialog. The application rescans all the disk devices and refreshes the device partition layout in the gparted window.
. The application closes the
A Live CD is a Compact Disc that contains a bootable operating system. A Live CD enables you to boot your computer from the CD.
Using gparted from a Live CD has the following advantages:
-
You can edit all of your partitions because the partitions are not mounted.
-
You can edit partitions on computers that do not have a bootable operating system.
The gparted application is available on many Live CD distributions.
You can download a Live CD image containing gparted from the following web sites:
-
GParted Live CD http://gparted.sourceforge.net/livecd.php
-
System Rescue CD http://www.sysresccd.org
Tip
To avoid wasting a blank CD when burning a CD image file, use the following tips:
-
Ensure the checksum of the downloaded file matches the checksum posted on the download page.
-
Be sure to burn the .iso file as an image to the blank CD. If you burn the .iso file as data to a blank CD then the CD will not boot in your computer.
Your computer might fail to boot an operating system when you perform one of the following actions:
-
Delete a partition.
-
Move a partition.
-
Install another operating system and overwrite the Master Boot Record (MBR).
You are advised to consult documentation for your boot loader to learn how to fix the problem. You might consult the GParted FAQ, or the GParted forum. You might also use Internet search engines to learn how other people have solved similar problems.
The Grand Unified Boot loader (GRUB) might fail to boot an operating system if you do one of the following:
-
Move the partition containing the GRUB stage2 file.
-
Install a new operating system that overwrites the Master Boot Record (MBR).
To fix these problems, you will need to reinstall the GRUB boot record using the following steps:
-
Start the grub application from the command line.
$
grub -
Find where grub stage1 is located by using one of the following:
If the /boot folder is stored in the / partition, use the command:
grub>
find /boot/grub/stage1If the /boot folder is stored in a partition different than the / partition, use the command:
grub>
find /grub/stage1The output from the find command might look like the following:
(hd0,0)
If more than one line is listed in the command output, you will need to decide which device you use for grub.
-
Set the grub root device by specifying the device returned by the find command.
grub>
root(hd0,0)
-
Reinstall grub by specifying the device returned by the find command.
grub>
setup(hd0,0)
-
Exit grub.
grub>
quit -
Reboot your computer.
The grub application is included on each Live CD listed in the section called “Acquiring GParted on Live CD”
If you accidentally overwrite your partition table, there is a chance that you might be able to recover it.
The testdisk application is designed to help recover lost partitions. For more information about testdisk, see http://www.cgsecurity.org/wiki/TestDisk.
The testdisk application is included on each Live CD listed in the section called “Acquiring GParted on Live CD”