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)

Preparing for dual boot with GNU/Linux (Become an expert)


In this recipe we pre-create partitions for the GNU/Linux operating system, the virtual memory swap space, and data sharing.

Getting ready

Before performing this task, we highly recommend that you backup your data. This task involves moving the end of a partition boundary, which is a moderate risk activity.

How to do it...

  1. Select the current operating system primary partition.

  2. Choose the Partition | Resize/Move menu option and a Resize/Move window is displayed

  3. Click on the right-hand side of the partition and drag it to the left so that at least 10 percent free space remains in the partition.

    Note

    The 10 percent figure is a safe minimum to ensure that Windows runs properly. We need to balance the space allocated to Windows with the amount of space desired for a GNU/Linux installation (OS and swap space) plus a shared data partition. For example, with Ubuntu 12.04, the absolute minimum hard disk space needed for the operating system is 500 MB.

  4. Click on Resize/Move to queue the operation.

  5. Select the unallocated space.

  6. Choose the Partition | New menu option and a Create new partition window is displayed.

  7. Click on the right hand side of the partition and drag it to the left so that the partition is bigger than the minimum size required by the GNU/Linux distribution, but leaves some space for swap (for example, twice the RAM memory size) and data partitions (for example, any space left over).

  8. Click on the File system drop down list and select ext4.

    Note

    The ext4 file system is commonly used by many modern GNU/Linux distributions.

  9. Click on Add to queue the operation.

  10. Select the unallocated space.

  11. Choose the Partition | New menu option and a Create new partition window is displayed.

  12. Click on the Create as drop down list and select Extended Partition.

    Note

    At least one extended partition is needed because an msdos partition table does not permit more than 3 primary partitions and 1 extended partition. Inside the extended partition we can create multiple logical partitions.

  13. Click on Add to queue the operation.

  14. Select the unallocated space from the extended partition.

  15. Choose the Partition | New menu option and a Create new partition window is displayed.

  16. Click on the right-hand side of the partition and drag it to the left so that the new size is twice the amount of RAM in your computer (for example, 2 * 256 MiB = 512 MiB).

    Tip

    A value larger than the amount of RAM will enable the use of hibernation on devices such as laptop computers.

  17. Click on the File system drop down list and select linux-swap.

  18. Click Add to queue the operation.

  19. Select the unallocated space from the extended partition:

  20. Choose the Partition | New menu option and a Create new partition window is displayed.

  21. Click on the File system drop-down list and select fat32.

    Tip

    The fat32 file system is freely supported by a wide range of operating systems. If you need to create files larger than 4 GB, then consider choosing an NTFS file system instead. Modern GNU/Linux distributions can read from and write to NTFS file systems by using the ntfs-3g FUSE driver.

  22. Click on the Label text entry box and enter a label; for example, MYDATA.

  23. Click on Add to queue the operation.

  24. Choose the Edit | Apply All Operations menu option to apply the queued operations to disk.

  25. Click on Apply to apply operations to disk and click on Close to close the apply operations to disk window.

How it works...

This example uses several of the tasks that we covered earlier.

To make room for GNU/Linux we freed up unallocated space by shrinking the operating system primary partition. Then we created a partition with the ext4 file system, and another with linux-swap. The extra step to create a data partition in fat32 format adds flexibility because this partition can be shared with other operating systems.

Since the MSDOS partition table permits up to 4 primary partitions, we could have created the linux-swap and fat32 partitions as primary partitions too. However, this would prevent creating additional partitions in the future. That is why we chose to place these two file systems in logical partitions within an extended partition.

You are now ready to install GNU/Linux. Be sure to choose the manual partition option when installing your distribution. That way you can configure Linux to use the partitions you just created.

The following steps demonstrate how to choose a manual partition layout while installing Ubuntu 12.04.

  1. After you have downloaded the distribution .iso file and burned it to a CD, boot your computer using the Ubuntu Live CD.

  2. Choose your Language and the Install Ubuntu option.

  3. At the Preparing to install Ubuntu screen, click on Continue.

  4. At the Installation type screen, choose Something else and click on Continue.

  5. Select the ext4 partition (for example, sda2) and click on Change....

  6. Set Use as to Ext4 journaling file system, Mount point to / and click on OK.

  7. Scroll down and select the fat32 partition (for example, sda6) and click on Change....

  8. Set Use as to FAT32 file system, type in a Mount point (for example, /data), and click on OK.

  9. Note that you do not need to select the linux-swap partition (for example, sda5) to use as swap space because the Ubuntu installer will do this automatically.

  10. Ensure that the Device for boot loader installation is correct (for example, /dev/sda).

  11. Click on Install Now.

  12. When you are prompted Do you want to return to the partitioner, click on Continue.

  13. Follow the instructions on the remaining screens to choose your location, keyboard layout, your name, computer name, username, password, import accounts (if desired), and when the installation completes click on Restart Now.

All data stored in the fat32 partition will be available to both operating systems. In this example Ubuntu installation, the fat32 partition data is accessible in the top level /data directory. In Windows, it is accessible through a drive letter, such as the G: drive.

There's more...

Remember from previous recipes that if you resize a partition containing an NTFS file system, you should reboot into Windows twice. This permits Windows to perform file system consistency checks.

OEM Partition

Some personal computers have an Original Equipment Manufacturer (OEM) partition. This partition is usually at the start of the disk device and is often involved in the boot process. Most often the OEM partition contains tools to restore your PC to original factory condition. As such we suggest keeping this partition in case you ever need to restore your PC to factory condition.