1

I have two NTFS partitions that constitute a Windows 7 install. I am running Ubuntu and virtualize that Windows install off the physical disk. While the VM is working it could be disastrous if mount any of those partitions and make changes to them.

How do I prevent Ubuntu from mounting these partitions _at_all_?

Tried something along the lines of

/dev/sda none ntfs,ro 0 0 

in /etc/fstab but that just gave me an error..

Thanks!

3 Answers 3

2

You could try putting a space between ntfs and ro. And add a ,noauto to the ro (without a space before the comma.

Good luck!

1
  • Gosh was I that stupid... Indeed spacing it out and noauto works almost as good as I want it to. The only problem left is that I can still mount the drive via Nautilus and the FS is fully writeable. That's OK though, I have learned to be careful. :) Mar 13, 2012 at 14:37
0

I did it my way. It works only if you have an administrator account (who has installed the system), but work normally as an ordinary restricted user.

  1. Create a mount point in the private area of the admin.

    Login as the administrator.

    sudo -i  
    cd /media/ADMIN-NAME  
    mkdir Reserved
    

    I tried chmod 700 Reserved but it seemed to be overwritten after booting.

  2. In /etc/fstab add a line like:

    /dev/sda1 /media/ADMIN-NAME/Reserved ntfs -r 0 0
    

    where sda1 and ADMIN-NAME have to be adapted to your situation.

    That's it. As an administrator, you may test your fstab by:

    sudo mount -a   
    

    and a subsequent mount.

The administrator has access to the Windows partition for emergencies. The -r option in fstab should allow for read access only, but I preferred not to try.

A normal user gets an error message when he wants to access the partition. This remains true even if he has acquired access to another Windows partition (maybe for common data like photos, etc.).

0

This can be accomplished by blacklisting the NTFS kernel module.

Begin by typing the following into a terminal:

sudo -H gedit /etc/modprobe.d/blacklist.conf

At the bottom of the file, add the line:

blacklist ntfs

Save the file and restart your computer - you should now be unable to mount any NTFS partitions.

1
  • Is there anything more fine grained? Nov 17, 2011 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .