Skip to main content

boot - Ubuntu auto-mounts NTFS drives in Read-Only Mode


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).
#
#
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).
#
#
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-installingpysdm`, 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?



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.




Comments

Popular Posts

Use Google instead of Bing with Windows 10 search

I want to use Google Chrome and Google search instead of Bing when I search in Windows 10. Google Chrome is launched when I click on web, but it's Bing search. (My default search engine on Google and Edge is http://www.google.com ) I haven't found how to configure that. Someone can help me ? Answer There is no way to change the default in Cortana itself but you can redirect it in Chrome. You said that it opens the results in the Chrome browser but it used Bing search right? There's a Chrome extension now that will redirect Bing to Google, DuckDuckGo, or Yahoo , whichever you prefer. More information on that in the second link.

linux - Using an index to make grep faster?

I find myself grepping the same codebase over and over. While it works great, each command takes about 10 seconds, so I am thinking about ways to make it faster. So can grep use some sort of index? I understand an index probably won't help for complicated regexps, but I use mostly very simple patters. Does an indexer exist for this case? EDIT: I know about ctags and the like, but I would like to do full-text search. Answer what about cscope , does this match your shoes? Allows searching code for: all references to a symbol global definitions functions called by a function functions calling a function text string regular expression pattern a file files including a file

How do I transmit a single hexadecimal value serial data in PuTTY using an Alt code?

I am trying to sent a specific hexadecimal value across a serial COM port using PuTTY. Specifically, I want to send the hex codes 9C, B6, FC, and 8B. I have looked up the Alt codes for these and they are 156, 182, 252, and 139 respectively. However, whenever I input the Alt codes, a preceding hex value of C2 is sent before 9C, B6, and 8B so the values that are sent are C2 9C, C2 B6, and C2 8B. The value for FC is changed to C3 FC. Why are these values being placed before the hex value and why is FC being changed altogether? To me, it seems like there is a problem internally converting the Alt code to hex. Is there a way to directly input hex values without using Alt codes in PuTTY? Answer What you're seeing is just ordinary text character set conversion. As far as PuTTY is concerned, you are typing (and reading) text , not raw binary data, therefore it has to convert the text to bytes in whatever configured character set before sending it over the wire. In other words, when y...

linux - CentOs 7.1 - Install Tomcat 8

I am using this tutorial as a setup reference to getting a Tomcat 8 running on CentOs 7.1 , but after typing: [root@localhost tomcat]# sudo systemctl start tomcat I get the error: Job for tomcat.service failed. See 'systemctl status tomcat.service' and 'journalctl -xn' for details. systemctl status tomcat.service prints the following: [root@localhost tomcat]# systemctl status tomcat.service tomcat.service - Apache Tomcat Web Application Container Loaded: loaded (/etc/systemd/system/tomcat.service; disabled) Active: failed (Result: exit-code) since Wed 2015-11-25 16:54:33 CET; 1min 19s ago Process: 45873 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC) Nov 25 16:54:33 localhost.localdomain systemd[1]: Starting Apache Tomcat Web Application Container... Nov 25 16:54:33 localhost.localdomain systemd[1]: tomcat.service: control process exited, code=exited status=203 Nov 25 16:54:33 localhost.localdomain systemd[1]: Failed to start Apache Tomcat Web App...