LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices



Reply
 
Search this Thread
Old 04-06-2006, 09:11 AM   #1
RVDowning
Member
 
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75

Rep: Reputation: 15
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.
 
Old 04-06-2006, 09:57 AM   #2
tuxangler
Member
 
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42

Rep: Reputation: 15
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
 
Old 04-07-2006, 09:04 AM   #3
RVDowning
Member
 
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75

Original Poster
Rep: Reputation: 15
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 09:05 AM.
 
Old 04-07-2006, 09:35 AM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
Code:
#chkconfig udev on
This will start udev at boot time.
 
Old 04-07-2006, 10:04 AM   #5
RVDowning
Member
 
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75

Original Poster
Rep: Reputation: 15
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.
 
Old 04-07-2006, 10:12 AM   #6
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
Leave things as they are. Enter the commands above and reboot.
 
Old 04-07-2006, 03:57 PM   #7
RVDowning
Member
 
Registered: Jan 2006
Location: Atlanta, GA
Distribution: Mandriva 2006
Posts: 75

Original Poster
Rep: Reputation: 15
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?
 
Old 04-07-2006, 07:50 PM   #8
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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.
 
Old 04-07-2006, 09:01 PM   #9
tuxangler
Member
 
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42

Rep: Reputation: 15
For my Distribution "insserv udev start" would work as well.
It creates the Symlinks described above.
 
Old 06-09-2010, 02:51 PM   #10
westblizz
LQ Newbie
 
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Start eth0 on boot Bloged Linux - Newbie 6 06-15-2009 05:07 AM
udev boot error alma Linux - Newbie 3 11-27-2005 11:51 AM
Start process at boot frkstein Ubuntu 1 05-15-2005 02:53 PM
2.6.10 boot stopping at udev.... edM Slackware 7 02-23-2005 03:13 PM
how to make something start at boot? Lleb_KCir Linux - General 5 08-20-2004 10:45 PM


All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration