Networks has been donating dedicated server hosting to Parted Magic
since 2008. Their primary services are Toronto Server Colocation, dedicated servers, cloud
hosting, managed servers, and other Toronto data center services.
A popular reason for using GParted is to adjust a drive's partition to make room for a Linux installation or multiple versions of Microsoft Windows. To help in that area, this section will step through a scenario of partitioning a drive for one of those reasons.
For this learning process, we will practice with a single-partitioned, 40GB drive occupied by a Windows OS installation and its NTFS filesystem. In steps to follow, GParted will be used to resize the pre-existing NTFS partition, create a Linux /home user directory partition, add a Linux swap partition, and finally create a partition space for a new, Linux distro's planned installation. If you are not very advanced using Linux or Microsoft Windows, DO NOT MOVE the beginning of your Windows partition. Repositioning only the endpoint of the partition is appropriate in this scenario, and will minimize the chance of error. Shrinking an NTFS filesystem and its partition is a safe operation for GParted. Back-up your data!
note: It is a good idea to complete a disk check from within Windows between each operation preformed with GParted when working with an NTFS partition. If the partition contains an installation of Windows, performing a disk check is critical! Do not skip a disk check between each operation under any circumstance!
1. Start by launching GParted from the LXDE desktop, and allow for a brief delay as GParted will scan for available devices before it is ready to use.
Presented next with GParted's main window, our target drive must now be selected. GParted automatically selects the first device from its list of detected devices. Use the drop-down list from the toolbar to choose the appropriate device drive if it is not the default selection.
2. Upon selecting the intended device, a graphical view of the drive and its partition scheme will be displayed in the application's main window. Clicking inside the NTFS partition selects the partition and enables the Resize/Move option.
3. Click the Resize/Move button from GParted's toolbar, and the 'Resize/Move /dev/…' dialog box will open.
4. To better gauge what size to shrink the partition, use the color-coded indicator as a guideline. The yellow block is the amount of data used on the partition, so it is best to leave adequate space to the right of this mark when choosing to resize the partition. For this example, let's continue and resize the NTFS partition to 20GB. Enter 20480 in the 'New Size (MiB):' box.
5. Click the Resize/Move button at the bottom-right, and you will return to the GParted main window. Notice the graphical view of the disk has changed, and previously-greyed-out options on the toolbar are now enabled. And not to be overlooked, the status bar in the window's lower-left corner reports an informative “operation pending” message.
6. To complete the pending operation (i.e. resize the NTFS partition), select the Apply button from GParted's toolbar. Before any actual operations take place, a window will warn you on steps to take to avoid problems. Please make note of them, and pick Apply to continue.
7. After all the operations are successfully completed, you will see this dialog box.
8. To review GParted's actions during this operation, click the window's Details header to display the Details viewer pane in the current window. Detailed are the steps, commands, and results logged by GParted; and each row can be expanded to display additional details by clicking on the small arrows to the left.
9. If you would like keep a log of the performed GParted operations, you can choose the Save Details option as positioned next to the Close button. Click Save (accepting the defaults), and an html version of these details will be stored in Parted Magic's /root folder. (Refer to the 'Saving files' section of the Parted Magic Documentation to learn how to save this file permanently.) Reporting bugs without this file is almost worthless to the GParted developers. Please use it.
note: At this time is highly suggested to complete a disk check from within Windows.
10. Having resized the NTFS partition, unallocated drive space is now available to be partitioned to our choosing. Recall that an MBR hard drive can have a maximum of four primary partitions, or three primary and never more than one extended partition. With Linux capable of booting from a logical partition, electing to partition the remaining space as extended is a suitable option for this scenario (and affords the opportunity of adding logical partitions and other Linux installations in the future). Click in the unallocated space remaining on the drive, and select New to invoke the 'Create new Partition' dialog box.
11. At the new dialog box, select (via the 'Create as:' drop-down list) Extended Partition for the type of new partition to create. Click Add to conclude this step and to return to GParted's main window where you will then need to apply this operation.
12. The drive at this stage should have a primary NTFS partition and an unallocated extended partition. Once more, right-click in the unallocated space, and select New. Notice that the only choice now in creating a partition type is a logical partition (the other types are greyed-out) - reason being, only logical partitions can reside within an extended partition. And based on that construct,it is possible to create as many logical partitions as basically needed. Continue now by creating a 2GB ext3 partition (selected via the 'Filesytem:' drop-down list) for the planned and exclusive use by the Linux /home user directory. Click Add, and apply the changes back at GParted's main window.
13. Linux requires a “swap” partition to use for a disk cache. It is nothing more than a spot to write data to when all the physical memory is used up. When installing Linux, the convention is to create a swap partition at least twice your RAM size. For this example we will forgo that convention, and create (and apply) a simple 1024MB linux-swap partition.
14. Next, create a partition to install Linux in the rest of the extended partition's unallocated space. Play it safe and use the ext3 filesystem (unless you really know what you are doing) and also leave some space free in our extended partition. After applying this final partition, your setup should look something like this.
Our drive is now readied for a typical Windows and Linux dual boot setup. The safest way to continue adding partitions at a later time is to add them to the end of the last partition (hda7 in this example, and/or in the free space we have allowed for from earlier planning). Whenever possible, avoid moving the beginning of any type of partition (especially one occupied by Windows), as this is the cause of most data loss. If you do have to move the beginning of a partition, back-up all important data prior to making any changes to your drive. Parted Magic and the GParted application are not responsible for any data loss experienced.