GParted is a very useful Linux system disk partitioning tool, then, how gparted to the Linux system to partition the disk? Today, in our computer tutorial, we are going to share the solution to this problem. In this tutorial, we'll come together to learn how to implement your changes using a Linux emergency boot disk. After the disk is booted, you can run GParted, just as you would run from a regular system, using a point-and-click operation to tell the software what you want to do.
GParted
Run an emergency disk
There are now a number of Linux emergency disks (emergency discs), such as Partedmagic and SYSTEMRESCUECD (see Resources). You can also use your Linux installation media, and many versions include a rescue mode (rescue mode) that supports access to GParted or similar utilities. To illustrate the issue, I will introduce the use of partedmagic 4.11, but generally speaking, other tools are similar. However, you need to start GParted in a different way.
Most emergency disks come in the form of x86 (32-bit), but these disks work well in x86-64 (64-bit) computers, even if the system runs 64-bit versions of Linux. File system data structures are not affected by the central processing unit (CPU) architecture. If you want to run on another machine, in addition to the standard personal computer (PC), such as the Macintosh, you need to check that your emergency disk can work with your hardware.
In general, you must boot an emergency disk as if you were booting a Linux installation disk. On some systems, insert the disk and then reboot the computer to perform the task. On some systems, you must press a function key to select a boot device, or adjust a basic input/output system (BIOS) option to boot from the CD drive without booting from the hard drive. The specifics of how to do this are based on the system, and you need to consult the man page for more information.
When you boot Partedmagic, a boot menu appears. Select Default settings (ns from RAM) to boot to the standard system. When the system boots, you can see a desktop that contains icons for commonly used tools, including a Partition Editor that starts GParted. Double-click the icon to start resizing your partition.
Tell GParted about your changes
To resize a partition, right-click it, and choose Resize/move from the Drop-down menu. The result is a dialog box that appears as shown in Figure 2. You can use the Graphics slider or text input fields to resize and position the partitions.
GParted provides a point-and-click interface for resizing partitions
The first illustration shows the size of the adjusted/dev/sdb7. Move the start point to the right to make room for the/DEV/SDB5 extension. To complete the resizing of the partitions in the diagram, you also want to move the swap partition (/DEV/SDB6) to the right before resizing the/DEV/SDB5 size. Alternatively, you can delete and recreate the swap partition, however, this may require modifying the space in the/etc/fstab by using the UUID primer, and you can extend the/DEV/SDB5 after the swap space is moved.
Note the Align to field. This is a new feature in the recent version of GParted that allows you to align partitions to Zi Ju surface boundaries, or to align Mebibyte (MiB) boundaries, or both. Old disks are typically partitioned to align against cylinder boundaries, but MiB alignment is typically a disk partition for Windows Vista or newer versions. Linux supports both of these alignment modes. If your system is dual-booted Windows XP, column alignment is required. If your system is dual-booted Windows Vista or later, or if your system uses a new 4096-byte sector, MiB alignment is required.
If you want to make room for the primary partition from a logical partition, you must explicitly adjust the extended partition around the logical partition, and vice versa. You can do this as you would any other partition, but you will find it easier to click on a list entry than to click on a chart in the above partition list.
GParted does not allow you to adjust the partition you are using. For example, there is a lock icon next to the entry in the partition. You can right-click the partition and choose Unmount to uninstall it. Note If any one of the partitions included in the extended partition (including swap space) is in use, it is locked in this way.
Implementing your changes in GParted
After you notify GParted of your changes, you must either apply the all Operations menu item by selecting Edit or click the Apply icon to implement it. The result is a progress dialog box that outlines everything that the program is doing. If you decide to undo, you can either use the Undo feature of GParted or exit the program directly without applying your changes, then your disk will not change.
Zoning tuning takes time to complete, ranging from one second to several hours, depending on the nature of the change and how much data is moved. You cannot interrupt a running operation under any circumstances! If you do this will destroy the file system, causing the data to be unrecoverable.
Modify Disk Reference
If you want to add or remove partitions, you may need to modify your/etc/fstab file or your boot loader configuration as described above. To do this, you must mount your root (/) partition and edit the file. In Figure 1, the root partition is/dev/sdb1,gparted can mount it on/MEDIA/SDB1, so you should edit/media/sdb1/etc/fstab. If the system uses a separate/boot partition, you may need to mount it separately to edit the root loader configuration in the Grub/menu.lst, grub/boot.conf, or grub/boot.cfg file of the root partition.
Check the files and replace the old partition numbers with the new ones. If you need some modifications, back up the old configuration before saving the new configuration.
Move forward
At this point, you may need to reboot your system. In Partedmagic, click the icon at the bottom left of the screen and select Logout, which gives you some options including a reboot. If you have not removed the emergency disk, be sure to remove it. With luck, your computer should reboot to the regular Linux operating system, but you will find that your disk space has changed.
This article describes basic zoning tuning operations, and part 2nd of this series describes more advanced operations and other options, including tuning Logical Volume Management (LVM), troubleshooting, and other actions you need to consider when you're not doing enough.