0

I have a ubuntu system with a disk with different partitions (some I cannot use)

in the end I have a 127 GB partition almost full (just 12GB free) that is /dev/sda5 and is mounted at the file system root.

I have managed to get me an adjacent unallocated space of 54GB (Device /dev/sda) .

I was thinking of expanding my root partition but that is not possible (since I am booting on it and for some reason I am unable to boot from USB- a complete different problem)

So I am thinking why not making the free space into a different partition. Then I will have 54GB on a new partition.

My question is (I am unexperienced with ubuntu) if I do this, how can I use this partition with my system and avoid all the "not enough space " errors.

Can I mount the partition somewhere over the /home or even better `/home/myuser' so as to have more space available?

8
  • Advice: Solve your unable-to-boot-from-USB problem first. Workarounds cause more trouble later.
    – user535733
    Jul 10, 2020 at 3:14
  • You can use command or GUI tool (you provided no OS/release details to really be specific) to create the partition, then edit your file-system table (/etc/fstab) to control where it mounts to (or a number of other options but I'd use fstab) If it mounts over an existing directory, it'll hide or shadow the original contents of that directory, so prepare it before hand (ie. copy files to it that will be shadowed). What you put there, and where you put it is up to you.
    – guiverc
    Jul 10, 2020 at 3:16
  • @guiverc so if I create a new directory over /home and I mount the partition there will my disk space in /home be increased? Jul 10, 2020 at 4:06
  • If you mount the 54GB partition on /home, you'll have 54GB available to home, and whatever files you copied onto that partition are all that will be there Any prior contents in your previously used /home directory will be shadowed by the new mount.
    – guiverc
    Jul 10, 2020 at 4:09
  • @guiverc I mean mount it over say /home/myuser/mynewdisk/ , meaning a subdirectory in /home. Is this possible? Jul 10, 2020 at 4:58

1 Answer 1

0

After creating the partition (say under /dev/sda4) you can type sudo mount /dev/sda4 /mnt and you will be able to mount the partition inside /mnt. Then you can cd into /mnt and access the partition.

You can also create your own mount point. For example sudo mkdir /mnt/sda4 and then run sudo mount /dev/sda4 /mnt/sda4 to mount.

3
  • I did this but I have a problem. I don't have access to it (to copy and paste for ex) and I have to use the terminal and sudo my way to it. right now I am sudo cp a file and I don't know if it will be finished alright. Is there a way that I have access to this mounted region? Jul 10, 2020 at 5:12
  • You should change the permissions. For example if the username you are using is kansai and you have mounted the partition in /mnt/sda4, then execute sudo chmod -R ugo+rxw /mnt/sda4 to get permissions for everyone to read write and execute inside all folders and subfolders of /mnt/sda4
    – pebox11
    Jul 10, 2020 at 10:55
  • If also you would like to change ownership type sudo chown kansai:kansai /mnt/sda4. But I thing the permission change will allow you to copy freely. In order to see if your copy command works try opening a new terminal and run ls /mnt/sda4 and check if the filesizes change inside.
    – pebox11
    Jul 10, 2020 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .