Linux Format

Resize or move?

-

I have Linux Mint 16 and Windows XP installed but I want to increase the size of the Linux partition. I have reduced the Windows partition and now have an unallocate­d section. How do I increase the size of the Linux partition without losing any data? trevorw You now have empty space between the end of the Windows partition and the start of the Linux root partition. This leaves you with two options. The first is to move the start of the Linux partition, which will increase its size. This is not a trivial task but GParted can take care of it. You’ll need to boot from a live CD containing GParted – you can get one from http://gparted.org/livecd.php. You simply drag the start of the Linux partition to the left and click Apply. However, this is a complex task for parted to perform and will take some time. If your computer were to crash or lose power during the process, your root filesystem could be corrupted, so do make a complete backup first.

The alternativ­e is to create a separate partition in the empty space and use that for /home. This avoids the need to resize and gives you the benefit of a separate /home, which is useful when switching or reinstalli­ng distros. Once again, use a live CD and GParted to create a new partition in the unallocate­d space and set its filesystem type to ext4. Once you’ve done this, you need to mount both the old and new partitions, which you can do from a terminal. Let’s say the original Linux partition is /dev/sda2 and the new one is /dev/sda4. Open a terminal and run these commands: $ sudo mkdir -p /mnt/{old,new} $ sudo mount /dev/sda2 /mnt/old $ sudo mount /dev/sda4 /mnt/new

Now the contents of your two partitions are visible in those directorie­s and you can move your files into the new home with: $ sudo mv /mnt/old/home/* /mnt/new/ Note that you are moving the files from the home directory of the old partition directly into the new one, as this will be mounted at /home in the next step. Once the move is completed, open /etc/fstab, the file that sets up mounts, in a text editor, as follows: $ sudo leafpad /mnt/old/etc/fstab Under the line that mounts / add another like this /dev/sda4 /home ext4 defaults,noatime 0 0 rememberin­g to replace /dev/sda4 with your new partition’s location. Then reboot and you should have lots of free space in both your home directory and the root filesystem.

 ??  ?? GParted is the most popular tool for manipulati­ng partitions graphicall­y and has a live CD.
GParted is the most popular tool for manipulati­ng partitions graphicall­y and has a live CD.

Newspapers in English

Newspapers from Australia