Automatic mount via a line in /etc/fstab
Create mountpoints, for example
sudo mkdir /mnt/project-name-x
sudo mkdir /mnt/project-name-y
...
You can replace 'project-name-x' ... with names that help you know what it is.
Mount each partition automatically in the installed system via a line in the file /etc/fstab
. Edit it with
sudo nano /etc/fstab
Example line for a partition with ext4
file system,
UUID=d3f3f4a3-3d6e-4e4f-8e1a-de30de792f90 /mnt/project-name-x ext4 defaults 0 2
You must
find the UUID of the partition and use it in /etc/fstab
. See the output of
sudo blkid
and use it (without quotes),
replace /mnt/project-name-x
with the actual mount point,
if another file system, replace ext4
with the linux name of that file system.
Otherwise the line can look like the example line. See more details in the manual
man fstab
and this link, help.ubuntu.com/community/Fstab
If a partition has the NTFS (or FAT32) file system, you may want to add mount options to give the regular user write access, as described at the following link,
How do I use 'chmod' on an NTFS (or FAT32) partition?
The mount options (after -o in the link's examples) can be added as a comma separated list after defaults
, like so
... ntfs-3g defaults,rw,user,uid=1000,dmask=007,fmask=117 0 2
Modify the uid to match the actual user(s) and the masks that you prefer.
The new configuration with be used after reboot (or shutdown and boot).