Difference between revisions of "GParted"

From ArchWiki
Jump to: navigation, search
m
m (Enabling GParted online resize and dmraid)
 
(22 intermediate revisions by 12 users not shown)
Line 2: Line 2:
 
[[Category:System recovery]]
 
[[Category:System recovery]]
 
[[ja:GParted]]
 
[[ja:GParted]]
== Introduction ==
+
[[zh-CN:GParted]]
=== GParted Overview ===
+
[[zh-TW:GParted]]
[http://gparted.sourceforge.net/index.php GParted] is a GTK+ frontend to GNU Parted and the official GNOME Partition Editor application.  Use it to make/delete/resize/check partitions of nearly any file format.  You can also manage drive labels and flags as well as copy/paste entire partitions.  GParted is available in the extra repo and also as a [http://gparted.sourceforge.net/download.php Live CD] if you'd prefer.  One reason to actually download the Live CD would be that you need to make modifications to your root filesystem's partition which you cannot do without unmounting it.
+
{{Related articles start}}
 +
{{Related|GNU Parted}}
 +
{{Related|fdisk}}
 +
{{Related|Partitioning}}
 +
{{Related articles end}}
  
{{Warning|Since GParted can read/write to your drive partitions misuse can result in data loss. It is recommended that you back-up affected partitions prior to using GParted.}}
+
[http://gparted.sourceforge.net/index.php GParted] is a GTK+ frontend to [[GNU Parted]] and the official GNOME Partition Editor application. Use it to make/delete/resize/check partitions of nearly [http://gparted.sourceforge.net/features.php any file format]. You can also manage drive labels and flags as well as copy/paste entire partitions. GParted is available in the extra repo and also as a [http://gparted.sourceforge.net/download.php Live CD] if you'd prefer. One reason to actually download the Live CD would be that you need to make modifications to your root filesystem's partition which you cannot do without unmounting it.
=== Supported Filesystems ===
+
 
For a complete list of filesystems GParted can handle, see the [http://gparted.sourceforge.net/features.php features table] over at GParted's homepage.
+
{{Warning|Since GParted can read/write to your drive partitions misuse can result in data loss. It is recommended that you back-up affected partitions prior to using GParted.}}
  
 
== Installation on Arch ==
 
== Installation on Arch ==
GParted is in the extra repo as mentioned above, to install it simply use [[Pacman]] as you would with any other Arch package:
 
# pacman -S gparted
 
  
== Optional Dependencies ==
+
[[Install]] {{Pkg|gparted}} from the [[official repositories]].
=== Filesystems ===
+
 
The base GParted package doesn't come with support for all filesystems. Here is a brief list of additional packages you can install to add support for different filesystems:
+
=== Optional dependencies ===
 +
 
 +
==== Filesystems ====
 +
 
 +
The base GParted package doesn't come with support for all filesystems. Here is a brief list of additional packages you can install to add support for different filesystems:
  
{| border="1"
+
{| class="wikitable"
| '''Arch Package''' || '''Filesystem'''
+
| '''Package''' || '''Filesystem'''
 
|-
 
|-
| btrfs-progs || btrfs
+
| {{Pkg|btrfs-progs}} || [[Btrfs]]
 
|-
 
|-
| dosfstools || fat16/32
+
| {{Pkg|dosfstools}} || fat16/32
 
|-
 
|-
| e2fsprogs || ext2/ext3/ext4 (v1.41+)
+
| {{Pkg|e2fsprogs}} || ext2/[[ext3]]/[[ext4]] (v1.41+)
|-
+
| jfsutils || jfs
+
 
|-
 
|-
| ntfsprogs || ntfs
+
| {{Pkg|exfat-utils}} || exfat
 
|-
 
|-
| reiser4progs || reiserfs
+
| {{Pkg|f2fs-tools}} || [[F2FS]]
 
|-
 
|-
| reiserfsprogs || reiserfs
+
| {{Pkg|jfsutils}} || [[JFS]]
 
|-
 
|-
| xfsprogs || xfs
+
| {{Pkg|ntfs-3g}} || [[NTFS]]
 +
|-
 +
| {{AUR|reiser4progs}} || [[Reiser4]]
 +
|-
 +
| {{Pkg|reiserfsprogs}} || Reiser3
 +
|-
 +
| {{Pkg|xfsprogs}} || [[XFS]]
 
|}
 
|}
  
=== Additional functionality ===
+
==== Additional functionality ====
{| border="1"
+
 
| '''Arch Package''' || '''Functionality'''
+
{| class="wikitable"
 +
| '''Package''' || '''Functionality'''
 
|-
 
|-
| mtools || Utilities for MSDOS disks. Needed if you want to change the label of FAT-volumes.
+
| {{Pkg|mtools}} || Utilities for MS-DOS disks. Needed if you want to change the label of FAT volumes.
 
|}
 
|}
  
 
Note that when you install GParted via pacman, it will list these for you also.
 
Note that when you install GParted via pacman, it will list these for you also.
  
== GParted Support ==
+
== GParted support ==
Have a look at the [http://gparted-forum.surf4.info/ Official GParted Forums] prior to executing a command if you are unsure about what you're doing.
+
 
== Tips ==
+
Have a look at the [http://gparted-forum.surf4.info/ official GParted forums] prior to executing a command if you are unsure about what you're doing.
=== Adding GParted-live to your Grub menu ===
+
 
See the [[Gparted-Live]] wiki article for instructions on adding GParted-live to your Grub menu so you can boot into the same live environment as the GParted-live CD directly from Grub and without the CD!
+
== Tips and tricks ==
 +
 
 +
=== Dual booting with Windows XP ===
  
=== Dual Booting with Windows XP ===
 
 
If you have a Windows XP partition that you would like to move from drive-to-drive that also happens to be your boot partition, you can do so easily with GParted and keep Windows happy simply by deleting the following registry key PRIOR to the partition move:
 
If you have a Windows XP partition that you would like to move from drive-to-drive that also happens to be your boot partition, you can do so easily with GParted and keep Windows happy simply by deleting the following registry key PRIOR to the partition move:
  
 
  HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
 
  HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
  
Reference to this little gem: [http://gparted-forum.surf4.info/viewtopic.php?pid=8347#p8347 here].
+
Reference to this little gem [http://gparted-forum.surf4.info/viewtopic.php?pid=8347#p8347 here].
  
=== Fixing Messed-up Partition Order ===
+
=== Fixing messed-up partition order ===
Your partition order can get messed up if you have logical volumes and you erase one of them.  Consider the following example:
+
<pre>/dev/sda1 (Primary partition)
+
/dev/sda2 (Primary partition)
+
/dev/sda3 (Primary partition)
+
/dev/sda4 (EXTENDED partition)
+
/dev/sda5 (Logical partition)
+
/dev/sda6 (Logical partition)
+
/dev/sda7 (Logical partition)</pre>
+
  
So 1-3 are primary partitions. 5-6 are logical partitions within the extended partition. Let's say you want to nuke /dev/sda5 and copy/paste /dev/sda2 into the resulting freespace. Now your drive looks like this:
+
Your partition order can get messed up if you have logical volumes and you erase one of them. Consider the following example:
 +
/dev/sda1 (Primary partition)
 +
  /dev/sda2 (Primary partition)
 +
/dev/sda3 (Primary partition)
 +
/dev/sda4 (EXTENDED partition)
 +
  /dev/sda5 (Logical partition)
 +
/dev/sda6 (Logical partition)
 +
/dev/sda7 (Logical partition)
  
<pre>/dev/sda1 (Primary partition)
+
So 1-3 are primary partitions. 5-6 are logical partitions within the extended partition. Let's say you want to nuke {{ic|/dev/sda5}} and copy/paste {{ic|/dev/sda2}} into the resulting freespace. Now your drive looks like this:
/dev/sda2 (Primary partition)
+
/dev/sda1 (Primary partition)
/dev/sda3 (Primary partition)
+
/dev/sda2 (Primary partition)
/dev/sda4 (EXTENDED partition)
+
/dev/sda3 (Primary partition)
/dev/sda7 (Logical partition)
+
/dev/sda4 (EXTENDED partition)
/dev/sda5 (Logical partition)
+
/dev/sda7 (Logical partition)
/dev/sda6 (Logical partition)</pre>
+
/dev/sda5 (Logical partition)
 +
/dev/sda6 (Logical partition)
  
Notice that the order is messed up after your delete, copy/paste operation. This can cause all sorts of problems from not being able to mount an expected partition, to grub error 17/no bootable system. The solution to this little problem is simple:
+
Notice that the order is messed up after your delete, copy/paste operation. This can cause all sorts of problems from not being able to mount an expected partition, to GRUB error 17/no bootable system. The solution to this little problem is simple:
*Boot with your Arch Live CD or GParted Live CD (or any other live Linux CD)
+
# Boot with your Arch Live CD or GParted Live CD (or any other live Linux CD)
*Run fdisk on the drive, enter expert mode, fix the partition order, and write the changes to disk
+
# Run fdisk on the drive, enter expert mode, fix the partition order, and write the changes to disk
  
Example using /dev/sda
+
Example using {{ic|/dev/sda}}:
 
  # fdisk /dev/sda
 
  # fdisk /dev/sda
#Once you're in fdisk, choose option '''x''' (extra functionality (experts only)) and enter.
+
# Once you are in fdisk, choose option {{ic|x}} (extra functionality (experts only)) and enter
#Then select '''f''' (fix partition order) and enter.
+
# Then select {{ic|f}} (fix partition order) and enter
#Then select option '''w''' (write table to disk and exit), and enter.
+
# Then select option {{ic|w}} (write table to disk and exit), and enter
  
{{Note|You must run '''partprobe''' (as root) or reboot the system in order for the kernel to read the new partition table!}}
+
{{Note|You must run '''partprobe''' as root or reboot the system in order for the kernel to read the new partition table!}}
  
 
=== Starting GParted from a menu ===
 
=== Starting GParted from a menu ===
  
If you are having issues loading GParted from a menu, for instance the xfce applications menu. You will have to install the {{pkg|polkit}} package and autostart it with your session.
+
If you are having issues loading GParted from a menu, for instance the xfce applications menu, you will have to install the {{Pkg|polkit}} package and autostart it with your session.
 +
 
 +
=== Enabling GParted online resize and dmraid ===
 +
 
 +
You need rebuild package using following configuration:
 +
 
 +
./configure --enable-online-resize --enable-libparted-dmraid

Latest revision as of 15:03, 2 March 2016

Related articles

GParted is a GTK+ frontend to GNU Parted and the official GNOME Partition Editor application. Use it to make/delete/resize/check partitions of nearly any file format. You can also manage drive labels and flags as well as copy/paste entire partitions. GParted is available in the extra repo and also as a Live CD if you'd prefer. One reason to actually download the Live CD would be that you need to make modifications to your root filesystem's partition which you cannot do without unmounting it.

Warning: Since GParted can read/write to your drive partitions misuse can result in data loss. It is recommended that you back-up affected partitions prior to using GParted.

Installation on Arch

Install gparted from the official repositories.

Optional dependencies

Filesystems

The base GParted package doesn't come with support for all filesystems. Here is a brief list of additional packages you can install to add support for different filesystems:

Package Filesystem
btrfs-progs Btrfs
dosfstools fat16/32
e2fsprogs ext2/ext3/ext4 (v1.41+)
exfat-utils exfat
f2fs-tools F2FS
jfsutils JFS
ntfs-3g NTFS
reiser4progsAUR Reiser4
reiserfsprogs Reiser3
xfsprogs XFS

Additional functionality

Package Functionality
mtools Utilities for MS-DOS disks. Needed if you want to change the label of FAT volumes.

Note that when you install GParted via pacman, it will list these for you also.

GParted support

Have a look at the official GParted forums prior to executing a command if you are unsure about what you're doing.

Tips and tricks

Dual booting with Windows XP

If you have a Windows XP partition that you would like to move from drive-to-drive that also happens to be your boot partition, you can do so easily with GParted and keep Windows happy simply by deleting the following registry key PRIOR to the partition move:

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Reference to this little gem here.

Fixing messed-up partition order

Your partition order can get messed up if you have logical volumes and you erase one of them. Consider the following example:

/dev/sda1 (Primary partition)
/dev/sda2 (Primary partition)
/dev/sda3 (Primary partition)
/dev/sda4 (EXTENDED partition)
/dev/sda5 (Logical partition)
/dev/sda6 (Logical partition)
/dev/sda7 (Logical partition)

So 1-3 are primary partitions. 5-6 are logical partitions within the extended partition. Let's say you want to nuke /dev/sda5 and copy/paste /dev/sda2 into the resulting freespace. Now your drive looks like this:

/dev/sda1 (Primary partition)
/dev/sda2 (Primary partition)
/dev/sda3 (Primary partition)
/dev/sda4 (EXTENDED partition)
/dev/sda7 (Logical partition)
/dev/sda5 (Logical partition)
/dev/sda6 (Logical partition)

Notice that the order is messed up after your delete, copy/paste operation. This can cause all sorts of problems from not being able to mount an expected partition, to GRUB error 17/no bootable system. The solution to this little problem is simple:

  1. Boot with your Arch Live CD or GParted Live CD (or any other live Linux CD)
  2. Run fdisk on the drive, enter expert mode, fix the partition order, and write the changes to disk

Example using /dev/sda:

# fdisk /dev/sda
  1. Once you are in fdisk, choose option x (extra functionality (experts only)) and enter
  2. Then select f (fix partition order) and enter
  3. Then select option w (write table to disk and exit), and enter
Note: You must run partprobe as root or reboot the system in order for the kernel to read the new partition table!

Starting GParted from a menu

If you are having issues loading GParted from a menu, for instance the xfce applications menu, you will have to install the polkit package and autostart it with your session.

Enabling GParted online resize and dmraid

You need rebuild package using following configuration:

./configure --enable-online-resize --enable-libparted-dmraid