Book Image

Manage Partitions with GParted How-to

By : Curtis Gedak
Book Image

Manage Partitions with GParted How-to

By: Curtis Gedak

Overview of this book

Modern disk drives can store vast amounts of information. To effectively use all of this space, you can partition disk drives into separate storage areas. These separate storage areas enable you to organize your data, improve system performance, and install and use many operating systems"Manage Partitions with GParted" is a practical, hands-on guide providing you with step-by-step instructions to effectively organize your hard drive. You start with simple tasks that help you identify drives and partitions and progress to advanced tasks such as preparing for new operating systemsThis book provides ample screen shots to help you effectively use your hard drive. You start with simple tasks that help you to identify drives and partitions. Next you progress to tasks covering the basics of how to grow, shrink, move, and copy partitions without data loss. You finish with advanced tasks that use the basics to prepare for new operating systems, migrate space between partitions, and share data among Windows, Linux, and Mac OS X. By following through the tasks, from basic to advanced, this book will empower you with the knowledge and tools to Manage Partitions with GParted.
Table of Contents (7 chapters)

Appendix: Tips and tricks


Following are some tips and tricks to help you manage partitions on different devices with GParted.

Maintaining Mac OS X hybrid partition table

Mac OS X uses a hybrid partition table scheme that is a combination of GPT and MS-DOS partition tables. This hybrid partition table scheme is non-standard. When you edit the hybrid partition table, GParted will make the GPT align with GPT standards by writing a single protective entry in the MS-DOS portion of the hybrid partition table. This causes the partition entries in the MS-DOS portion to be lost, and prevents some operating systems from booting, such as 32-bit versions of Windows.

Fortunately these MS-DOS partition entries can be recreated from the GPT partition entries. When you finish editing Mac OS X partitions, open a terminal window and enter the following command:

sudo gptsync /path-to-disk-device

where /path-to-disk-device is the disk device you just edited (for example, /dev/sdc).

The gptsync command will copy the GPT partition entries that are below the 2 TB MS-DOS limit into the MS-DOS portion of the hybrid partition table scheme.

Editing iPod partitions

If you wish to repurpose your iPod for use as a RockBox music player, or as a portable GNU/Linux drive, you may wish to edit your iPod partition table. Before editing iPod partitions, you should be aware of the following unusual partition configuration.

Some iPods have a proprietary firmware partition at the start of the device. This partition ID is set to type 0 (zero). A type 0 partition ID usually indicates the partition is empty. In this situation, GParted treats the partition as empty and might use the partition table entry, or overwrite the partition while you are editing iPod partitions. This can overwrite the proprietary firmware, causing your iPod to cease to function as the manufacturer intended.

To prevent overwriting this type 0 partition we recommend that you use the following high-level steps:

  1. In a terminal window use the fdisk command line tool to set the partition type to non-zero value (for example, 83).

  2. Next, start GParted and perform your partition editing.

  3. When finished with partition editing, exit GParted.

  4. Finally, use fdisk to set the partition type back to zero (for example, 0). Some versions of fdisk will warn about setting the type back to zero, but in this case a zero partition id is needed.

Following is a example listing of an iPod partition table with a type 0 partition:

user@debian:~$ sudo fdisk -l /dev/sde
Note: sector size is 2048 (not 512)

Disk /dev/sde: 8120 MB, 8120172544 bytes
250 heads, 62 sectors/track, 255 cylinders
Units = cylinders of 15500 * 2048 = 31744000 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1           3       92876    0  Empty
/dev/sde2               4         255     7812000    b  W95 FAT32
user@debian:~$

Assuming the iPod is recognized as device /dev/sde, the steps to use fdisk to change the partition id type are as follows:

user@debian:~$ sudo fdisk /dev/sde

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
user@debian:~$

Use similar steps, as shown above, to set the type back to 0 (zero), instead of 83.

Tip

If you edit your iPod partitions, your iPod might cease to function as the manufacturer originally intended.

Adding space to virtual machines

Oftentimes, virtual machine (VM) software provides the ability to add more space to virtual disk drives. However, adding more space does not increase the size of the virtual disk drive partitions. This is where GParted can help. The high-level steps are as follows:

  1. Configure the virtual machine BIOS to first boot from removable media, such as a CD or USB flash drive.

    For more information on how to configure BIOS, see http://gparted.org/display-doc.php?name=gparted-live-manual.

  2. Attach GParted Live to the VM as removable media. In some cases you can connect the VM CD drive directly to the .iso image file. You might also need to create a new CD device for the VM.

  3. Boot the virtual machine.

  4. Use GParted to add new partitions or grow existing partitions to use the added space.

  5. Shut down the virtual machine.

  6. Disconnect GParted Live from the VM.

Using these steps, you can avoid creating a new VM with larger virtual disk drives. This will save time and effort needed to reinstall the operating system and applications, restore the data, and configure the system.

Getting help with GParted

There are several resources available to help you with GParted:

For additional information on GParted, see http://gparted.org.

Other uses for GParted

The practical applications of GParted are numerous since GParted can be used on a wide variety of disk devices. Searching the Internet reveals many ways people have used GParted to accomplish their goals.

Some of the other uses of GParted include:

  • Expanding the memory in Android smart phones

  • Migrating operating systems to larger drives

  • Preparing disk devices for use with digital video recorders and game consoles

The list of uses for GParted continues to grow.

With these many uses in mind, we hope that this book has empowered you with the knowledge and tools to manage partitions with GParted.