Tag Info

Hot answers tagged

8

The mount(8) man page has a section dedicated to this; in short, it comes down to adding the user or users option for that mount in /etc/fstab: The non-superuser mounts. Normally, only the superuser can mount filesystems. However, when fstab contains the user option on a line, anybody can mount the corresponding system. Thus, given a line ...


8

Mount the NFS-share on the clients using the mount-options "bg,intr,hard". Most important in your case is "bg" for background - which tells the system not to block when the server is not available. "intr" for interrruptable - so you can kill hanging mounts on the client with the kill command. "hard" is the opposite of "soft". The difference is that "hard" ...


7

It looks like the man page snippets you quoted refer to the basic level of security that standard file ownership and permissions provide. The configuration file /etc/fstab is readable by any user on the system. A safer place to store sensitive information would be a file with permissions allowing to be read only by the owner. I understand that in your case, ...


7

What you're looking for is AutoFS. Install the RPM, then make sure that it's running at start(RH/etc: chkconfig autofs on). Edit the file /etc/auto.master and add the following line: /media/ /etc/auto.media. If I were you, I would change "media" in both places to be the name of your root-level directory. Then edit the file /etc/auto.media and add ...


6

One possibility is to add your own udev rule for this partition, that overrides the default ones. On Ubuntu 10.04 /lib/udev/rules.d/80-udisks.rules has some default rules that make udisks ignore some partitions (e.g. partitions that are known to be rescue partitions etc.) which might be an inspiration... On Ubuntu 10.04 your own rules should go into ...


6

Mounting a filesystem does not require superuser privileges under certain conditions, typically that the entry for the filesystem in /etc/fstab contains a flag that permits unprivileged users to mount it, typically user. To allow unprivileged users to mount a CIFS share (but not automount it), you would add something like the following to /etc/fstab: ...


5

bind mirrors a filesystem (among other situatons, it's useful when setting a chroot inside which you need to have a "complete" system (like when unpacking/installing Gentoo). Just simply like that, it mirrors a tree from A into B. I don't know for sure if it has any option, but I doubt it, it does not do more than, well, mirroring. Unlike a symlink, which ...


5

udev outputs logging information to /var/log/messages, but by default it only logs errors, and it happens you've constructed a command that doesn't do what you want, but also doesn't error out. The >> redirection is handled by your shell, and udev doesn't run the command through a shell, so it's literally running the binary /bin/echo and passing it the ...


4

mount (1) requires a mount point to exist in order to mount something. So, if /mnt/subdir1 doesn't exist an attempt to mount something there will fail. I was not aware that you could mount over a mount point that is mounted from NFS, although you can do it with other file systems (e.g. you can mount /usr under / and /usr/local under /usr, so I guess that ...


4

When a new device appears, udev is notified. It normally creates a device file under /dev based on built-in rules¹. You can override these rules to change the device file location or run an arbitrary program. Here is a sample such udev rule: KERNEL=="sd*", ATTRS{vendor}=="Yoyodine", ATTRS{serial}=="123456789", NAME="keepass/s%n", ...


4

You can do this through the file /etc/fstab. Take a look at this link. This tutorial also has good details. Example steps First you need to find out the UUID of the hard drives. You can use the command blkid for this. For example: % sudo blkid /dev/sda1: TYPE="ntfs" UUID="A0F0582EF0580CC2" /dev/sda2: UUID="8c2da865-13f4-47a2-9c92-2f31738469e8" ...


4

You can use \x20 for space. That is hex value for ASCII (and utf-8 encoded) space. Or you can use the octal variant \040. So that would be (in fstab): UUID=01CD72098BB21B70 /media/tusharmakkar08/Local\x20Disk1 # or UUID=01CD72098BB21B70 /media/tusharmakkar08/Local\040Disk1 If you are not to familiar with ASCII fun install ascii and: ascii # ...


3

Automounting in a Fedora installation with Gnome as the desktop environment is done by nautilus. You can turn this feature on / off by tweaking the key /apps/nautilus/preferences/media_automount in gconf-editor. However, I don't think it is configurable. In the olden times, this was done by gnome-volume-manager which called gnome-mount. There you could tweak ...


3

I don't belive that the thunar automount is configurable to ignore special devices (I'm not for 100% sure...). Anyway in my point of view, mounting filesystems is not the job of an application, it should be the job of the operating system. You could disable thunars automount feature and use udev and autofs. With udev rules you can recoginze your devices ...


3

I tried to do this on my computer and it's work :) First I get a name for my device : ls -l /proc/disk/by-id/ In my case it is /proc/disk/by-id/usb-09a6_8001 I added this line in /etc/fstab : /dev/disk/by-id/usb-09a6_8001 /media/macle ext2 ro,users 0 2 And it's working, when I plug my usbkey, it's mounted ro and owned by my user.


