Ubuntu auto-mounts NTFS drives in Read-Only Mode

automountbootubuntu-10.04

I installed pysdm through this article to auto-mount my NTFS drives.

My drive structure looks like this:

jatin@jatin-ubuntu:/media$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda8              18G   12G  5.5G  68% /
none                  1.5G  344K  1.5G   1% /dev
none                  1.5G  216K  1.5G   1% /dev/shm
none                  1.5G   92K  1.5G   1% /var/run
none                  1.5G     0  1.5G   0% /var/lock
none                  1.5G     0  1.5G   0% /lib/init/rw
/dev/sda2              50G   50G  277M 100% /media/Jatin
/dev/sda3              49G   46G  2.9G  95% /media/Study
/dev/sda5              88G   83G  5.4G  94% /media/Fun
/dev/sda7              32G   32G  177M 100% /media/Masti
/home/jatin/.Private   18G   12G  5.5G  68% /home/jatin
/dev/sda1              59G   57G  2.4G  96% /media/Windows7

My pysdm settings as mentioned in the above article are as follows:

In the "assistant options for the NTFS-drives", the following options are checked:

  • The file system is mounted at boot time.
  • Mount file-system in only read-only mode.

I have two files: /etc/fstab and /etc/fstab.BAK with their contents as follows:
/etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc       /proc                proc  nodev,noexec,nosuid                0  0  
/dev/sda8  /                    ext4  errors=remount-ro                  0  1  
/dev/sda6  none                 swap  sw                                 0  0  
/dev/sda2  /media/Jatin         ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sda3  /media/Study         ntfs  nls=iso8859-1,umask=000            0  0  
/dev/sda5  /media/Fun           ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sda7  /media/Masti         ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sdc1  /media/sdc1          ntfs  nls=iso8859-1,ro,noauto,umask=000  0  0  

and /etc/fstab.BAK:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc       /proc                proc  nodev,noexec,nosuid                0  0  
/dev/sda8  /                    ext4  errors=remount-ro                  0  1  
/dev/sda6  none                 swap  sw                                 0  0  
/dev/sda2  /media/Jatin         ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sda3  /media/Study         ntfs  nls=iso8859-1,umask=000            0  0  
/dev/sda5  /media/Fun           ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sda7  /media/Masti         ntfs  nls=iso8859-1,ro,umask=000         0  0  
/dev/sdc1  /media/sdc1          ntfs  nls=iso8859-1,ro,noauto,umask=000  0  0  

Initially, I had mistakenly created Silver Spoon as the mount location for /dev/sda2 and
it was not booting Ubuntu, then I fixed the problems by changing the fstab file contents by booting it from a LiveCD and mounting the drive on /mnt/***.

NOW, PROBLEMS:

  1. When I look at the contents under /media, they are:

Fun Jatin Masti sda2 sda3 sda5 sda7 sdc1 Silver Silver Spoon
Study Windows7

with all the directories in GREEN and rest as normal. When I open Silver or Silver Spoon, nothing shows up.

  1. Some of my NTFS drives get auto-mounted in read-only Mode, while others get auto-mounted in correct (read-write) mode.

  2. When I try to open my external hard drive, it says only root can mount it and a user can't. I know this can be fixed by simply removing the line for /dev/sdc1 from the fstab files.

QUESTIONS:

  1. Are both these files important, fstab and fstab.BAK? Shouldn't just one be there?

  2. How can I get my system in its previous state, before I installed pysdm?

  3. When should I uninstall pysdm, before editing the fstab file or after?

UPDATE:

Thanks all for your answers. It solved my problems.
1. Now my NTFS drives are mounted in read-write mode as I wanted.
2. I deleted the extra folders Silver and 'Silver Spoon.
3. As of now, I am not un-installing
pysdm`, as everything's working fine except:

NEW PROBLEMS:

  1. The deleted folders keep on showing up, when I open the /media directory.

Fun Jatin Masti sda2 sda3 sda5 sda7 sdc1 Silver Silver Spoon Study Windows7

  1. The above folders, shown in bold show up with a green background, and the sub-directories in the same way, and the files in the sub-directories are shown with green text?

UPDATE 2

  1. The deleted folders problems is fixed, but the other problem is why do these sda1, sda3, sda5 etc. show up, along with the names. And when I try to open these folders, there is nothing in them. What is this?

  2. How can I get rid of this green color problem. It is a hell of a pain, reading through the folders name, trying to look out for something via terminal.

Any idea how to fix this?

Best Answer

To answer your questions in order:

  1. fstab is important, fstab.BAK is a backup file and is useful to know how the system was before a change but is not necessary to be kept.

  2. Linux lacks a feature like Windows System Restore which can revert system changes back to a time before you installed or changed things, the best you can do is get things into a state where you are happy with the system.
    I'm guessing that the "Silver" and "Silver Spoon" folders are no londer needed as you have said that you now have it mounted on "Jatin" instead. I would simply delete those folders.
    For each of the drives that you want to be read-write instead of read-only you need to get rid of the ro option, for example:

    /dev/sda2 /media/Jatin ntfs nls=iso8859-1,ro,umask=000 0 0

    Becomes

    /dev/sda2 /media/Jatin ntfs nls=iso8859-1,umask=000 0 0

  3. You should be able to uninstall PySDM at any time. I would be very surprised if it changed fstab as part of its uninstall.

Related Question