# eth0 starting at boot [SOLVED]

## NathanZachary

Hello all,

On my netbook, I have read through many threads regarding OpenRC and disabling net.eth0 from the boot process, but can't seem to get it to do so.  I use wicd on the netbook, and therefore, would much rather have net.eth0 excluded.  In my rc configuration, I have:

```

RC_PLUG_SERVICES="!net.eth0"

```

What am I missing?

Thank you preemptively.

----------

## massimo

Maybe you still need to remove it from the init scripts - rc-update del net.eth0

----------

## Rexilion

Maybe there is some hotplug event that triggers it. You could best do:

rm -i /etc/init.d/net.eth0

It's just a symlink to /etc/init.d/net.lo

----------

## d2_racing

Maybe you should disable for a sec wicd at boot time and check if net.eth0 is still starting.

----------

## NathanZachary

@massimo,

It has been removed from the rc-update script.

@Rexilion,

Removing this symlink won't have any other negative effects?

@d2,

I have tried it both with and without wicd in the default runlevel.

----------

## NathanZachary

Also, when booting, right after udev starts, I see this line:

```

Device initiated services: net.eth0

```

I assume that this portion has something to do with my problem, but I can't figure out what to do about it.  This used to be a really simple operation.

----------

## NathanZachary

Here's my full /etc/conf.d/rc file:

```

# /etc/conf.d/rc: Global config file for the Gentoo RC System

# This is the number of tty's used in most of the rc-scripts (like

# consolefont, numlock, etc ...)

RC_TTY_NUMBER=12

# Set to "yes" if you want the rc system to try and start services

# in parallel for a slight speed improvement. NOTE: When RC_PARALLEL_STARTUP

# is enabled, init script output is replaced with simple "service foo

# starting/stopping" messages so that output is not mixed up.

# You can stop this from happening on the command line by passing --verbose

# to the init script or by setting RC_VERBOSE="yes" below.

RC_PARALLEL_STARTUP="no"

# Set RC_INTERACTIVE to "yes" and you'll be able to press the I key during

# boot so you can choose to start specific services. Set to "no" to disable

# this feature.

RC_INTERACTIVE="yes"

# Do we allow services to be hotplugged? If not, set to RC_HOTPLUG="no"

# NOTE: This does not affect anything hotplug/udev related, just the

# starting/stopping of the init.d service triggered by hotplug.

RC_HOTPLUG="yes"

# Dynamic /dev managers can trigger coldplug events which cause services to

# start before we are ready for them. If this happens, we can defer these

# services to start in the boot runlevel. Set RC_COLDPLUG="no" if you don't

# want this.

# NOTE: This also affects module coldplugging in udev-096 and higher

# If you want module coldplugging but not coldplugging of services then you

# can set RC_COLDPLUG="yes" and RC_PLUG_SERVICES="!*"

RC_COLDPLUG="yes"

# Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES is a

# list of services that are matched in order, either allowing or not. By

# default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes

# anyway.

# Example - RC_PLUG_SERVICES="net.wlan !net.*"

# This allows net.wlan and any service not matching net.* to be plugged.

RC_PLUG_SERVICES="!net.eth0"

# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.

# The following values are allowed:

#  none  - The 'net' service is always considered up.

#  no    - This basically means that at least one net.* service besides net.lo

#          must be up.  This can be used by notebook users that have a wifi and

#          a static nic, and only wants one up at any given time to have the

#          'net' service seen as up.

#  lo    - This is the same as the 'no' option, but net.lo is also counted.

#          This should be useful to people that do not care about any specific

#          interface being up at boot.

#  yes   - For this ALL network interfaces MUST be up for the 'net' service to

#          be considered up.

RC_NET_STRICT_CHECKING="lo"

# RC_DOWN_INTERFACE allows you to specify if RC will bring the interface

# completely down when it stops. The default is yes, but there are some

# instances where you may not want this to happen such as using Wake On LAN.

RC_DOWN_INTERFACE="yes"

# RC_VOLUME_ORDER allows you to specify, or even remove the volume setup

# for various volume managers (MD, EVMS2, LVM, DM, etc).  Note that they are

# stopped in reverse order.

RC_VOLUME_ORDER="raid evms lvm dm"

# RC_VERBOSE will make init scripts more verbose. Only networking scripts

# really use this at this time, and this is useful for trouble shooting

# any issues you may have.

# This is also used to re-enable init script output for init scripts

# started or stopped from the command line.

RC_VERBOSE="no"

# RC_BOOTLOG will generate a log of the boot messages shown on the console.  

# Useful for headless machines or debugging.  You need to emerge the 

# app-admin/showconsole package for this to work.  Note that this probably

# won't work correctly with boot splash.

RC_BOOTLOG="no"

# Set to "yes" if you want to benchmark system boot with bootchart.

# You'll need to emerge the app-benchmarks/bootchart package for this to work.

RC_BOOTCHART="no"

# RC_USE_FSTAB allows you to override the default mount options for the 

# standard /proc, /sys, /dev, and /dev/pts mount points.  Note that this 

# is the new way for selecting ramfs/tmpfs/etc... for udev mounting.

RC_USE_FSTAB="no"

# RC_USE_CONFIG_PROFILE allows you to have different /etc/conf.d files 

# based on your runlevel - if a conf.d file for your profile does not exist

# then we try and use the default one.

# To enable runlevel selection at boot, append "softlevel=foobar" to your

# kernel line to change to the foobar runlevel.  Here we would search for

# /etc/conf.d/<service>.foobar config files before trying to use the default

# /etc/conf.d/<service>.

# Note that it is only active if 'softlevel' was specified via the kernel line,

# and it is intended to use for different grub/lilo entries to specify config

# changes for say laptops between home and work, where you would have setup

# 'work' and 'home' runlevels, with /etc/conf.d/*.<runlevel> as needed.

RC_USE_CONFIG_PROFILE="yes"

# RC_FORCE_AUTO tries its best to prevent user interaction during the boot and 

# shutdown process.  For example, fsck will automatically be run or volumes 

# remounted to create proper directory trees.  This feature can be dangerous 

# and is meant ONLY for headless machines where getting a physical console 

# hooked up is a huge pita.

RC_FORCE_AUTO="no"

# Use this variable to control the /dev management behavior.

#  auto   - let the scripts figure out what's best at boot

#  devfs  - use devfs (requires sys-fs/devfsd)

#  udev   - use udev (requires sys-fs/udev)

#  static - let the user manage /dev (YOU need to create ALL device nodes)

RC_DEVICES="auto"

# UDEV OPTION:

# Set to "yes" if you want to save /dev to a tarball on shutdown

# and restore it on startup.  This is useful if you have a lot of

# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="no"

# RC_DMESG_LEVEL sets the level at which logging of messages is done to the

# console.  See dmesg(8) for more info.

RC_DMESG_LEVEL="1"

#

# Controlling start-stop-daemon behavior

# Set to "yes" if start-stop-daemon should always retry killing the

# service with sig KILL if it fails the first time.

RC_RETRY_KILL="yes"

# Set the amount of seconds start-stop-daemon should wait between

# retries.

RC_RETRY_TIMEOUT=1

# Set the amount of times start-stop-daemon should try to kill

# a service before giving up.

RC_RETRY_COUNT=1

# Set to "yes" if start-stop-daemon should fail if the service

# is marked as started, but not actually running on stop.

RC_FAIL_ON_ZOMBIE="no"

# Set to "yes" if start-stop-daemon should attempt to kill

# any children left in the system.

# Be careful with this as it really does what it was on the tin.

# fex, if you're in an ssh process and you restart a service on which ssh

# depends then your terminal will be killed also.

RC_KILL_CHILDREN="no"

# Set the amount of seconds start-stop-daemon waits after starting

# the daemon to check it is still running. If it's not then we

# try and stop any children if possible.

RC_WAIT_ON_START="0.1"

##############################################################################

# SERVICE CONFIGURATION VARIABLES

# These variables are documented here, but should be configured in

# /etc/conf.d/foo for service foo and NOT enabled here unless you

# really want them to work on a global basis.

# Some daemons are started and stopped via start-stop-daemon.

# We can launch them through other daemons here, for example valgrind.

# This is only useful for serious debugging of the daemon

# WARNING: If the script's "stop" function does not supply a PID file then

# all processes using the same daemon will be killed.

#RC_DAEMON="/usr/bin/valgrind --tool=memcheck --log-file=/tmp/valgrind.syslog-ng"

# strace needs to be prefixed with --background as it does not detach when

# it's following

#RC_DAEMON="--background /usr/sbin/strace -f -o /tmp/strace.syslog-ng"

# Pass ulimit parameters 

#RC_ULIMIT="-u 30"

##############################################################################

#

# Internal configuration variables

#

# NB:  These are for advanced users, and you should really

#      know what you are doing before changing them!

#

 

# rc-scripts dep-cache directory

#

# NOTE:  Do not remove the next line, as its needed by the baselayout ebuild!

#

#  svcdir="/var/lib/init.d"

svcdir="/var/lib/init.d"

# Should we mount $svcdir in a ram disk for some speed increase 

# for slower machines, or for the more extreme setups ?

svcmount="no"

# FS type that should be used for $svcdir.  Note that you need 

# $svcmount above set to "yes" for this to work ...  Currently 

# tmpfs, ramfs, and ramdisk are supported (tmpfs is the default).

svcfstype="tmpfs"

# Size of $svcdir in KB.  Note that ramfs doesn't support this 

# due to kernel limitations.

svcsize=2048

```

