To mount automatically at boot time there is file /etc/fstab
. In this file you specified which device should be mounted to mount point . As an example :
$ vim /etc/fstab
/dev/sda1 /home/USER-ID ext4 defaults 0 0
Replace USER-ID with your mount point and ext4 with your file system . For any information about more options in fstab see man fstab
.
In systemD there is unit by the name of mount which supposed to be replaced with fstab . Try to mount with systemD may help :
cd /usr/lib/systemd/system
cp tmp.mount /etc/systemd/system
vim /etc/fstab
And take your added line out.
cd /etc/systemd/system
mv tmp.mount mydata.mount
vim mydata.mount
Edit these options:
- What=/dev/sda1
- Where=/home/USER-ID
- type=ext4
- options=defaults
umount old mounted partition.
systemctl deamon-reload
systemctl start mydata.mount
systemctl enable mydata.mount