2

I'm trying to fix my partitions, and start using all the space on my hdd again. I had Windows 7 installed, using 3 partitions: System, Data, and Other then I installed Ubuntu using the Other partition but ended up with partitions shown at this image: One System partition, one for data (yet smaller than before installing ubuntu), one for Ubuntu and one 'partition' unallocated space.

Now I would like to extend my root partition (/dev/sda9 or the ext4 partition), but can that be done without having to reinstall ubuntu? I've also noticed that my swap partition is gone, but I have got 16 GB ram installed so would a 1gb swap partition be enough for Linux? I'm not using high memory consuming programs

Zuenonentu
  • 31
  • 1
  • 4

2 Answers2

0

if you want to modify your Ubuntu partition you need to boot a Live Ubuntu CD/USB with GParted. In this way your Ubuntu partition should not mounted (check this when you boot the live cd) and you can extend it as you wish.

You have not to reinstall Ubuntu because when GParted extend a partition, it move all the content to align the partition start, but it doesn't change any files.

To be sure do a backup of your important file and settings.

Danibix
  • 2,097
0

Instead of expanding your existing partition, you may want to consider creating a new partition to use the unallocated space. This will be safer, since you won't need to move a bunch of critical data structures, which is what will happen if you try to expand your /dev/sda9 into the free space preceding it. Chances are a new /home partition would be the best use for (most of) that free space; this is where your user files go, so it's the partition that's most likely to need to increase in size. This question and answers describes how to create a /home partition after installing Ubuntu. OTOH, if you want to increase the size of your current partition because of non-user files (say, if you're installing tons of software or if you're running a server that stores lots of data in /var), either creating a new partition for the relevant directory (like /var) or resizing the current partition (despite the risks) may be the best approach.

As to swap space, the old rule was to create swap space equal to 1-2 times your RAM, which would be 16 to 32 GiB, in your case. Today, it's rarely helpful to have this much swap space. The main reason to have even as much swap as you've got RAM is if you want to use hibernation (suspend-to-disk) operations, which are disabled by default in Ubuntu. That said, the Linux kernel can make effective use of swap space even if you've got lots of RAM -- the kernel will swap out long-inactive data from RAM, freeing the RAM for use as disk caches, thus improving performance. With 16 GiB of RAM, this might or might not be important to you, depending on how much of that RAM is used by programs. If this answer seems a bit wishy-washy, I apologize; but it's impossible to give a blanket statement about how much swap space is necessary or helpful without detailed system usage information.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105