And the output of rc-update show:

```

            killprocs | shutdown                                      

                local |                 nonetwork default             

       udev-postmount |                           default             

          consolefont |                                   boot        

              urandom |                                   boot        

              keymaps |                                   boot        

           localmount |                                   boot        

               procfs |                                   boot        

                 fsck |                                   boot        

                 root |                                   boot        

               net.lo |                                   boot        

                dmesg |                                        sysinit

              modules |                                   boot        

            alsasound |                                   boot        

                 swap |                                   boot        

                 dbus |                           default             

            syslog-ng |                           default             

                 wicd |                           default             

             mount-ro | shutdown                                      

             hostname |                                   boot        

               sysctl |                                   boot        

                 mtab |                                   boot        

             netmount |                           default             

         termencoding |                                   boot        

                 udev |                                        sysinit

              hwclock |                                   boot        

            savecache | shutdown                                      

                 hald |                           default             

             bootmisc |                                   boot        

                devfs |                                        sysinit

```

I really need to get this issue figured out, because I can't really do much with my netbook with it like this.  Once it finally stops with the retry on net.eth0, it will continue the boot sequence.  Then, however, I still can't connect to any wireless networks via wicd (not sure why, or if the two are related).

Thank you preemptively.

----------

## NathanZachary

I'm an idiot.  /etc/conf.d/rc is not the configuration file anymore, as it has been replaced by /etc/rc.conf.  I added the appropriate line there, and everything is fine.  Sorry.

EDIT: oh great, my 2000th post was admitting that I'm an idiot.   :Razz: 

----------

## d2_racing

Shit happens my friend  :Razz: 

----------

## roytheman

Hello Gentoo forum,

On my Gentoo install, which is up to date as of this posting, the way to stop eth0 from auto-starting on boot is to edit the file in /etc/conf.d/netmount and comment out the last line that says   rc_need="net".   This will stop netmount from starting all network services on boot. This is useful for people who want to use something like wpa_supplicant to get online wirelessly without first having to manually disable eth0 (wired). 

I have a script on my desktop (an icon) that will start both wpa_supplicant and dhcpcd as a root user,  provided you first edit the /etc/suders file to go from a regular user to sudo (root) without a password (for wpa_supplicant and dhcpcd only), because wpa_supplicant and dhcpcd will not start as a regular user. So if I want to go online wirelessly, I just click on the desktop icon and viola, it works.

Cheers,

Roy

----------

