Linux

How to resize Linux Partition without losing data?

So you need to resize a partition of your Linux installation without reinstalling the system? You have installed Linux and now you need to modify partition to install another operating system. You might want to create a separate partition for Swap if you haven’t already created it while installing your Linux OS. So here are some quick methods to modify, shrink partitions in Linux.

How to Shrink partitions in Windows to make space for Linux.

Note: Before we start, there are a few things you should be aware of. This article is about resizing Linux partitions only. Linux partition may or may not have the operating system installed on them. If you for any reason need to modify your Mac OS X or Windows partitions then you should not use any Linux tool. You should modify Windows and OS X partitions from within their respective OS’s only and not from Linux.

GParted Live Disk

GParted Live is a specialized tool that boots from an optical disk or USB flash drive. This tool runs solely in the RAM and is able to resize any Linux partition. This is the best method of all to modify Linux partitions as this method modifies Linux partitions when they are not in use. And that’s why there are very minimal chances that something will break.

To get GParted live disk, download GParted live ISO from here. Now follow the steps below to shrink Linux partition.

  • Create a live USB of GParted (here is how you can do it).
  • After you have created a Live USB of GParted restart your PC.
  • Now boot into Live USB by pressing the boot key at the start of your PC.
  • Then select boot from USB in the menu and press enter.

If you are unable to find the boot key, then just open the BIOS menu. Its generally Delete, F1 or F2 key at the start of your PC when the motherboard logo appears. In that menu change the boot order to make USB first at first in the boot order.

How to use GParted to Resize Linux Partition

Now when you are inside GParted Live disk, you can see your hard drive partitions. If you have multiple hard drives select the drive you would like to modify. Now, right-click on any partition that you want to change and select Resize. Just slide the slider till you get the amount of free space you need and click Resize/Move.

Now you should see free space, where you can create a new partition. Just right click on that partition and select New and create a new partition.

Note: All these changes you have made won’t take effect immediately. Each change you have made is queued and appears at the bottom of the GParted window. Now when you are done making changes click on the tick.

Now click on Tick(Apply All Operations) and then click on Apply. GParted will start making changed on your hard drive. Now don’t cancel or power off your PC, as it might harm your PC and wipe out all your data.

When the above process completes you can restart your PC. Although it’s mostly a safe process its recommended to backup your data just in case if something goes wrong. And if you have changed the boot order to boot from USB first then, change it back to boot from the hard drive first.

Ubuntu Live Disk

If you have a Ubuntu installation disk or Ubuntu ISO with you, then you don’t need to download GParted live ISO as the Ubuntu installation disk contains GParted.

If you don’t have Ubuntu live disk you can create one using ISO file of Ubuntu. Here is how you can create a Live USB disk using a USB drive.

Restart your PC and boot into Ubuntu disk and now navigate through the installation setup till you see install alongside Windows, and Something Else option. Choose the Something else to option it opens GParted. And then you can follow the steps above to modify your hard-drive partitions. When done modifying hard drive partitions just close the installation setup.

Using GParted on your Linux System

GParted is present in almost every single Linux distributions. If you don’t have GParted installed by default you can install GParted by the command below.

sudo apt-get install gparted

Then all you need to do is simply open GParted, follow the steps above and modify your partitions. This method should work fine unless you are modifying any system partition. If you want to modify any system partition then you should follow the two methods above.

Shrink Partition in Windows

For most of us those who use Linux and Windows in dual boot, this is a very suitable method. If you want to shrink Windows partitions and use that free space in Linux, then follow the steps below. And this is also the safest method to resize Windows partitions.

  • Right-click on the Start menu and click on Disk Management.
  • This will open the Windows Disk Management tool.
  • Right-Click on the partition that you want to shrink.
  • Select Shrink Volume and then enter the amount of space to shrink and click on Shrink. This Should shrink drive and create empty space on your hard drive.
  • If you want to use this free space in Linux then just leave it and open Linux.
  • Open GParted in Linux and create a new partition, or merge this free space in Linux partition.
  • This will allow you to Shrink space in Windows and use that space in Linux.

We hope you like the article. If you have any questions feel free to ask in comments we are always here to help you. If you have any suggestions we would love to hear from you.

Akash

Recent Posts

Linux Software must have to improve Productivity

You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More

1 year ago

How to get Complete details of an Audio Video File

Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More

3 years ago

Fix Windows 10 showing wrong time in dual boot with Linux

If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More

3 years ago

How to update Linux Kernel to the latest version easily

Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More

3 years ago

3 Methods for How to Install Python on Linux System

Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled.… Read More

3 years ago

How to Install Python on Windows 10 to begin coding

Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More

3 years ago

Just so that you know we use cookies on our website. Want to know more

read here