early-gdm redux ( I am sorry my way is better faster... for a desktop )

Jon Nettleton jon.nettleton at gmail.com
Thu Sep 13 00:24:13 UTC 2007


I understand there are a lot of smart people with a lot of great ideas
trying to make the boot process faster stronger better.  I am sure
their stuff will be great when it is done, but for right here and now
I think my way is the best out of the box, for a desktop.  Then again
who really cares how a server boots up, that should happen at most
twice a year if the systems administrator is any good.

Here is my Fedora 7 clean desktop and what happens.  All default
things I install and use.  I will give some comments.

S04dkms_autoinstaller <- already talked about on the dev list.  I have
the code on my machine that does this when the kernel rpm is installed
if a dkms module fails to compile it uses grubby to fail boot to the
old kernel ( needs user notification and some way to re-run dkms with
updated packages and decide if it should boot the new kernel )
S04readahead_early <- in my new config actually slows down boot.  I
want to move this code to a really early that runs from rc.sysinit
before gdm/rhgb starts
S05kudzu <- in my config could theoretically be an X app with a lot better gui
S06cpuspeed <- gone.  I dumped the cpuspeed  daemon and have moved
everything to use the in kernel governors and modules.  I need a
better interface for this but for now I load all the modules in
/etc/sysconfig/modules and set ondemand as the default.  This
configuration allows you to change the governor or statically set the
cpu freq through the gnome applet.
S07iscsid <- useless without network connectivity moved to a dispatcher.d script
S08ip6tables <- can be set here but should also be restarted by
dispatcher for future location change switches
S10network <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S11auditd
S12restorecond
S12syslog
S13irqbalance <- not needed yet ( do we really need processes balanced
on processors until we are doing anything? )
S13iscsi <- removed for a desktop install.  Handled by NetworkManagerDispatcher
S13mcstrans
S13rpcbind <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S13setroubleshoot
S14nfslock <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S15mdmonitor <- not needed yet ( This is desktop if we are running a
raid can wait until we have a gui to know abou tit )
S18rpcidmapd <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S19rpcgssd <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S22messagebus <- I think the system messagebus should be moved to my
early-gdm config.  start it up way early, everything uses it and it
isn't like it should be turned on and off.
S25bluetooth <- should be started by udev/hal if appropriate bluetooth
devices are detected
S25netfs <- removed for a desktop install.  Handled by NetworkManagerDispatcher
S26hidd <- should be started by udev/hal if appropriate bluetooth
devices are detected
S28autofs <- should be started by udev/hal if appropriate bluetooth
devices are detected
S50hplip <- should only be started if cups has a printer setup that
uses it.  Possibly run by udev/hal.
S55cups <- This is a background process for the desktop.  Until there
is a gui printing is worthless.
S55sshd  <- removed for a desktop install.  Handled by NetworkManagerDispatcher
S56xinetd <- removed for a desktop install.  Handled by
NetworkManagerDispatcher (maybe?)
S58ntpd <- removed for a desktop install.  Everything handled by NetworkManager
S90ConsoleKit
S90crond  <- dumped I am using fcron
S90xfs <- gone
S95anacron <- dumped I am using fcron
S95atd <- dumped I am using fcron
S96readahead_later <- should be run through gdm PreFetchProgram
directive for a desktop
S97dhcdbd <- gone with NM 7.0
S98avahi-daemon <- removed for a desktop install.  Handled by
NetworkManagerDispatcher
S98haldaemon <- should be way earlier in the boot process for a desktop
S99firstboot
S99local

So what do we get with my setup.  GDM is the first thing out of nash
that starts.  In the Init portion of gdm we start up rhgb and then
wait unit it ends to start the greeter.  This means we can stop rhgb
anytime in the init process and login.  I choose to stop it at S50.
So I put all my "essential" desktop services pre S50 and all my
server/post login services after S50.  This gives me.

rc.sysinit

(I also move the acpi module section to /etc/sysconfig/modules )
/etc/sysconfig/modules/
     acpi.modules
     cpugov.modules
     kvm.modules
     udev-stw.modules

-> Starts system dbus
-> early-gdm
-> defers scheduled fsck's to shutdown ( still working on a good gui for this )

S11auditd
S12restorecond
S12syslog
S13mcstrans
S13nscd
S22messagebus
S25bluetooth
S30haldaemon
S35fcron
S40dhcdbd
S41NetworkManager
S42NetworkManagerDispatcher
     Here we get the "parallel" boot that everyone talks about.
     Based on whether the network is up or down we get.
          S04iscsi
          S05iscsid
          S10ntpd
          S15autofs
          S16netfs
                I have both these scripts checking if necessary rpc
services are running and
                starting them if necessary.
          S15sshd
          S20avahi-daemon
          S25avahi-dnsconfd
          S60iscsi-target
S45ConsoleKit
S50GDMGreeter ( yeah we can login )
S55cups
S60mysqld
S61httpd
S64lm_sensors
.....this list can be any other services that are non-essential to login.
S99local

There it is short sweet.  No fancy magic other than change some text
and symlinks.  It gives cpugov and speed control in userspace and
fixes problems with network services dying when NM changes networks (
Dispatcher restarts things that helps clean up bad states ).  Of
course the services based on hardware aren't there, however that
should easily be added to existing udev rules.  On my Athlon 2500+
with a 7200 pata drive 8MB cache I go from power on to signon in 37
seconds, from grub selection I am between 28- 30 seconds to login
screen.

This method isn't perfect, but it works and takes no extra software.
Things can be made better by make rhgb use two way fifo pipes so the
entire init process can be redirected to it's vte, and we can export
the early-gdm X-server so exitsting text/X processes can use X instead
of ncurses.  I am just proposing an option to something that doesn't
exist yet.

Jon




More information about the Fedora-desktop-list mailing list