FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How can I mount my usb drive to be read only. I´ve been going through various documentation and it is a bit confusing, dont know if it is because fedora 16 does things differently or what. Where I am now is that I think its my fstab file I have to configure but the options in it are all set to defaults. The default is r/w. And even though my usb drive mounts automatically it dosnt add an entry to fstab instead it is set in something called by-label.
The reason why im doing this is because im configuring aide and my aide.conf file is going to be on this usb drive as my database.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Mounting removable drives (USB, CD) to /media/DEVICENAME is managed by gnome-volume-manager. Look for its documentation. You can disable that manager and mount from command line when standard /etc/fstab works.
Adding an entry in /etc/fstab, the system should obey the mount options and mount location, even when automounting. Use the UUID value in the first device field. Use the noauto option to allow the system to boot up without the drive being present.
Try first letting it automount. Base the fstab entry on the current mtab entry, or mount command output.
Here is an example from my fstab:
Error
Unable to mount PENDRIVE
Error mounting: mount exited with exit code 1: helper failed with:
[mntent] line 1 in /etc/fstab is bad
mount: mount point /media/PENDRIVE does not exist
It means directory /media/PENDRIVE doesn't exist. Create it using command 'mkdir /media/PENDRIVE'. I don't know if mount command can create empty directory (mountpoint) itself.
It would be better to use the UUID since you don't know which device will be used. Also, you want your options to apply to a particular filesystem, not any USB drive.
It would be better to use the UUID since you don't know which device will be used. Also, you want your options to apply to a particular filesystem, not any USB drive.
It hasn't worked with the traditional methods, so I guess there is no way around gnome-volume-manager, it seems it overwrites what I've done so far.
I guess I need to dig the net for some instructions on usage..... :-(
Mounting removable drives (USB, CD) to /media/DEVICENAME is managed by gnome-volume-manager. Look for its documentation. You can disable that manager and mount from command line when standard /etc/fstab works.
As I understand it the gnome-volume-manager manages tweaks for all kinds of programs, so if I disable it to manage mounting manually it will disable the settings for everything else it manages.
Adding an entry in /etc/fstab, the system should obey the mount options and mount location, even when automounting. Use the UUID value in the first device field. Use the noauto option to allow the system to boot up without the drive being present.
Try first letting it automount. Base the fstab entry on the current mtab entry, or mount command output.
Here is an example from my fstab:
It is for an sdcard. I added some options I wanted to what was present already in /etc/mtab.
It got all mixed up, it was working but then I had problems, in Nautilus it couldnt un-mount and the Folders where both named PENDRIVE instead of PENDRIVE & usb1. And it would auto-mount still and ignore my options in fstab.
I think it has something to with that gnome-volume-manager thinks it owns the /media mountpoint so I've changed it to /mnt. It seems to work but I'l give it some days to see before I believe it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.