- Open a new Terminal Window
- Create a mount point where you need the partition/drive to be mounted. You may mount the drive anywhere and call it whatever you want to.
Example: mkdir /media/development
- Make a backup of the fstab file!!! This is very important!!!!!!
Example: sudo cp /etc/fstab /etc/fstab.backup20090728
- Open the fstab file for editing
Example: sudo gedit /etc/fstab
- Add the line below at the end of the fstab file
/dev/sda8 /media/development vfat defaults 0 0
- Replace ntfs with vfat if fat32 partition or ext3/ext4
- /dev/sda8 = drive/partition
- /development = mounting point
- ntfs = filesystem
- Type in ‘sudo mount -a‘ to refresh the fstab or reboot PC for changes to take effect.
- Locate the mounting point
Example: cd /media/development
- Drive should be mounted successfully but only root user will have permission to write to the mounted drive.
- Modify the last added line in the fstab file to read as below so that the given user is able to write to the drive
/dev/sda8 /media/development vfat uid=uname,gid=users,utf8=true 0 0
How to mount partition/drive at startup Ubuntu/Linux
38 sec read