How-To Session: Your Friendly Neighborhood Hard Disk Partition Editor: Gparted


Ever wanted to shrink that windows partition and give MORE to your Linux partition. How about add another partition to sit as a middle man between you and linux? Want to resize? Re-format? All of these questions and more will be answered in today’s tutorial: “Using Gparted.”

Installing the Program

  1. The BEST way to use Gparted however, is to download the LIVE CD from Gparted’s Website, and boot from the LIVE CD. This is a much safer way to partition.
  2. If you insist on using in IN LINUX, the package name should be simply named “gparted” in your respective GUI or terminal package manager
  3. Ubuntu: this can be found in Add/Remove Programs or Synaptics package manager, if not installed
  4. Arch Linux: Issue the command “pacman -S gparted” as a root user
  5. Redhat/Centos: In Redhat based systems, this can be installed via the GUI applications installer, Yum with the command “yum install gparted”, or also in terminal by downloading the .rpm package and typing “rpm -ivh gparted.rpm”

At First Glance:

gparted_1

  • At first gparted looks like its complex, its not really. Its a fairly simply program, but there are rules.
  • WARNING: You definitely should backup important and sensitive information before making any changes, even the simplest, as you can never tell if something will go wrong
  • At the top is your actions bar, below that are the “blocks” representing your individual partitions for that hard drive. You can cycle through your available hard drives by pulling down the tab in the top right hand corner, which should already read something like “/dev/sda”
  • Below that is the important information:
  • Partition: the physical location of the drive or parition such as “/dev/sda1”
  • Files System: This is the type of file system use on that drive, most typically this will be NTFS for windows, EXT3 or EXT4 for linux, and Linux-Swap for your “virtual ram” swap file used by linux if you have one. You may see the term extended or primary, meaning the first four partitions of a SINGLE hard drive can be primary (forcing more is a bad idea) and every additional partition will be an extended partition
  • Mount Point: The physical location on your drive were that parition is mounted
  • Label: The text label or identifier you gave the drive such as “super_cool_drive_1”
  • Size: Size of drive in Megabytes (MB) or Gigabytes (GiB)
  • Used: Amount of hard disk space used
  • Unused: Amount of hard disk space unused
  • Flags:This is an important part, right click a drive and selecting “manage boot flags” will let you change the “type” of the drive to either boot, hidden, lba, lvm, palo, prep or raid. Be really only concerned about if its marked as “boot” or not for now


Using Gparted to Re size:

  1. Right click a drive or partition and choose “Re size or Move.” If it is not selected, then choose “umount” first as you cannot perform any action on a drive unless it is unmounted first.
  2. gparted2

  3. The next window that comes up will show a screen like above with hard drive information showing a graphical bar you can re-size with, free space before the move, new size, ,and free space after the move. If you want to shrink / grow the partition or drive by 20 GiB, take 20 * 1024 to get the amount in MB, the format used here.
  4. Hit the “Resize/Move” button and then apply if thats all you wish to do

Using Gparted to format a drive:

  1. The first thing you should do is delete the partition, by right-clicking the partition or drive in quest and selecting “delete”
  2. Next, right click the partition again, selecting “Format to” and select the file system you want. Next I will explain common choices for this selection
  3. Ext3 /Ext4 : Select this if you plan on installing linux on this drive or parition, Ext4 is the continued next generation of the Ext journaled file system.
  4. NTFS: If this is a windows based drive. Keep in mind, with NTFS-3G, Linux can read/write to windows NTFS, but Apple MAC OSX will now be able to write, only read this type
  5. FAT32: Use this if you wish for MAC OSX, Windows, AND Linux to read the drive. The limitation here is no single file can be larger than 4 GiB in size.
  6. Hit Apply at the top of the program to apply all changes if you wish to do that now

Edit / Add a Label to the drive or Parition

  • All you have to do here is first make sure the drive is unmounted as before, and right click the drive entry or visual “block” that represents the hard drive or partition and select “label.” Enter what you wish to call your drive.
  • Hit ok, and Apply

Using Gparted to copy a drive or parition

  1. While the traditional way is to use the “dd” or “dcfldd” command in the Terminal, a drive or partition can also be copied via the Gparted GUI interface.
  2. Unmount the drive or parition in question if necessary, and then right click the drive, selecting “copy”
  3. Right click on the partition you want to copy to ( to a different partition with enough FREE space, that is partitioned and prepared )and right click “paste” on the area you want’.


Finishing it up:

  • To finish up , select “Apply” on the action bar at the top and sit back, things may take a while. Do not do ANYTHING while this is happening, just kick back and let it do its thing.

Debugging and Problem Solving:

  1. Check the output of the dialog box when operations begin, expanding each arrow until you see where the error occurred. Take a scree shot of this with “ALT+Print Scrn” on your keyboard to capture the picture of just that box
  2. Post this picture and any relevant actions on websites such as Linux Questions of the forum that pertains to your particular distribution of Linux.
  3. Submit a Bug Report to Gparted with all available information
  4. Visit the Gparted Forums and explain your issue with the screenshot you took
  5. If all else fails, try Contacting Gparted for assistance.

I hope you enjoyed this tutorial, pass it on! If you found this useful please softlink this page to your website or promote this guide. Thank you for reading.

Cheers!

_Nano

Advertisements

About professorkaos64

www.libregeek.org

Posted on 20090407, in How-To, Software and tagged , , , . Bookmark the permalink. 1 Comment.

  1. WordPress seems to think this is relevant to my most recent entry, and it probably is. With the new 4096-byte block disks (that claim to be 512 bytes, for windows compatibility), you want to be sure that partitions are aligned to a multiple of 8 “blocks” (the 512-byte ones). I don’t think Gparted does this, and it would be great if it did.

    That said, apparently if your partitions are misaligned, ext4 is supposed to tolerate it better than most.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s