3

You could try an alternate approach, which is to recognize your device at the udev level and use /dev/mybook-partition in /etc/fstab. Put something like the following in /etc/udev/rules.d/dwilliams.rules: KERNEL=="sd*", PROGRAM=="/sbin/blkid %N", RESULT=="C252-9CA3", SYMLINK+="mybook-partition" The section on Auto mounting USB devices in the Arch wiki for ...


3

This is all feasible with udev. Have a look at UAM, which seems to address most of the issues you've mentioned, but actually does mount automatically. If you like, you could make use of the great capabilities it provides, but modify it so that the media are not mounted automatically. You could also contact the author and suggest your non-automatic mounting ...


3

There are many ways to check if a particular directory is a mount point, for example (under Linux) checking in the mount point list if ! </proc/mounts awk '$2 == "/mount/point" {exit(0)} END {exit(1)}'; then mount /mount/point fi or (portably) checking whether the path's filesystem's mount point is itself if ! df -P /mount/point | grep -q ...


3

I think you're looking for pmount. If you want automatic mounting upon insertion, see Automounting USB sticks on Debian. The program that reacts when a new device appears is udev, so automatic mounted is triggered by a udev rule. The usbmount package provides udev rules to automatically mount USB storage devices and a few others. You cannot automatically ...


3

The /etc/auto.master file is not the place to set the remote NFS directory path. /etc/auto.master expects to be given a map file or directory. From the auto.master man page: The auto.master map is consulted to set up automount managed mount points when the autofs(8) script is invoked or the automount(8) program is run. Each line describes a ...


3

As others have commented I don't believe this is possible in runlevel3. The application in question under GNOME 2.x is called gnome-volume-manager. You can reconfigure it a bit using gnome-volume-properties. screenshot              Given you're in runlevel 3 I don't believe this is an option. You ...


2

You can check what is mounted by issuing a plain mount command. It also tells you the "source device" of each mount point. If you use the devices in /dev/disk/by-id to mount your NTFS volume, then you'll have a fixed name you can check against in scripts, as opposed to the /dev/sd* names that can change between reboots and drive connect events. So ...


2

The disk-based features of HAL were replaced by udev and udisks. There is a full example of how to use udev to do this on the Automounting UDisks wrappers page: /etc/udev/rules.d/11-media-by-label-auto-mount.rules KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end" # Import FS infos IMPORT{program}="/sbin/blkid -o udev -p %N" # Get a label if ...


2

NFS seems to be a pain no matter what OS distribution you use. I've similar troubles on Debian with mounting on boot hanging for various periods of time (and that's without NetworkManager). Now I automount my filesystems with autofs, just with simple direct mounts. I use autofs5 (the latest experimental branch, but I have no problems), but there's also ...


2

I've fixed this now. Firstly, I didn't install squeeze with the default GNOME desktop environment. I mis-remembered. What I did was install the base system, and then install the gnome-desktop-environment package, aiming for a lighter/closer-to-upstream set of packages. Now, completely unscientifically, I did two things in one go to fix this, so I don't ...


2

You can do it with udev rules. I don't have ubuntu, but you can try this. Create a file called /etc/udev/rules.d/99-hide.rules with the following in it: SUBSYSTEM=="usb_device", ATTR{idVentor}=="<VENDID>", ATTR{idProduct}=="<DRIVECODE>",ENV{UDISKS_PRESENTATION_HIDE}:="1" Where you have to substitute your usb storage device's vendor and ...


2

If you don't want to use hal, you could use a udev rule to automount your drives. The Arch Wiki has a good article on rules here: https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices You could also look at using something like udiskie (it's in the AUR): https://wiki.archlinux.org/index.php/Udiskie There is also a script for integrating ...


2

Personally I would go the autofs-route. But as you stated autofs might be broken on Lucid (I'm not an Ubuntu-User). You could also try udev-wrappers or rules. The Arch Linux wiki has something on that. https://wiki.archlinux.org/index.php/Udev#UDisks


2

Make sure you have a USB kernel module loaded using kldload or compile the module into the kernel using the kernel config script in /usr/src/sys/<type>/conf. I'm not sure if FreeNAS can be compiled with a USB module, but I'd assume so. then do mount -t <filesystem_type> /dev/usb /<some_dir>


2

There is one other solution on how you can do it. You can create a file in the NTFS file system and then check if this file exists. In your case the other solutions are probably better. But if you need to check if a NFS or SMB file system is mounted it is sometimes better to check for a file because you want to be sure that it is not only mounted but as well ...



Only top voted, non community-wiki answers of a minimum length are eligible