# automount [SOLVED]

## senzacionale

I hope you undesrtand what i want. How to make that when useb key and cdrom are plugged they are automaticaly mount and icons are shown in desktop (kde or gnome)

What i must do for that?

Thnx

----------

## cokey

http://www.gentoo.org/doc/en/udev-guide.xml

http://www.reactivated.net/writing_udev_rules.html

those should give you a bit of a help. Make sure you have udev and hotplug all done correctly

----------

## Ctrl+Alt+Del

edit: damnit Cokehabit beat me to it  :Smile: 

----------

## StaraDama

this is very interesting for me too. So this howto is ok

http://www.gentoo.org/doc/en/udev-guide.xml

if i use it then i will have automatically mount in gnome and kde?

----------

## StaraDama

General setup --->

  [*] Support for hot-pluggable devices

i don'thave this options to use. I have --- infornt of Support for hot-pluggable devices

what i can do now?

I use 2.6.12-rc6-love1 sources kernel

What about /etc/fstab

i don't need to add anything in it that this automount will work?

----------

## lbrtuk

This shouldn't need much manual configuration at all. You should really not have to write any udev rules.

You should be able to get this working by simply having the and hal USE flag set when emerging kde (or gnome) and make sure dbus and hald are running.

----------

## StaraDama

dbus and hald are running and this is my make.conf

```

CFLAGS="-O2 -march=pentium3 -msse2 -fomit-frame-pointer -pipe"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

USE="-gnome gtk gtk2 qt kde dvd alsa cups pam python xml xml2 acl X java mpeg cdr bcmath berkdb bzlib calendar

cpdflib crypt ctype curl curlwrappers dba dbase dbx dio exif fam flatfile ftp gd gdbm gmp iconv imap inifile jpeg kerberos ldap mcve memlimit mhash mime mssql mysql

ncurses nls odbc pcntl pcre png posix postgres readline sasl session sharedext simplexml soap sockets spell spl ssl

sysvipc tidy tiff tokenizer truetype xml2 xmlrpc xpm xsl zlib apache2 ssl threads oav readline oggvorbis perl png spell truetype xvid xmms wxwindows yahoo msn usb tcltk sd$quicktime opengl artsmakesuid flac alsawrappersuid network nas mmx mmx2 mmxext samba live fbcon dvdread divx4linux

tga sse sse2 ggi rtc libcaca bigger-fonts screenshot bash-completion mozsvg cscope ncurses win32codecs xanim xvmc

cap maildir pcre commercial pcmcia server svg mng mono gd dba libgd pic server aac aalib custom-cflags berkdb innodb

readline tcpd hal"

LINGUAS="sl"

# SYNC="rsync://rsync16.de.gentoo.org/gentoo-merged"

PORTDIR_OVERLAY="/usr/local/portage"

```

is it ok now that i just reemerge gnome with emerge gnome. Will then this works?

Thnx

----------

## StaraDama

is ok like this?

----------

## senzacionale

doesn't want to aoutomount usb stick or cd/dvd rom

Can someone hel me with this?

----------

## senzacionale

i read

http://gentoo-wiki.com/HOWTO_Submount

and

http://de.gentoo-wiki.com/HOWTO_Automatisches_Mounten

after

```

mount -a

```

only CD or DVD are mounted and icons is shown. Usb stick is mounted but no image is shown

this is fstab for usb stick

```

/dev/sda           /mnt/usbstick           subfs    fs=auto,rw,noatime,sync     0 0

```

why only when i write mount -a cd rom is mounted and not just when i put it in?

----------

## senzacionale

solved

this is my fstab that works now!

```

# This file is edited by fstab-sync - see 'man fstab-sync' for details

# /etc/fstab: static file system information.

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.18.4.1 2005/01/31 23:05:14 vapier Exp $

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# See the manpage fstab(5) for more information.

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda5               /boot           ext2            defaults,noatime        1 2

/dev/hda7               /               ext3            noatime         0 1

/dev/hda6               none            swap            sw              0 0

#/dev/hdc                /mnt/cdrom              subfs    fs=auto,ro,noatime,sync,users         0 0

#/dev/sda                /mnt/usbstick           subfs    fs=auto,rw,noatime,sync,users     0 0

/dev/hdc                /mnt/cdrom      udf,iso9660 user,noauto         0 0

#/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro      0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

#Windows particije

/dev/hda1               /mnt/Windows            ntfs    ro,defaults,umask=0222   0 0

```

----------

