Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Previously, I prevented auto-mounting of a particular partition at boot by the following line in /etc/fstab

UUID=<alphanumeric> /media/windowsHDD ntfs user,noauto 0 0

At some point in the last year, this failed, and the partition was automatically mounted on boot. I attempted the following, which also failed.

/dev/sda1 /media/windowsHDD ntfs user,noauto 0 0

Thinking that perhaps I was bitten by this bug, I removed user, but that also failed.

UUID=<alphanumeric> /media/windowsHDD ntfs noauto 0 0

Is there a way to prevent auto-mounting in fstab?

share|improve this question
    
@Jobin I'll try commenting out the entire line. Oddly enough, another noauto entry in there still works /dev/sdb1 /media/3030-3030/ vfat user,noauto 0 0. –  Sparhawk Feb 16 at 10:30
    
In the bug report that you mentioned yourself, people suggest to use another mountpoint than one inside /media. This folder may get treated in a special way by Ubuntu, and some automount mechanism may mount it even though your /etc/fstab says otherwise. Suggestion: move the mountpoint to somewhere else (/mnt/windowsHDD or whatever) and try again. Don't forget to create the directory that you specify as mount point. –  Malte Skoruppa Feb 16 at 12:00
    
@MalteSkoruppa I tried changing the mountpoint to /mnt/windowsHDD. I forgot to create the directory (and I don't want it to automount anyway), but upon restart it was created and mounted there. –  Sparhawk Feb 18 at 5:55
    
@Jobin commenting out the entire line results in automatic mounting at /media/sparhawk/windowsHDD. Oddly enough, when I do specify the location to mount in fstab, the files are marked green with ls -l. However, when I comment everything out, they are just a normal colour. –  Sparhawk Feb 18 at 5:57

1 Answer 1

Try addind this to /etc/fstab. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

/dev/sdaX /media/external-noauto ext4 user,noauto 0 0

Or you can use PySDM

Make sure you replace X with your device ID.

share|improve this answer
    
Instead of noauto, what if the line is commented? –  i08in Feb 16 at 10:18
    
@Mitch Are you saying to add that line to fstab? Your second and third sentences suggest to run it as a command. Also, it seems like it's essentially identical to my original line, except it's ext4 when my disk is really ntfs. I want to be able to mount it at the listed location if needed, just not automatically. –  Sparhawk Feb 16 at 10:22
    
@Jobin I'll reply in the main comments below my question. –  Sparhawk Feb 16 at 10:29
    
Add to fstab, will disable auto mounting. It's slightly different than your original, where you have to add noauto after the drives name. /dev/sdaX /media/external-noauto ntfs user,noauto 0 0 Let me know. –  Mitch Feb 16 at 10:38
    
That didn't work either. Upon restart, the partition automatically mounted at /media/external-noauto instead. –  Sparhawk Feb 18 at 5:53

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.