0. If you have the partition in fstab, the computer will try to mount it when booting, and it will be mounted by root (superuser). If you want it to automount afterwards (when you are already logged in), you should not have it in fstab. (I have an external (eSATA) drive in fstab with the option noauto. I do not want to mount it at boot, because it is seldom used. But I want to mount it afterwards, and then can I mount it either manually with sudo mount, or with a 'home-made' kdialog GUI, that can mount and unmount drives.)
Originally Posted by davesmith
1. I want other external drives (USB and eSATA) to automount, so they are not in fstab. This is the case for USB HDDs, flash sticks and flash cards in a card reader, camera as well as mobile phone. These will be automounted in the desktop versions of Ubuntu.
- I understand that you have upgraded to Ubuntu 11.10. Is it the 'vanilla' flavour with Unity or gnome 3? Is the file browser Nautilus working? Did it automount this USB HDD before, but not now? Does it work if you boot from a live CD or USB drive?
- If you 'comment away' the drive from fstab (typing # in the first position of the line) and reboot:
What happens if you unmount (if mounted), disconnect the USB HDD from USB, then shut of the power (if power connection), wait for 10 seconds, then reconnect the power and finally reconnect it to a USB port? It should automount, otherwise I think there is something wrong with your current version of Ubuntu, and until that is fixed, you might need to use the manual mounting.
But it can be more convenient using an alias for example provided you have created a directory /media/sdb1. Try with and without sudo, maybe it will be better to mount as the normal user.
but it is better to use the UUID, because the drive may not always be assigned to /dev/sdb1. You find the UUID with the command and you should use that string without the quotes "5921-6A05" like this (your UUID will be different).
alias msdb1='sudo mount -t ntfs-3g /dev/sdb1 /media/sdb1'
alias msdb1='sudo mount -U 5921-6A05 -t ntfs-3g /media/sdb1'
So use the command msdb1 (or select another unique name if you prefer to mount the drive!
alias msdb1='sudo mount -U 5921-6A05 -t auto /media/sdb1'
Edit: using the alias command in a terminal lasts only until the terminal is closed, but if you enter the command into ~/.bashrc (at the other aliases) it will be part of the environment for all future terminal windows.