I had my hard disk split into two partiions, with 12.04 on one that does work, and 12.10 which doesn't properly. The hard disk is 250 gigs, and its about evenly split. Problem is, ubuntu 12.04 has maxed out it's half. So I'm wondering how or if I can just turn the 12.10 side of ubuntu into extra storage space for my working copy of 12.04? Can I turn the other partition into basically a second drive letter?
-
The version could be 12.10. I didn't I'd have to go back to the boot screen to check for sure.– ChadNov 20, 2013 at 0:00
-
/dev/sda1 ext4 mountpoint / size 115.6 GiB used 107 GiB boot– ChadNov 20, 2013 at 0:03
-
/dev/sda2 extended 117g 0 used under this one we have /dev/sda6 ext4 116g 4g used ----then /dev/sda5 linux-swap 1021mb 0 used– ChadNov 20, 2013 at 0:07
2 Answers
you can do that by using gparted partition manager.
sudo apt-get install gaprted
will install that if its not installed.
Then open it.
make sure that those two partitions are unmount. If its not possible to unmount them then rub a live Ubuntu and open gparted over there.
- from which volume you would like to take the space use shrink option. so save some space from it. it will show you how much minimum you should keep and how much you can attain.
- to which volume you would like to add the space you extend option.
Linux doesn't use drive letters as in Windows, so you can't create a "D:
drive" as you might under Windows. Instead, Linux uses a system in which filesystem partitions can be mounted more-or-less wherever you want in Linux's unified directory tree. Most user files go under /home
, so if you're gobbling up disk space on videos, digital photos, MP3s, word processing documents, and the like, that's where they all live, and it's best to put extra space under /home
, too.
For greatest long-term flexibility, my recommendation is to:
- Back up your
/home
data. (Always a good idea, especially before embarking on a major undertaking involving your user data.) - Turn the second partition into a
/home
partition, as described here. - Boot a Linux live CD (the Ubuntu installer in "try it now" mode or a live CD like Parted Magic or System Rescue CD).
- Using GParted, resize both the partitions so that your working Ubuntu root (
/
) partition is about half full (typically, about 10-30GiB) and the rest of the space is given over to/home
.
This will ensure that most of your disk space is available in /home
, which is where it's most easily used. (This assumes a typical desktop Ubuntu installation. If you've got a server or something, your disk space might be consumed in /var
or some location other than /home
, in which case you'd want to use most or all of the disk space in that location instead of /home
.)
Alternatively, you could use mkfs
or GParted to create a fresh filesystem on ("format") the spare partition, mount it somewhere within your user's home directory (temporarily via mount
and in the long term by editing /etc/fstab
), and copy some of your files there. For instance, if videos are chewing up, say, 70% of your disk space, you could create a ~/videos
directory, mount the newly-emptied partition there, and copy your videos to that directory. This will be a bit quicker and safer in the short term than what I've described, but it's a less flexible arrangement in the long term. The problem is that either of your two partitions could fill up again, which would require manual juggling of files to balance the load across the partitions. If all your user space is in one partition, that's less likely to happen.
A third option is to delete the partition that has the non-functional Ubuntu installation and resize the working one to fill the entire hard disk. This is likely to be quicker than the first option, and could be either quicker or more time-consuming than the second. Having a separate /home
partition helps protect your user data, though, so IMHO it's worth going to the effort to have that, or at least to move some of your user data into a separate partition.