Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 3rd April 2006, 11:58 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Talking Speed up your boot time!

Hello,
I've noticed that Fedora takes a long time to boot, and most of it can be disabled.
A quote from justol'bob:
Quote:
Originally Posted by justol'bob
There have been several threads about how Fedora may take longer to boot than you're happy with. A couple of excellent threads already exist on ways to speed up the process:

In-depth howto
BootCharts
Uber-startups!

However, you may have wondered as all the startup processes speed by: 'Do I really need all of that? What ARE those things used for?'

This 'How-to' is to answer some of those questions and to suggest which processes MIGHT be turned off and which ones MUST be left on.
To start, let's learn a bit about the boot processes.

Background Info

init is what starts your computer -- It loads the services and determins which ones to start in what order.

chkconfig sets the bool values (true / false) on the services to enable/disable them at startup.

service controls currently running services by starting, stopping or restarting them.

There are 7 runlevels to init, each will have a different configuration/do differnt things:
configurable mean you can edit the daemons & services that start
0 = shutdown (not configurable)
1 = single-user (not configurable)
2 = multi-user (configurable, full CLI functionality but no network, this one is usually ignored)
3 = multi-user (one of the common ones, configurable, full CLI functionality)
4 = Xen kernel (configurable, but ignored b/c not many people use it)
5 = Runlevel 3 + X Windows (configurable, most used, full graphical functionallity)
6 = reboot (not configurable)

Note that, init, chkconfig and service are commands, and also that you'll need to be root first:
Code:
su -
Now that you're root (make sure you add that space & dash after su...), you can execute the commands:
Code:
init [0-6]
example
init 1
-------------------
Code:
chkconfig [service name] [ on | off ]
examples
chkconfig sendmail off
chkconfig nvidia-glx on
-------------------
Code:
service [service name] [ start | stop | restart ]
examples
service network restart
service wpa_supplicant start
service sendmail stop
Next, let's go into the default runlevel: This is part of the /etc/inittab file:
Code:
# Default runlevel. The runlevels used by RHS are:
... - snip - ...
#
id:3:initdefault:
Changing the number (in this case, 3 -> 5) will change your default runlevel.
Now, let's move on.

Changing your default services

If you're in the GUI, you can install an easy tool to do so:
Code:
su -
yum install system-config-services
It can now be accessed under [System menu] > Administration > Server Settings > Services or by running
Code:
system-config-services
from the menu. I like to [Edit Runlevel menu] > Runlevels All to let you edit runlevels 3, 4 and 5 all at once.

If you're in the terminal, you're stuck with the manual chkconfig command. Sorry.
Code:
man init
man chkconfig
man service
for more info on the commands.

Last thing I'm going to say is don't be afraid to disable services; The worst that can happen is something won't work and on reboot you simply re-enable it.

Priorities:
L = Only laptops need this.
D = Only Desktops need this.
A = All need this! Keep it enabled.
HR = Highly Recommended! But not absolutely needed. Better to keep enabled.
R = Not needed at all but nice to have.
NN = Not needed, disable at will. Keep enabled if you're using things itn it's description, though.

[ service ] : [ Description ] : [ Priority ]

