run a script on boot to auto mount?
I would like to automount a directory on boot automatically... how would I go about that? I assume I need to write a script.. but how to get that to automatically run?
Basically I want to auto mount my windows partition. It works fine, and I can access it as long as I click the "drive" in file manager to mount it... but I need it to automout. |
I found a solution for mounting a drive....
use these two commands... Code:
sudo fdisk -l Then type Code:
sudo nano /etc/fstab Code:
UUID=14D82C19D82BF81E /MountPointDirectory auto nosuid,nodev,nofail,x-gvfs-show 0 0 This is the exact lines I added to the bottom of my file. Code:
# How can I automount a directory, rather than an entire drive? |
you should be able to do that by adding an entry for your windows partition to your fstab (in /etc).
|
To elaborate on cordx's post you can not just mount a single directory on a filesystem but you can use a bind mount to provide an alternative view to the existing directory tree.
If you mount your windows drive to say /mnt/WindowsData you can then create another mount point to the desired directory within the drive. /etc/fstab entery would look like. /mnt/WindowsData/subdirectory /home/itsisme/subdirectory none defaults,bind 0 0 There is also a fuse filesystem bindfs that can do the same thing without having to have a fstab entry. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 09:29 PM. |