I use Ubuntu 11.10 and Windows7 dual boot with Ubuntu as my primary OS.
Every time I need to access a document I need to mount the respective drive, though this is not at all tiresome, still, is there any way that drives becomes automatically mounted when I login?
Notice: If you are using Ubuntu 14.04 and later, Don't forget to check the note at the end of the answer
Go to the Startup Applications, by Clicking right-top corner Settings icon ---> Startup Applications.
The click on the Add button, Write a name for this operation such as "Mount ntfs drives", then in command input box, write this
udisks --mount /dev/sda2
, to automount the ntfs partition.Note: You need to replace the
/dev/sda2
with your actual NTFS partition number.You can get this number by this command:
Below is the output of this command in my computer.
For Mounting with Executable permission
For those of you (like me) who wants to have executable permission to be set upon mounting, so that you can have options for execute a file with double-clicking , Add this extra bit of options with
udisks
command.So, the total line for
/dev/sda2
should be like this (tested on 13.04)Caution: If you are a bit worried with security, you may choose not to have this functionality.
Note: Change for Ubuntu 14.04 and later
If you are using Ubuntu 14.04 or newer versions, You may notice that
udisks
packages is no longer available there. Yes, it is replaced byudisksctl
package. So, You need to useudisksctl
instead ofudisks
. It is basically do the same things, but syntax is more easier.The mount command is --
(in the case your targeted partition is
/dev/sda2
) Here,-b
is indicating that it is a block deviceTo enable executable permission ---
(Here
-o
indicating that following are options for udisksctl).You can access the man page of udisksctl with
man udisksctl
command or read it online here!The udisks command does the same thing as nautilus
It comes installed by default and doesn't require any changes to your system files.
just add something like:
to your startup list.
https://help.ubuntu.com/community/AutomaticallyMountPartitions#udisks
I think simply you can add your partition configuration to
/etc/fstab
as well.Basically get the partition name from command line either through
sudo blkid
orsudo fdisk -l
SO add to your/etc/fstab
withgksu gedit
The entry should look like this:
/dev/sd[ab]# /path_to/mount_point ntfs-3g defaults 0 0
where path to mount point may be something like
/home/YourUserName/Windows
. You may need tomkdir Windows
. Then you can access windows partition inWindows
folder inside yourHome
foldersimple - method is to install the pysdm package (in Gutsy) and then use System-Administration-Storage Device Manager without any manual editing of the fstab file, and disregard most of the instructions that follow.
check this site for any doubts
https://help.ubuntu.com/community/AutomaticallyMountPartitions
You could do this directly with the mount command.
Edit /etc/rc.local. This gets executed at startup after boot as root:
and put the mount code inside:
where $mount_at is the folder where you want to mount to, and $partition is the name of the partition. My windows partition is at "/dev/sda3" and not "/dev/sda1" because I have a Dell with other small system partitions. To check what is the name of your windows partition do:
which for me gives
So /dev/sda3 is the largest NTFS partition, probably the one you want.