NetworkManager : Best network selection : L
acpid : Power managment : HR
anacron : More Cron management : HR
apmd : For laptop's battery monitoring : L
atd : Similar to Cron's functions : NN
autofs : Auto-detect/mount filesystems : HR
ahavi-daemon : Zeroconf stuff : NN
avavi-dnsconfd : DNS Zeroconf stuff : NN
bluetooth : needed for bluetooth wireless devices to work : NN
btseed : BitTorrent Seeding : NN
bttrack : BitTorrent tracking : NN
cpuspeed : dynamic CPU speed daemon : L
crond : Automated tasks : A
cups : Central Unix Printing System : HR
cups-config-daemon: Central Unix Printing System through D-Bus : HR
dc_client : SSL session cache client proxy : NN
dc_server : SSL session server : NN
dhcdbd : D-BUS control of ISC DHCP client : NN
diskdump : Create Dump files if system crashes : NN
firstboot : First-boot configuration utility : NN after your first boot
gpm : Mouse support in terminals (runlevel 3) : NN
haldaemon : Hardware Abstraction Layer : A
hplip : HP Printer service : A for all that use HP Printers
httpd : Apache's Web server : NN
iptables : Firewall. Plain & Simple. : A
isdn : Integrated Services Digital Network : NN
kudzu : hardware probe at startup, only if you're changing hardware : NN
lirc : Infrared controls : NN
lisa : Similar to "Network Neighbourhood" : R
lm_sensors : System sensor monitoring : A that have CPU / fan sensors
mdnsresponder : Howl network : NN
messagebus : The system-messenger dbus : A
mysqld : MySQL's database server : NN
named : BIND DNS server : NN
netdump : netconsole & netcrashdump utility : NN
netfs : Network filesystems : HR
netplugd : Dynamic network managment : NN
network : Network connectivity & services : A
nifd : Network interface monitor daemon : NN
nscd : Name service caching daemon : NN
ntpd: Network Time Protol : NN
nfs + nfslock : NFS servers : NN
portmap : RPC connections, like NFS / NIS : NN
pcmcia : Laptop PCMCIA : L
redahead & readahead_early : Caches boot services & therefore decreases boot time : A
rpcgssd : NFS v4 connection helper : NN
rpcidmapd : NFS v4 connection helper : NN
rpcsvcgssd : NFS v4 connection helper : NN
saslauthd : plaintext auth in cyrus-sasl : NN
sendmail : Mail server, although there are better ones out there I'd disable this one and install something like squirrelmail. Either way, it's enabled by default and can be disabled. : NN
smb : The Samba or SMB server : NN
snmpd : Simple Network Management Protocol : NN
snmptrapd : Simple Network Management Protocol : NN
sshd: remote SSH server : NN
syslog : System & Kernel logger. VITAL!: A
wpa_supplicant : Wireless auth helper : A who use wireless
xfs : X font server. Vital to graphic functioning!: A
xinetd : the replacement for inted, xinetd is a internet superdaemon. HR

ati-fglrx / nvidia-glx : Livna graphics drivers services : HR

Services you want to disable *should* be disabled in runlevels 3, 4 and 5 (the default for editing when using chkconfig [service] [ on | off ])

Going further
See the links provided below, you can also remove all instances of the
Code:
rhgb
text in /etc/grub.conf:
Code:
su -
editor /etc/grub.conf
editor is gedit if you're in gnome, kedit if you're in KDE. For me, it's
Code:
su -
gedit /etc/grub.conf
Then simply remove any instance of the four letters "rhgb" and not the entire line!

For more info (links, same as at the top):

In-depth howto
BootCharts
Uber-startups!

Enjoy the fast boot times
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)

Last edited by Firewing1; 3rd May 2006 at 03:55 AM.
Reply With Quote
  #2  
Old 4th April 2006, 07:47 AM
3006828
Guest
 
Posts: n/a
thank you very much.. sythathised a lot of information clearly. Cheers.
Reply With Quote
  #3  
Old 4th April 2006, 03:53 PM
stanmc Offline
Registered User
 
Join Date: Jun 2004
Location: Chicago, IL, USA
Age: 71
Posts: 215
Thanks Firewing1. I printed out the list of services that are required or can be disabled. Its going in my folder of Fedora referrence items. It joins things like how to make realplayer and java run and how to set up my printer and print services through my router. Very useful post.
Reply With Quote
  #4  
Old 4th April 2006, 04:14 PM
tscheez's Avatar
tscheez Offline
Registered User
 
Join Date: Mar 2005
Location: Fairport, NY (Rochester)
Age: 35
Posts: 113
The one thing that I would like to see in bootup is DHCP backgrouned like Knoppix. DHCP can take a few seconds sometimes.
__________________
i'd rather be motoring
Reply With Quote
  #5  
Old 4th April 2006, 05:20 PM
stanmc Offline
Registered User
 
Join Date: Jun 2004
Location: Chicago, IL, USA
Age: 71
Posts: 215
Firewing1 wrote: redahead & readahead_early : Caches boot services & increases boot time : A

Just a thought, but wouldn't it be increases boot speed or improves boot time?

readahead & readahead_early : Caches boot services & improves boot time : A
Reply With Quote
  #6  
Old 4th April 2006, 10:34 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Oops, that's true! I mean increases bootup performance... I'll change it
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #7  
Old 5th April 2006, 06:32 AM
Scytale Offline
Registered User
 
Join Date: Jan 2006
Location: Wollongong, Australia
Age: 28
Posts: 198
the HAL in haldaemon stands for Hardware Abstraction Layer.

From Wikipedia

"Its function is to hide differences in hardware from most of the operating system kernel, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware"
Reply With Quote
  #8  
