A quick look at the GParted live CD

Post date: 26-Sep-2010 16:04:37

Need a way to resize NTFS partitions, mirror disk images, or otherwise muck about with disk partitions -- and don't want to use a proprietary package like Partition Magic? If so, the GNOME Partition Editor (GParted) is an excellent open source tool for the task. The GParted team released the GParted live CD version 0.2.4-2 this month, so I decided it was a good time to take GParted for a spin.

GParted handles Ext2, Ext3, FAT16, FAT32, JFS, ReiserFS, Reiser4, NTFS, XFS, and other filesystem formats. At a bare minimum, GParted can detect, read, copy, and create partitions using those file systems -- and, in some cases, can shrink, expand, and move partitions. See the features page on the GParted site for the full rundown on GParted's capabilities.

GParted is actually a front end for GNU Parted, but it's much easier to use GParted's interface than the command line utility.

The GParted live CD bundles GParted, the Fluxbox window manager, and a minimal set of tools to provide a single-purpose Linux distro for working with disk partitions. This is the kind of thing that almost any admin or power user will want to have in his toolbox. You might only use the CD every few months, but it's a good thing to have handy when you need it.

For example, if you're installing Fedora Core onto a system that already has an NTFS partition -- say, to get your boss to try Linux -- you'll need a separate utility to do the partitioning, because Fedora's installer doesn't handle partition resizing. It's possible to run GParted from a normal distribution -- for example, GParted is available in the Ubuntu repositories -- but it's pretty useful to have on a live CD that lets you make changes to all the partitions without worrying about having any of them mounted.

Using the GParted live CD

Using the live CD is as easy as falling off a bike. Just download the ISO image, burn it to a CD, and boot up the target machine using the CD. It's a tiny image -- less than 30MB -- so it'll fit on a business card CD, if you like that sort of thing. GParted will ask a few questions about your language and display preferences -- I just picked the VESA driver, which worked just fine -- and then boots into Fluxbox with GParted running.

It should go without saying, though I'll say it anyway, that you should back up any crucial data before making any modifications to the partitions on your drives. I didn't run into any problems with GParted, but it's always possible that you'll encounter an undiscovered bug that will eat your data -- or you might wipe something out due to user error. Better to be safe than sorry. You'll also want to be careful about re-arranging partitions, since you could create a situation where you'd need an emergency disk to get back into your OS because the partition names had changed.

I decided to start using GParted on a test system that I planned to reformat anyway, to get a hang of the interface. I tried deleting, creating, and moving partitions around, then booted into the installer for the next test distro to make sure that the partitions were OK after being changed by GParted. Everything checked out, so I decided to take it for a spin on a production system -- albeit not my main system.

I used GParted to resize an NTFS filesystem on my laptop, an IBM/Lenovo ThinkPad T43. This is my work laptop, which was originally configured with Windows XP. I had already carved up the partition to install Ubuntu Dapper on the machine, and decided that I wanted to liberate a little more space for Linux on the machine than I had originally.

I booted the T43 with the GParted live CD and selected the NTFS partition. I particularly like the fact that GParted displays the amount of used space within a partition, so there's no confusion about how much space you need to leave when shrinking a partition.

After halving the NTFS partition, I wanted to grant the newly freed space to the Ext3 partition with Ubuntu -- but GParted wouldn't let me do this, because it won't move a partition backward on the disk, only forward. One workaround, if you need to do something like this, would be to use two disks (at least temporarily) to copy the second partition over to the spare disk, destroy the original partition, create it again with the desired size, and then copy the partition back over to the first disk.

Instead of going to all that effort, I decided to create a new Ext3 partition, which I'd assign to /home after booting into Ubuntu. After modifying the NTFS partition, I rebooted the machine. Windows decided it needed to run its Scandisk application, then reboot again. It found no errors, and Windows XP seemed just fine. Next, I rebooted to check Ubuntu and see if the partition had been modified successfully. Ubuntu booted up just fine without any complaints.

While my tests were relatively simple, GParted can do more. For instance, it can copy partitions and even entire disks if you have multiple disks on a system. I'm a bit disappointed that it doesn't offer a way to expand a partition into any free space that occurs before the partition, but that's fairly minor. I'd also like it if GParted offered a way to rename partitions -- for example, if you have sda1, sda2, and sda3 and delete sda2, I don't see any way to rename sda3 to sda2.

Another thing that was somewhat disappointing -- GParted's help system is absent in the live CD. If you click "help" while in GParted you get a "not implemented" message. GParted is exactly the sort of application that you'd want to have online help available for.

Other than those minor complaints, though, I was happy with the GParted live CD. It's free, easy to use, and a quick download. If you spend much time with computers for work or fun, I recommend grabbing the GParted live CD. You never know when it might come in handy.

For GParted Live on USB

First, download GParted live iso or zip file. GParted live iso file is required for Unetbootin method in the following. For other methods, GParted live zip file is required.

After the iso or zip file is downloaded, you can make it bootable on a MS Windows or on a GNU/Linux computer by the following steps (This method only works for the file system in USB flash drive is FAT format. For other file system, you can try to use grub or other bootloader):

  • Extract files and make USB flash drive bootable under MS windows

    • Choice 1 (Manually):

        • *****************************

        • WARNING! WARNING! WARNING!

        • *****************************

        • WARNING!: ***DO NOT RUN*** makeboot.bat from your local hard drive! It should only be run from your USB flash drive. Executing it incorrectly could cause your MS windows not to boot!!!

          1. Create a partition on your flash drive as FAT16 or FAT32 if there is no any FAT16 or FAT32 partition on that. If there is, you can use the existing one.

          2. Extract all the contents of the zip file to FAT16/FAT32 partition on your "flash drive." Keep the directory architecture, for example, file "COPYING" should be in the USB flash drive's top directory (e.g. G:\COPYING).

          3. Browse to your "flash drive" and click the makeboot.bat in the dir utils\win32\. WARNING! Makeboot.bat must be run from your USB flash drive. Executing it incorrectly could cause your MS windows not to boot.

          4. Follow the on-screen instructions. (PS: The above description is modified from: http://www.pendrivelinux.com/2007/01/02/all-in-one-usb-dsl. Thanks to PDLA from http://pendrivelinux.com)

    • Choice 2 (A GUI program on MS windows):

        • Download Unetbootin to help you to create this Live USB flash drive. Just run the program on MS windows, then you can follow the GUI to create the live. You will need the GParted live iso file in this method. PS. The boot menu created by Unetbootin is not exactly the same boot menu as the one created in choice 1. Therefore it's recommended to use the choice 1.

  • Extract files and make USB flash drive bootable under GNU/Linux

      • Choice 1 (Manually):

          1. Prepare an USB flash drive or USB hard drive or external disk which has a partition using FAT (either FAT16, FAT32) file system. If the USB flash drive or USB hard drive does not have any partition, you can use disk tool (e.g. gparted, fdisk, cfdisk or sfdisk) to create a partition with size 200 MB or more, Here we assume your USB flash drive or USB hard drive is /dev/sdd (You have to comfirm your the device name, since it's _NOT_ always /dev/sdd) on your GNU/Linux, so the partition table is like:

            1. # fdisk -l /dev/sdd

            2. Disk /dev/sdd: 12.8 GB, 12884901888 bytes

            3. 15 heads, 63 sectors/track, 26630 cylinders

            4. Units = cylinders of 945 * 512 = 483840 bytes

            5. Disk identifier: 0x000c2aa7

            6. Device Boot Start End Blocks Id System

            7. /dev/sdd1 * 1 26630 12582643+ b W95 FAT32

            8. Then format the partition as FAT (e.g. "mkfs.vfat -F 32 /dev/sdd1" WARNING! Executing it incorrectly could cause your GNU/Linux not to boot. Confirm the command before you run it.).

              1. # mkfs.vfat -F 32 /dev/sdd1

              2. mkfs.vfat 2.11 (12 Mar 2005)

          2. Insert your USB flash drive or USB hard drive into the USB port on your Linux machine and wait a few seconds. Next, run the command "dmesg" to query the device name of the USB flash drive or USB hard drive. Let's say, for example, that you find it is /dev/sdd1. In this example, we assume /dev/sdd1 has FAT filesystem, and it is automatically mounted in dir /media/usb/. If it's not automatically mounted, manually mount it by "mkdir -p /media/usb; mount /dev/sdd1 /media/usb/".

          3. Unzip all the files, and copy them into your USB flash drive or USB hard drive (You can make it by the command like: "unzip gparted-live-0.4.5-2.zip -d /media/usb/"). Keep the directory architecture, for example, file "COPYING" should be in the USB flash drive or USB hard drive's top directory (e.g. /media/usb/COPYING).

          4. To make your USB flash drive bootable, first change the working dir, e.g. "cd /media/usb/utils/linux", then run "bash makeboot.sh /dev/sdd1" (replace /dev/sdd1 as your USB flash drive device name), and follow the prompts to finish that. WARNING! Executing it with wrong device name could cause your GNU/Linux not to boot. Confirm the command before you run it. (There is a known problem if you run makeboot.sh on Debian Etch, since the program utils/linux/syslinux does not work on that. Make sure you run it on newer GNU/Linux, e.g. Debian Lenny, Ubuntu 8.04, Fedora 9...).

          5. If your USB flash drive or USB hard drive is not able to boot, check (1) Is there any partition in your flash drive ? It must contain 1 partition at least. (2) The partition must be marked as "bootable" in the partition table. (3) The partition must be on the cylinder boundary.

      • Choice 2 (Use GUI program on GNU/Linux):

          • Download Unetbootin to help you to create this Live USB flash drive. Just run the program on MS windows, then you can follow the GUI to create the live. You will need the GParted live iso file in this method. PS. The boot menu created by Unetbootin is not exactly the same boot menu as the one created in

Can be downloaded at http://sourceforge.net/projects/gparted/

Ref: http://www.linux.com/archive/feed/53924