I have Linux mount question.
I have a dual-boot Win7/Linux machine.
My main OS is Windows, and that's where most of my work lives.
Generally all work done under Linux, is to be migrated for further Win usage.
I would therefore like to mount my NTFS partitions onto my Linux OS.
However, I wish to protect me from me.
I would like to (say) mount my Win-Desktop folder, as a device of its own, without mounting the whole relevant drive.
Is it possible?
Further more, if it's not possible, I at-least want the drive to be mounted without being visible on the Linux desktop, and just have the Win-Desktop folder visibly mounted.
I would appreciate any comment, or past expiriance.
Best Answer
I realize this question is almost two years old, but I answer it for those who find this in search and need the answer.
First, mount your Windows partition as read-only. If your Windows partition is the first partition on your first hard drive add this to the file
/etc/fstab
:You have to create a directory called windows first.
If you want to mount the partition after boot and not be logged in as root, use this:
To mount a specific Windows directory as read and write, use
ntfs-3g
orfuse-ntfs-3g
. Most people will want to mount their Documents, so I will use this use example. If you are user David on Windows and david on Linux, use this (substitutingfuse-ntfs-3g
forntfs-3g
or whatever current kernel module you have installed):rbind
is what remounts an already location to another. For a more detailed explanation of other options in the comma separated list, type infontfs-3g
in a command console. The Documents directory in Linux must exist and should be empty. This line must be after the line that mounts the Windows partition.This is for Windows Vista and 7. If you have Windows XP, use
/mnt/windows/"Documents and Settings"/David/Documents
. The quotations are important because mount cannot accept spaces in the directory name even though Linux has no problems with spaces in directories.If you don't have a kernel module that can mount NTFS as read and write, you need to install one.
Ubuntu comes with
ntfs-3g
,automount
, andntfsconfig
. Any currently connected partition should be automatically detected and set up to be mounted automatically. Ubuntu also mounts nonnative partitions like Windows under/media
instead, usually with the name of the operating system, so your Windows 7 partition is mounted at/media/Windows 7
. You will find yourfstab
entry uses unicode strings for special characters so that the line says/media/Windows\0407
, where\040
is substituted for the space without the need for quotes.To mount David's Windows 7 documents in david's Linux home directory in Ubuntu, put this in
/etc/fstab
:I hope this helps.