May 18, 2006

A quick look at the GParted live CD

Author: Joe 'Zonker' Brockmeier

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.

Category:

  • Linux
Click Here!