Old 5th April 2006, 09:44 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Thanks, I changed it
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #9  
Old 7th April 2006, 02:25 AM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
If anyone knows how to get Init-NG working properly, please PM me! I'd like to get it working and add it here...
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #10  
Old 2nd May 2006, 06:51 AM
codergeek42's Avatar
codergeek42 Offline
Registered User
 
Join Date: Aug 2005
Location: Anaheim/Fullerton, CA (USA)
Age: 27
Posts: 388
One thing I did is to set the services to startup and immediately put themselves in the background so that other services can start. This seems to help a lot with things like NTP and MySQL which like to pause for a few moments (I/O blocking perhaps?). Open the /etc/init.d/functions file with your favorite editor as root:
Code:
$ su -
<enter password>
# gedit /etc/init.d/functions
Then add an ampersand to the end of lines 179 and 181 (the daemon function):
Code:
	# And start it up.
	if [ -z "$user" ]; then
	   $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*" &
	else
	   $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*" &TCP 
	fi
Please note that you do this AT YOUR OWN RISK. It may break things or cause things not to function properly (perhaps due to service dependencies or the like). However, I've had no such problems yet.

@Firewing1: xinetd is not "XineTD" . It's the Internet Super Daemon. Basically (according to my computer science professor) before TCP became the de facto communication protocol for the various servers in use, they would all run under xinetd, so that the server daemons would merely need to worry about the basic receiving/processing/sending data, and xinetd would do the hard work of the TCP socket code as needed. This was so that in case another standard arose (such as UDP or the like), then xinetd would be modified and all server daemons would run as normal, benefitting from the new protocol without any rewriting. Now, however, TCP is the commonly used protocol, so most servers implement their own internal socket code and the like, or use a networking library such as SDL's networking stack.
__________________
~~ Peter ~~ :: ( Who am I? ) :: ( My Blog: A day (or more) in the life of a CS & Language student... ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )
Reply With Quote
  #11  
Old 1st September 2006, 12:19 PM
stevea's Avatar
stevea Online
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
OK this is long-dead-thread, but for the record your CS professor's explanation is WRONG.

Xinetd starts external daemons by opening the socket as fd=0,1,2 and fork/exec'ing the external daemons. Xinetd and hands a few daemon functions (chargen, daytime, echo) with just a fork. Xinetd also does something beyond scope w/ tcpmux.

Before xinetd was inetd which treated all daemons almost the same way as xinetd treats external daemons.

Before inetd, Unix systems would just start up a dozen or so separate daemons (tftpd, telnetd, ... and each of these would do ALL the socket connect code.

The reason to have the "super server" open the socket and do the connection code is that this is necessary if it is going recognize the connection port and then spawn the correct daemon. It's not due to code complexity or protocol changes.
Reply With Quote
  #12  
Old 1st September 2006, 10:05 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Well, let's just leave it at a 'Internet super-daemon'... Much simpler
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #13  
Old 10th October 2006, 05:32 PM
techmatt's Avatar
techmatt Offline
Registered User
 
Join Date: Nov 2005
Location: In My Head (I Think)
Posts: 932
In CLI you cou use
Code:
setup
there you can configure alot of things from the CLI on of them being services
other include network, printers, and a few other just cannot think of off the top of my head
Just though you may like to know
__________________
If you know how to do something in Fedora or how to do it better, please help us at Fedora Wiki.

Registered Linux user number 433760
Reply With Quote
  #14  
Old 24th November 2006, 01:43 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Good news - InitNG seems to be in Extras, it didn't work that badly for me - Anybody else willing to try it out?
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #15  
Old 24th November 2006, 05:54 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
I tried it and didn't notice any difference at all, until I realized that you had to select it from the grub menu that is.
While it did seem maybe a hair faster it wasn't enough for me to want to give up graphical boot, also my machine already boots pretty fast anyways <30 seconds.
Reply With Quote
Reply

Tags
boot, speed, time

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed up boot... icanfly0307 Using Fedora 17 24th January 2009 01:51 PM
Fedora 8 dual boot with Windows XP [Pavilion dv6137tx] Time gets reset every time! maverick280857 Hardware & Laptops 5 23rd March 2008 11:48 AM
F8: initng to speed up boot time advised? stefan1975 Using Fedora 1 4th December 2007 10:01 PM
Mouse speed different on every re-boot | Annoying d-kam Using Fedora 0 29th July 2005 06:28 PM


Current GMT-time: 09:38 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat