Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

Installing

Installing Mntd (>=0.4.0)

Packages below should have been installed and got working (see Installing required packages).

Installing the GNU way

Configure
 ./configure --prefix=/usr --sysconfdir=/etc

Note:
If you encounter problems, activate debugging mode with --with-debug.
Compile
 make

Install

 make install

Start it

 mntd -d

Installing within gentoo linux

All steps have to be done as root user

Create a directory, where your own gentoo packages will be

 mkdir -p /usr/local/portage

Edit your /etc/make.conf and change the PORTDIR_OVERLAY line to

 PORTDIR_OVERLAY="/usr/local/portage"

Change to this directory

 cd /usr/local/portage

Unpack my gentoo package

 tar xvzf mntd-0.5.0-ebuild.tar.gz

Change now to the created directory

 cd sys-fs/mntd

Build the ebuild database and download the needed files

 ebuild $(pwd)/mntd-0.5.0.ebuild digest

Now emerge this package without solving dependencies, until dbus got marked as stable.

 ACCEPT_KEYWORDS="~x86" emerge -uO sys-fs/mntd

Installing required packages

First of all download all needed (see Downloads and Using Mntd) packages. Follow each packages instructions on installing.

Some hints will follow below. All installing have to be done as root user.

Installing kernel

Installing on 2.6.x

You should have successfully installed a kernel with hotplug and usb support. If your devices and drivers and not loaded and you cannot mount them manually, then Mntd will not work either.

You will at least want to activate these options:

 CONFIG_HOTPLUG=y
 CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_UHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DEVFS_FS=y
 CONFIG_DEVFS_MOUNT=y

Some more can be nessessary for your configuration, e.g some kind of digital camera support or some exotic usb storage drivers.

Note:
If you have problems loading und unloading the USB kernel modules, try to configure them as builtin ('y'), as I have done :-) The kernel seems to be buggy regarding loading/unloading usb kernel modules.

Installing on 2.4.x

You should have successfully installed a kernel with hotplug and usb support. If your devices and drivers and not loaded and you cannot mount them manually, then Mntd will not work either.

You will at least want to activate these options:

 CONFIG_HOTPLUG=y
 CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_UHCI=y or CONFIG_USB_UHCI_ALT=y
 CONFIG_USB_OHCI=y
 CONFIG_USB_STORAGE=y
 CONFIG_DEVFS_FS=y
 CONFIG_DEVFS_MOUNT=y

Some more can be nessessary for your configuration, e.g some kind of digital camera support or some exotic usb storage drivers.

Installing dbus

D-BUS is a message bus system, a simple way for applications to talk to one another.

See http://www.freedesktop.org/Software/dbus for details. Install it and run the dbus-daemon-1 as system dbus.

Start it with

 dbus-daemon-1 --system

Check if it is running

 ps ax | grep dbus | grep -v grep

If you see something like this, it's good.

 7237 ?        S      0:00 /usr/bin/dbus-daemon-1 --system

Installing dbus manually

See http://www.freedesktop.org/Software/dbus for details or look at the README file in distribution.

Installing dbus within gentoo linux

Check for dependencies:
 emerge -p dbus

If you see others than dbus package, try to install them as well. You could have seen one or more these:

 dev-libs/glib
 dev-libs/libxml2
 dev-libs/expat
 x11-libs/qt
 x11-libs/gtk+
 dev-lang/python
 dev-python/pyrex

Install each of them:

 emerge -u <package name>

Now try to install dbus again:

 emerge -u dbus

Installing devfsd

Devfsd provides configurable management of device nodes using the Linux Device Filesystem. See the kernel patches for the Device Filesystem itself.

Note:
Most distributions (all I know) use the devfs at the moment. So normally you have to do nothing for this package to work. So please try it first with the distributions installation. They have patches applied, you perhaps don't even known about.

Is devfs mounted ?

Check, if devfs is mounted.
 ll /dev/.devfsd

If you see something like this, it's good.

 crw-------  1 root root 253, 0 Jan  1  1970 /dev/.devfsd

Otherwise mount it

 mount -t devfs none /dev

Is devfsd running ?

Check if it is running
 ps ax | grep devfsd | grep -v grep

If you see something like this, it's good.

 895 ?        S      0:00 /sbin/devfsd /dev

Otherwise start it

 devfsd /dev

Configure devfsd for mntd

You have to append some lines in devfsd.conf (Remove each '\' and write each REGISTER/UNREGISTER on a single line).
 ### ADDED by mntd
REGISTER   ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc add $mntpnt/$devname
CHANGE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc add $mntpnt/$devname
CREATE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc add $mntpnt/$devname
LOOKUP     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc add $mntpnt/$devname
UNREGISTER ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc remove $mntpnt/$devname
DELETE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/disc$ \
   EXECUTE <prefix>/sbin/mntsend disc remove $mntpnt/$devname

REGISTER   ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block add $mntpnt/$devname
CHANGE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block add $mntpnt/$devname
CREATE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block add $mntpnt/$devname
LOOKUP     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block add $mntpnt/$devname
UNREGISTER ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block remove $mntpnt/$devname
DELETE     ^scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/part[0-9]+$ \
   EXECUTE <prefix>/sbin/mntsend block remove $mntpnt/$devname
### END of mntd

Note:
Change the path to mntsend according to your ./configure options (--prefix) for mntd.

Installing manually

Compile
 make

Install

 make install

Start it

 devfsd /dev

Note:
You should use your destributions devfs package. They apply patches for you, that you will need.

Installing devfs within gentoo linux

Standard gentoo install
 emerge devfsd

Note:
For more information see http://www.gentoo.org/doc/en/devfs-guide.xml.

Installing udev

Linux dynamic and persistent device naming support (aka userspace devfs). For more read http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ. You will need to install kernel 2.6 for udev.

Note:
Devfsd is marked deprecated. It will be replaced by udev in near future.

Is udev running ?

Check, if udev is mounted.
 ll /dev/.udev

If you see something like this, it's good.

 crw-------  1 root root 253, 0 Jan  1  1970 /dev/.udev

Is udevd running ?

Check if it is running
 ps ax | grep udevd | grep -v grep

If you see something like this, it's good.

 901 ?        S      0:00 /sbin/udevd

Otherwise start it

 udevd &

Is sysfs (/sys) mounted ?

Check if it is mounted
 mount | grep sysfs | grep -v grep

If you see something like this, it's good.

 none on /sys type sysfs (rw)

Otherwise mount it

 mkdir -p /sys
 mount -t sysfs none /sys

Configure udevd for mntd

Install link to mntudev callback binary. Udevd will call all executables there, when corresponding block event is raised. This is the way mntd gets the information of added or removed devices.
 mkdir -p /etc/dev.d/block
 ln -sf <prefix>/sbin/mntudev /etc/dev.d/block/mntudev.dev

Installing the GNU way

Configure
 ./configure --prefix=/usr --sysconfdir=/etc

Note:
If you encounter problems, activate debugging mode with --with-debug.
Compile
 make udevdir="/dev/"

Install

 make udevdir="/dev/" install

It will be started by hotplug event automatically, but can be started manually, too.

 udevd &

Installing udev within gentoo linux

Standard gentoo install
 emerge udev

It will be started by hotplug event automatically, but can be started manually, too.

 udevd &

Note:
For more information see http://www.gentoo.org/doc/en/udev-guide.xml.

Generated on Wed Mar 30 13:43:27 2005 for Mntd by  doxygen 1.3.9.1