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 .
Best Answer
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
/home
folder 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./dev/sdb1
)Open a terminal and run
sudo blkid
to get the UUID for your newly created partition. Example output, you'll need the last line:Mount your old root partition (
/dev/sdb1
is your newly created partition,/dev/sda4
was your old partition):Copy over the files (this may take a while):
Update
/mnt/etc/fstab
with the new UUID. Pick an editor at your choice:Find the line that looks like and replace the UUID of
/dev/sda4
with the/dev/sdb1
's UUID:Save
/mnt/etc/fstab
and exit the editor. Next, GRUB needs to be updated to boot from the new disk and partition.Unmount the partitions to finish it: