LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2004, 06:46 PM   #1
blian
LQ Newbie
 
Registered: Apr 2004
Distribution: Slackware
Posts: 3

Rep: Reputation: 0
Angry runlevel 4 and rc.M


*thump*
*thump*
(sound of my head repeatedly hitting the wall)

I have Slackware 9.0 newly installed. When I set the default run level to 3 everything works fine. When I set it to 4 rc.M doesn't run.

My inittab:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
 
# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S
 
# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K
 
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
 
# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now
 
# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0
 
# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6

# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start
 
# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop
 
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
 
# Runlevel 4 used to be for an X window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1 all
# the time. Thus, there is now one getty opened on tty6. Hopefully no one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something
# happens to X.
x1:4:wait:/etc/rc.d/rc.4
From what I can tell rc.M is never executed for runlevel 4. I removed the my /etc/HOSTNAME file to test and that never got created. Got any ideas?
 
Old 04-07-2004, 06:56 PM   #2
blian
LQ Newbie
 
Registered: Apr 2004
Distribution: Slackware
Posts: 3

Original Poster
Rep: Reputation: 0
OK. I've been doing more reading and I see that rc.M is not run for runlevel 4 (even though inittab says to run it).

Slackware site says that rc.inet1 and rc.inet2 will run in runlevels 2,3, and 4. When I start run level 3 rc.M runs and executes rc.inet1 and rc.inet2. My network gets it's information. When I start run level 4 rc.inet1 and rc.inet2 do not run.

This should happen without me editing rc.4 but I don't see it happening. Should I just run them from rc.4?
 
Old 04-07-2004, 08:33 PM   #3
subgenius
Member
 
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 41

Rep: Reputation: 15
The line

rc:2345:wait:/etc/rc.d/rc.M

means that rc.M should execute in runlevels 2, 3, 4, and 5.

In runlevel 4, rc.S should execute first, followed by rc.M then rc.4.
 
Old 04-08-2004, 09:30 AM   #4
blian
LQ Newbie
 
Registered: Apr 2004
Distribution: Slackware
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by subgenius
The line

rc:2345:wait:/etc/rc.d/rc.M

means that rc.M should execute in runlevels 2, 3, 4, and 5.

In runlevel 4, rc.S should execute first, followed by rc.M then rc.4.
Right. That's what I thought too.

Slackware's website and my PC say otherwise.

When I boot runlevel 4 rc.M never runs. I have to manually run rc.M or rc.inet1 and rc.inet2 to get my network initialized. The ethernet card is showing in ifconfig but the IP address and netmask are not loaded. In runlevel 3 everything works fine.

I tested by commenting out the rc.4 script from inittab. When I reboot (to clear network settings) I don't see the "Going multiuser..." message or the information messages from setting up the network.

Something is wrong but I don't know how to fix it without kludging(sp?) together a script.
 
Old 05-11-2004, 04:45 AM   #5
scorpiondino
LQ Newbie
 
Registered: May 2004
Distribution: Slackware
Posts: 8

Rep: Reputation: 0
what do you want?

as far as I know you shouldn't run rc.M & rc.4 together...

I suppose when you go to runlevel 4 it should all work fine.
do you see the dhcpd results (getting ip adress and stuff) during boot?

Quote:
The ethernet card is showing in ifconfig but the IP address and netmask are not loaded. In runlevel 3 everything works fine.

well, try to run "dhcpd eth0" (or eth1, depends on your HW config) after yopu booted to runlevel 4...

hope this helps somehow, and if it doesn't, probably it's some miss-configuration on rc.inet1.conf that is solved in rc.M (cause it has some special initializations...)

 
Old 05-11-2004, 01:27 PM   #6
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
Is rc.M chmod 755? It needs to be.
 
  


Reply



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
What's the difference between runlevel 2 and runlevel 5 in Debian? davidas Linux - Newbie 2 01-05-2012 01:10 PM
runlevel eaglegst Linux - Software 1 02-23-2004 12:54 AM
Runlevel 5 lapthorn Linux - Newbie 6 12-03-2003 05:23 AM
X does not start in Runlevel 4, but i Runlevel 3 Rabon Linux - General 3 11-18-2003 06:24 AM
which runlevel? adme Linux - Software 8 02-11-2003 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:10 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
Open Source Consulting | Domain Registration