Thank you for your help. I've included the requested information and an
update below.
On Thu, 16 Jan 2003 19:33:47 +0300
Borzenkov Andrey <Andrey.Borzenkov@xxxxxxxxxxx> wrote:
>
> Please show /etc/devfsd.conf, /etc/modules.devfs, explain how and when
> devfsd is loaded in Gentoo and show dmesg output for the case /dev/st
> does not appear.
Gentoo is a distro that uses a superset of the BDS ports system instead
of rpms. It has to have devfs and boots with it - I have to select the
option in menuconfig to include devfs and boot with it when building a
kernel or it warns me that it's not there. From this I conclude devfs
is started during the boot.
Okay, I set out to do build a kernel that would show the case where
/dev/st did not appear. The system I was on had the kernel built with st
as a module. I then built another kernel with NO modules for st (sg is
built in also). This time it found them all (dmesg excerpt below). I
must have messed something up on the kernel I built before with st and
sg built in. Let me work with this kernelfor a while and see what
happens.
Now, where does /etc/modules.conf fit into the devfs scheme - what is it
used for? I thought that was only
for modules yet it's included in /etc/modules.devfs?
If I create some symlinks such as
ln -s /dev/tape0 /dev/st/c1b0t0u0m0
ln -s /dev/tape0 /dev/st/c1b0t0u0m0n
ls -s /dev/sg/dev/auto_changer0 /dev/sg/c1b0t1u0
do I have to do anything to make them be restored on the next system
reboot? According to my /etc/devfsd.conf (see below) it should, if I
understand it, copy all the devices and restore them next time -
correct?
And when do I modify /etc/devfsd.conf - or do I ever. I understand I
need to modify it for the cdrw but what else would I have to do with it
as it seems setup to cover everything necessary?
I'm including /etc/devfsd.conf, /etc/modules.devfs, and a portion of
dmesg.
******
My /etc/devfsd.conf
# Sample /etc/devfsd.conf configuration file.
# Richard Gooch <rgooch@xxxxxxxxxxxxx> 3-JUL-2000
#
# The Gentoo Linux Team - http://www.gentoo.org/
# - Many fixes, etc
#
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/devfsd.conf,v 1.13
2002/12/01
08:52:55 azarah Exp $
# Enable full compatibility mode for old device names. You may comment
these
# out if you don't use the old device names. Make sure you know what
you're
# doing!
REGISTER .* MKOLDCOMPAT
UNREGISTER .* RMOLDCOMPAT
# You may comment out the above and uncomment the following if you've
# configured your system to use the original "new" devfs names or the
really
# new names
#REGISTER vc/.* MKOLDCOMPAT
#UNREGISTER vc/.* RMOLDCOMPAT
#REGISTER pty/.* MKOLDCOMPAT
#UNREGISTER pty/.* RMOLDCOMPAT
#REGISTER misc MKOLDCOMPAT
#UNREGISTER misc RMOLDCOMPAT
# You may comment these out if you don't use the original "new" names
REGISTER .* MKNEWCOMPAT
UNREGISTER .* RMNEWCOMPAT
# Enable module autoloading. You may comment this out if you don't use
# autoloading
LOOKUP .* MODLOAD
# Uncomment the following if you want to set the group to "tty" for the
# pseudo-tty devices. This is necessary so that mesg(1) can later be
used to
# enable/disable talk requests and wall(1) messages.
REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
REGISTER ^pts/.* PERMISSIONS -1.tty 0600
# Uncomment this if you want permissions to be saved and restored
# NB: Do NOT change the following!
# Do not do this for pseudo-terminal devices
REGISTER ^pt[sy]/.* IGNORE
CHANGE ^pt[sy]/.* IGNORE
CREATE ^pt[sy]/.* IGNORE
DELETE ^pt[sy] IGNORE
REGISTER .* COPY /lib/dev-state/$devname $devpath
CHANGE .* COPY $devpath /lib/dev-state/$devname
CREATE .* COPY $devpath /lib/dev-state/$devname
DELETE .* CFUNCTION GLOBAL unlink
/lib/dev-state/$devname
RESTORE /lib/dev-state
# You can force default like this :
# PERMISSIONS owner_and_group access_mode
# Video4Linux devices
REGISTER v4l/.* PERMISSIONS root.video 660
# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP snd MODLOAD ACTION snd
LOOKUP dsp MODLOAD
LOOKUP mixer MODLOAD
LOOKUP midi MODLOAD
REGISTER sound/.* PERMISSIONS root.audio 660
REGISTER snd/.* PERMISSIONS root.audio 660
# Uncomment this to let PAM manage devfs
#REGISTER .* CFUNCTION
/lib/security/pam_console_apply_devfsd.s
o pam_console_apply_single $devpath
# Autoload the sg module if generic scsi driver compiled as module.
#LOOKUP ^sg$ MODLOAD ACTION sg
# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)
REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS
root.cd
rw 660
# General note for the following auto creation of symlinks:
#
# If you change the device that the symlink points to,
# you should also remove the symlink before restarting
# devfsd
# Create /dev/cdrom for the first cdrom drive
LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink
cdroms/cdrom0 cdrom
REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname
cdrom
UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
# NOTE: We add the fully qualified path here, else some apps
# have problems to resolve the true device (drip comes to mind)
LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink
${mntpnt}/cdroms/cdro
m1 dvd
REGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL mksymlink ${devpath}
dvd
UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd
# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER ^sg3$ CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER ^sg3$ CFUNCTION GLOBAL unlink cdrw
# Create /dev/mouse
LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux
mouse
REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname
mouse
UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
# Manage USB mouse
REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname
usbmouse
UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname
usbmouse
UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd
# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER ^sg3$ CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER ^sg3$ CFUNCTION GLOBAL unlink cdrw
# Create /dev/mouse
LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux
mouse
REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname
mouse
UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
# Manage USB mouse
REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname
usbmouse
UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname
usbmouse
UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
# Support additional config installed by packages ...
INCLUDE /etc/devfs.d
# devfsd.conf ends here
my /etc/modules.devfs
****# /etc/modules.devfs
# Richard Gooch <rgooch@xxxxxxxxxxxxx> 24-MAR-2002
#
# THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT!!!
# THIS FILE WILL BE OVERWRITTEN EACH TIME YOU INSTALL DEVFSD!!!
# Modify /etc/modules.conf instead.
# This file comes with devfsd-v1.3.25 which is available from:
# http://www.atnf.csiro.au/~rgooch/linux/
# or directly from:
#
ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/daemons/devfsd-v1.3.25.tar.gz
#######################################################################
########
# Sample configurations that you may want to place in
/etc/modules.conf
#
#alias sound-slot-0 sb
#alias /dev/v4l bttv
#alias /dev/misc/watchdog pcwd
#alias gen-md raid0
#alias /dev/joysticks joystick
#probeall scsi_hostadapter sym53c8xx
#######################################################################
########
# Generic section: do not change or copy
#
# All HDDs
probeall /dev/discs scsi_hostadapter sd_mod ide-probe-mod
ide-disk i
de-floppy DAC960
alias /dev/discs/* /dev/discs
# All CD-ROMs
probeall /dev/cdroms scsi_hostadapter sr_mod ide-probe-mod
ide-cd cdr
om
alias /dev/cdroms/* /dev/cdroms
alias /dev/cdrom /dev/cdroms
# All tapes
probeall /dev/tapes scsi_hostadapter st ide-probe-mod
ide-tape
alias /dev/tapes/* /dev/tapes
# All SCSI devices
probeall /dev/scsi scsi_hostadapter sd_mod sr_mod st sg
# All IDE devices
probeall /dev/ide ide-probe-mod ide-disk ide-cd ide-tape
ide-flopp
y
# Video capture devices
alias /dev/video* /dev/v4l
alias /dev/vbi* /dev/v4l
# agpgart
alias /dev/agpgart agpgart
alias /dev/dri* agpgart
# Irda devices
alias /dev/ircomm ircomm-tty
alias /dev/ircomm* /dev/ircomm
# Raw I/O devices
alias /dev/rawctl /dev/raw
# Pull in the configuration file. Do this last because modprobe(8)
processes in
# per^H^H^Hreverse order and the sysadmin may want to over-ride what is
in the
# generic file
include /etc/modules.conf
*****
Here's the dmesg portion
st: Version 20020205, bufsize 32768, wrt 30720, max init. bufs 4, s/g
segs 16
Attached scsi tape st0 at scsi1, channel 0, id 0, lun 0
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 286744576 512-byte hdwr sectors (146813 MB)
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 p6 p7 p8 p9 p10 >
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 4, lun 0
sr0: scsi3-mmc drive: 0x/0x dvd-ram cd/rw xa/form2 cdda tray
Attached scsi generic sg2 at scsi1, channel 0, id 1, lun 0, type 8
--
Brett I. Holcomb
|