I have installed ubuntu on a
8GB 5GB partition. As I have installed many packages, I am running out of space.
Qn 1 : Is there a way that I can specify another portion for installing the packages ?
Qn 2 : Can I move the whole installed files from my current partition to another place ( partition ) and make the changes in grub or so?
I don't want to reinstall the whole, so after that I just can make an upgrade 🙂
The / , and home directory is in same place.
Thank you .
A1: no, it's not possible. The paths are fixed.
A2: if you want to move files to another partition, you'll need to use a Live CD. Please consider resizing partitions first which is much easier and less error-prone. This is only possible if you've enough space on one disk. Consider moving your
/homefolder as described here too, 8GB should be enough for
/in most cases. If you want to use a second disk as root partition or wish to create a new partition on the current disk, please continue.
Open a terminal and run
sudo blkidto get the UUID for your newly created partition. Example output, you'll need the last line:
Mount your old root partition (
/dev/sdb1is your newly created partition,
/dev/sda4was your old partition):
Copy over the files (this may take a while):
/mnt/etc/fstabwith the new UUID. Pick an editor at your choice:
Find the line that looks like and replace the UUID of
/mnt/etc/fstaband exit the editor. Next, GRUB needs to be updated to boot from the new disk and partition.
Unmount the partitions to finish it: