Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hey SuperUsers, 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.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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:

/dev/sda1       /mnt/windows   ntfs  ro,umask=0222,defaults 0 0

You have to create a directory called windows first.

mkdir /mnt/windows

If you want to mount the partition after boot and not be logged in as root, use this:

/dev/sda1  /mnt/windows   ntfs  user,ro,umask=0222,defaults 0 0

To mount a specific Windows directory as read and write, use ntfs-3g or fuse-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 (substituting fuse-ntfs-3g for ntfs-3g or whatever current kernel module you have installed):

/mnt/windows/Users/David/Documents  /home/David/Documents  ntfs-3g  rbind,user,umask=0222,defaults 0 0

rbind is what remounts an already location to another. For a more detailed explanation of other options in the comma separated list, type info ntfs-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, and ntfsconfig. 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 your fstab 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:

/media/Windows\0407/Users/David/Documents  /home/David/Documents  ntfs-3g  rbind,nosuid,user,umask=0222  0  0

I hope this helps.

share|improve this answer
    
10x Man!!! Cool stuff - appreciate you taking the time to answer. I'm sure it'll also help others. Cheers :) –  David דוד Nov 22 '12 at 23:54
add comment

As far as I have tried, you can only mount the entire partition. However you can then make a symlink to the folder of choice and save it as a favorite or display it on your desktop or home directory.

check out this link on how to do this mount ntfs partition

or check this link generic ntfs mount instructions

How to create a symlink

open terminal and sudo

ln -s [TARGET DIRECTORY OR FILE] ./[SHORTCUT]

For example: ln -s /usr/local/apache/logs ./logs

This points a symbolic link "./logs" to "/usr/local/apache/logs"

automount = basic gui instructions

or edit the fstab file see this. personally you shoudl use the gui instructions cause this updates the fstab file

share|improve this answer
    
so how do I automount them now? –  David דוד Feb 28 '11 at 21:36
    
@David, apended original instructions for automount –  IanN Feb 28 '11 at 21:43
    
come to think of it you can perform all actions throught the gui in Ubuntu and OpenSUSE –  IanN Feb 28 '11 at 21:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.