LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2006, 03:12 PM   #1
rs_vijay
Member
 
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Rep: Reputation: 15
Plz help on how to add/remove services started at boot time on linux


I use Fedora 5 n everything was working well until my core 5 didn't boot properly yesterday,it strucks at
"Starting sendmail " n then doesn't respond at all.

I checked my network settings by booting through the rescue disk n everything was fine n as the same worked until the last successful boot.

But I didn't know which file has startup information contained in it so that I can disable the sendmail service to be started at boot time n check it out manually after a successful boot.

So plz guys provide me a soln for this n thanx in advance...
 
Old 11-08-2006, 03:40 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Open a terminal and do this:
Code:
runlevel   (tells you the current run level--almost certainly it will be 5)
cd rc5.d
ls
(you are now looking at a series of LINKS to the startup and shutdown scripts. Each link title begins with "K" for kill, or "S" for start, then a number, then that actual script name. These links get executed in alphabetical order. The actual scripts are in init.d

To stop something from being started at bootup, simply delete the appropriate link
In the rc5.d directory:
Code:
su
<root password>
rm <linkname>

Last edited by pixellany; 11-08-2006 at 03:41 PM.
 
Old 11-08-2006, 03:50 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,950

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
No need to delete the link.
Once you boot up in rescue mode run the following command
chroot /mnt/sysimage
To stop the service
chkconfig --level 345 sendmail off
 
Old 11-08-2006, 04:01 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by michaelk
No need to delete the link.
Once you boot up in rescue mode run the following command
chroot /mnt/sysimage
To stop the service
chkconfig --level 345 sendmail off
I'm guessing that OP does not want to do this on every bootup...Depending on what the issue is, it could take a few re-boots before it is resolved.

This said, great post!! I, for one, just learned something new.
 
Old 11-08-2006, 04:14 PM   #5
NAC
Member
 
Registered: May 2006
Location: mm........
Distribution: FC6 + Gentoo >/ x86_64
Posts: 132

Rep: Reputation: 15
It happened to me last week,simply change the hostname to localhost.localdomain
it worked on my FC.
 
Old 11-08-2006, 04:33 PM   #6
Linville79
Member
 
Registered: Nov 2006
Location: Indiana, U.S.A.
Distribution: Red Hat Enterprise Linux, Fedora, CentOS
Posts: 134

Rep: Reputation: 16
In Fedora, a simple:

$ chkconfig sendmail off

will turn sendmail off in run levels 3 4 and 5

Also, this will be a persistent change and will not need to be done upon every boot.

The one thing that you will need to do is be able to get to a command prompt to begin with, though. And if your machine is not responding during the boot process, then this could prove to be difficult.

Booting into rescue mode from a CD and then chrooting as MichaelK suggested is one way to get to that command prompt. The other is to boot in to single user mode.

To do that, simply edit the boot line from grub by adding a "1" to the end of the line. That will automatically send you in to single user mode. You can then perform the chkconfig command I have above. Don't forget to edit the boot line by removing the "1" when you reboot, else you'll wind up right back into single user mode again.
 
Old 11-09-2006, 08:05 PM   #7
rs_vijay
Member
 
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Original Poster
Rep: Reputation: 15
thnx a lot guys ...
i was able to disable sendmail succcessfully by using chkconfig utility

but there arose a new problem for me now,after a successful boot after disalbing sendmail i got a blank screen (completely black) n any control hardly worked for a long time
can anybody clarify me regarding this?,is a complete install required??

plzz help guyz..

Thank You,
Vijay
 
Old 11-10-2006, 10:29 AM   #8
Linville79
Member
 
Registered: Nov 2006
Location: Indiana, U.S.A.
Distribution: Red Hat Enterprise Linux, Fedora, CentOS
Posts: 134

Rep: Reputation: 16
It's starting to sound like Sendmail wasn't really the issue.

Does it seem like your machine is constantly accessing the hard drive or having a high CPU utilization?

It sounds like there is some rogue process that is just hogging all of your resources. Especially if everything seems to work, but at an extremely slow speed.

If you can get the OS to boot, try getting to a command prompt and typing "top" and take a look at the load average.

Also, share with us what processes are at the top of that list and what their utilization stats are.
 
Old 11-12-2006, 05:09 AM   #9
rs_vijay
Member
 
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Original Poster
Rep: Reputation: 15
thnx sir..

i don't know what really has happened i have changed my init to 3 via a rescue disk n that worked,i mean i was able to login after a successful boot,then trying "startx" for GUI didn't work n neither there was an error message.So , i changed my init back to 5 n rebooted n to my surprise that was successful,i didn't get what has really happened.

i tried the "top" command n it was giving me some list of processes along with pid's,my bid went in vain while saving its output to a file since the file was later unreadable it had some vague characters

can u plz tell me how can i put up my "top" command's output here n i am sorry for posting a late reply...

Thank you for ur interest,
vijay
 
  


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
Safe to remove the following boot-up services? General Linux - General 3 07-22-2006 04:01 PM
Where can I find the sequene of services started at boot? i_s Linux - General 8 03-02-2006 07:52 AM
How do I add/remove/manage services from the CLI? neocookie Fedora 3 11-24-2005 11:01 AM
problem with too many 'ppp' interfaces started at boot time utumno Linux - Networking 1 06-12-2005 05:11 AM
How Do I Have a script started at boot time? Chijtska Linux - General 12 03-18-2002 06:41 PM


All times are GMT -5. The time now is 02:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration