0

Running GParted I get:

GParted Display

Does "unallocated" mean it's available, I can use it? How do I then "allocate" it?

  • Unallocated does mean that the space can be used - the question is, where do you want to use it? You will need some details for us. I assume Linux is installed on /dev/sdb5 and I'm going to guess that Win10 is on /dev/sdb2 – Charles Green Apr 20 '19 at 13:16
  • /dev/sda6, Charles. And, yes, I think Windows is on /dev/sdb2 – Sandown Road Apr 20 '19 at 13:30
  • K - so, do you want to use the space for Win10, for Ubuntu, or to create a shared storage area, or something else? – Charles Green Apr 20 '19 at 13:45
  • Yup. Charles, I have two disks. Unallocated is on dev/sdb, Ubuntu 18.04 LTS is on dev/sda. I have a Ubuntu 14 too which I'm too nervous to delete. Yes I have Windows but that's not important I boot Windows only when I do tax returns. I just want to be able to use the unallocated from Ubuntu 18, even if I have to navigate there; ie it's under Other Locations on File. Because I have peon status in this forum I can't paste images - I"m going to open another question and paste a link to lsblk output there. Plse have a look and tell me what you think is easiest – Sandown Road Apr 21 '19 at 04:21

1 Answers1

0

For shear ease, you could simply format the partition, and mount it as a sub-directory of your home directory:

  1. Format the partition to ext4 (for linux) - it will probably be /dev/sdb7
  2. Create a directory in your home directory, to use as a mount point
    1. cd /home/<myusername>
    2. mkdir <nameThatMakesSense>
  3. Mount the partition to the mount point that you have created
    1. sudo mount /dev/sdb7 /home/<myusername>/<nameThatMakesSense>

Now the partition is a sub-directory of your home directory, and you can use it at will. You may need to create appropriate permissions to access the directory the first time.

Additionally, I would place this in /etc/fstab so that the partition is mounted at boot time. To do that:

  • sudo cp /etc/fstab /etc/fstab.bak
  • sudo nano /etc/fstab

scroll to the end of the file, and add a line that looks like

/dev/sdb7 /home/<myusername>/<nameThatMakesSense> ext4 defaults 0 2

If you have used Nano to do the editing, press ctrl+o to save and ctrl+x to exit.


For some light reading and further information - please review man mount for syntax and examples of how to mount disks, and man fstab for further information about fstab entries.

Knowing little about your system, I chose to make the mount point for the partition a sub-directory of your home assuming that you want to use it to store data you have generated. You could easily place this mount point elsewhere in the directory tree.

Possible dangers: /etc/fstab is read at boot time and mounts the operating partitions of your disk. If you mess up fstab badly enough, you will have trouble getting into your system. In the worst case, you could boot from a live USB, and copy the backup fstab file created above, over the one that got messed up.

Charles Green
  • 21,339
  • Thank you, Charles. Very much - exactly the kind of detail I need. – Sandown Road Apr 22 '19 at 04:04
  • @SandownRoad If this helped, you canmark the answer as accepted (the checkbox near the top of the answer) - this will help other people to know that there are methods to do the same kind of thing. – Charles Green Apr 22 '19 at 04:32