| Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-06-2006, 08:11 AM
|
#1
|
|
Member
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75
Rep:
|
How to have udev start at boot
Running Mandriva 2006.
I found that all my troubles with having usb initialized and usb devices automounted was due to not having udev running. If I do a "service udev start" all is well. Of course, after a reboot, it is not running again.
Where is the start of the udev service supposed to be? It should be started at a pretty low level, but I don't know where.
|
|
|
|
04-06-2006, 08:57 AM
|
#2
|
|
Member
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42
Rep:
|
I dont know much about Mandriva.
I have two symlinks in /etc/init.d/rc3.d/
Quote:
linux:/etc/init.d/rc3.d # l *ude*
lrwxrwxrwx 1 root root 12 2006-01-01 17:56 K18boot.udev -> ../boot.udev*
lrwxrwxrwx 1 root root 12 2005-12-26 07:31 S04boot.udev -> ../boot.udev*
|
These start this Script:
linux:/etc/init.d # cat boot.udev
Code:
#! /bin/sh
# $Id: udev.boot.udev 250 2005-03-10 15:10:24Z hare $
# Copyright (c) 2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# /etc/init.d/boot.udev
### BEGIN INIT INFO
# Provides: boot.udev
# Required-Start: boot.rootfsck
# Default-Start: B 2 3 5
# Default-Stop:
# Short-Description: recreate /dev contents and udev device node database
# Description: This script creates a /dev tree if /dev is
# mounted as a tmpfs. In comparison to the old /dev/ with devices
# populated by the devs RPM this script will only create devices that
# are actually present in the kernel at boot time. The hotplugging
# will later fill in new device entries if devices are attached and
# remove them if devices are detached.
### END INIT INFO
#
. /etc/rc.status
. /etc/udev/udev.conf
DAEMON=/sbin/udevd
udevd_args="--daemon"
case "$1" in
start)
case "$pcmcia" in
off|no|0) echo "pcmcia=$pcmcia" > /dev/shm/nopcmcia
esac
if [ -n "$NOPCMCIA" ] ; then
echo "NOPCMCIA=$NOPCMCIA" > /dev/shm/nopcmcia
fi
checkproc $DAEMON
if [ $? -eq 0 ]; then
if [ -z "$RUNLEVEL" ] ; then
echo -n "Starting udevd (already running)"
rc_status -v
fi
rc_exit
fi
if [ -x $DAEMON ] ; then
# check for /sys
if [ ! -d /sys/class ]; then
mount -t sysfs none /sys
fi
if [ -d /lib/klibc/events ]; then
for event in /lib/klibc/events/*; do
if [ -f $event ]; then
udevd_args="$udevd_args --stop-exec-queue"
break;
fi
done
fi
echo -n "Starting udevd "
[ -d $udev_db ] || mkdir $udev_db
# Create permissions device
[ -n "$udev_devperms" ] && touch $udev_devperms
#
# Check whether we can use uevent messages
#
if zcat /proc/config.gz | grep -q KOBJECT_UEVENT ; then
# Yes, just use udevd
export UDEVD_EXPECTED_SEQNUM=$(cat /sys/kernel/hotplug_seqnum)
export UDEVD_EVENT_TIMEOUT=1
startproc $DAEMON $udevd_args
echo "" > /proc/sys/kernel/hotplug
else
# No, use the udevsend/udevd combo
echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
fi
# Create static devices
if [ -f /etc/udev/static_devices.txt ]; then
/sbin/udev.create_static_devices.sh /etc/udev/static_devices.txt
fi
# Remember status and be verbose
rc_status $status -v
fi
;;
stop)
if [ -n "$PREVLEVEL" ]; then
case "$PREVLEVEL" in
2|3|5)
rc_exit
;;
esac
fi
echo -n "Stopping udevd:"
echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
killproc $DAEMON
rc_status -v
;;
restart)
echo -n "Restarting udevd:"
killproc $DAEMON
export UDEVD_EXPECTED_SEQNUM=$(cat /sys/kernel/hotplug_seqnum)
startproc $DAEMON $udevd_args
rc_status -v
;;
status)
echo -n "Checking for udevd:"
checkproc -p $UDEVD_PIDFILE /sbin/udevd
rc_status -v
;;
reload)
echo -n "Reloading udev rules:"
udevcontrol reload_rules
rc_status -v
;;
force-reload)
if [ -x /sbin/udevstart ] ; then
echo -n "recreate all available device nodes in /dev: "
rm -rf $udev_db /dev/disk
export UDEV_NO_DEVD=1
export UDEV_NO_HOTPLUGD=1
/sbin/udevstart &
unset UDEV_NO_HOTPLUGD
unset UDEV_NO_DEVD
rc_status -v
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status|reload|force-reload}"
exit 1
;;
esac
rc_exit
|
|
|
|
04-07-2006, 08:04 AM
|
#3
|
|
Member
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75
Original Poster
Rep:
|
Well, what I ended up doing was:
Adding "/sbin/udevstart" to the end of "/etc/rc.d/rc.local" did nothing. However, I replaced "/sbin/udevstart" with "service udev start" and that did the trick.
I do see that in "rc.sysinit" there is a "service udev start". Why that doesn't work such that I have to add the same statement in again in "rc.local" I have no idea.
At least this seems to work. However, I notice that if I plug in a new usb device for the first time and then reboot, the system will hang when attempting to go into kde (autologin). I have to do a ctrl-alt-bksp and then log in to KDE. It then comes up fine. Thereafter, if I reboot again with that same new usb device plugged in, all is well.
Last edited by RVDowning; 04-07-2006 at 08:05 AM.
|
|
|
|
04-07-2006, 08:35 AM
|
#4
|
|
Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
This will start udev at boot time.
|
|
|
|
04-07-2006, 09:04 AM
|
#5
|
|
Member
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75
Original Poster
Rep:
|
But where would it put the instruction to start udev? There is already a "service udev start" in "rc.sysinit". Should this be removed? Also, do you suggest I remove the one I added in "/etc/rc.d/rc.local" and then just key at a terminal "#chkconfig udev on"? I don't follow this.
|
|
|
|
04-07-2006, 09:12 AM
|
#6
|
|
Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Leave things as they are. Enter the commands above and reboot.
|
|
|
|
04-07-2006, 02:57 PM
|
#7
|
|
Member
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75
Original Poster
Rep:
|
You certainly know more about it than I do, but I would still think that if I execute "#chkconfig udev on" there ought to be a conflict with the statement "service udev start" in "rc.sysinit". Wouldn't a "start" complain if the item had already been started?
|
|
|
|
04-07-2006, 06:50 PM
|
#8
|
|
Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Quote:
|
Originally Posted by RVDowning
You certainly know more about it than I do, but I would still think that if I execute "#chkconfig udev on" there ought to be a conflict with the statement "service udev start" in "rc.sysinit". Wouldn't a "start" complain if the item had already been started?
|
Chkconfig does not actually start a service, it simply marks the service for startup at boot time.
|
|
|
|
04-07-2006, 08:01 PM
|
#9
|
|
Member
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42
Rep:
|
For my Distribution "insserv udev start" would work as well.
It creates the Symlinks described above.
|
|
|
|
06-09-2010, 01:51 PM
|
#10
|
|
LQ Newbie
Registered: Jun 2010
Posts: 1
Rep:
|
Code:
chkconfig 'service' on
This places the service's script softlink in the boot.d directory.
boot.d is executed from:
/etc/inittab/ -> /etc/init.d/boot -> boot.d
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|