Welcome to the most active Linux Forum on the web.
Go Back > Blogs > ~sHyLoCk~
User Name


Rate this Entry

Improving Slackware boot time

Posted 12-09-2009 at 01:30 AM by ~sHyLoCk~
Updated 12-09-2009 at 01:40 AM by ~sHyLoCk~
Tags boot, slackware

Originally Posted in my BLOG.
Slackware by default takes a long time to boot. We can minimize this. I am going to write down exactly what I did, you read that and do it on your own.

First login as root using "su" and continue:

 # nano /etc/lilo.conf
Write compact in the global section or uncomment it. [it's there somewhere at the top]

Next find the append line and add "quiet" at the end. My append line reads:

append=" vt.default_utf8=0 quiet"
Using the"printk" statements during boot, a lot of time is consumed hence the "quiet" option.

Now that it's done run :

# lilo
After this you should disable the services you won't need. Remember I am only writing down the services I didn't need, which maybe different in your case according to what you need. Here is how you disable a service:

# chmod -x rc.bluetooth
I have kept these services disabled:

rc.bind,rc.acpid,rc.atalk,rc.bluetooth,rc.cups,rc.dnsmasq,rc.httpd,rc.inet1.conf,rc.inetd, rc.ip_forward,rc.mysqld,rc.nfsd,rc.ntpd,rc.pcmcia,rc.rpc,rc.samba,rc.saslauthd,rc.sendmail rc.sshd,rc.serial,rc.snmpd,rc.wireless,rc.yp
Please google to find out what these services mean.

Now to modify the rc scripts.

#cd /etc/rc.d/

    #nano rc.M
Add & if not present already after rc.local [at the bottom]

It should read:

if [ -x /etc/rc.d/rc.local ]; then
    . /etc/rc.d/rc.local &
Now find the lines that say:

# Update any existing icon cache files:

And delete/comment that block of code, from if to done.

Find the line:

# This would be a large file and probably shouldn't be there.

Delete that block of code from if to fi.

Find :

# Update mime database:

Delete the code, from if to fi

Find: # Update all the shared library links: and delete the block of code.

Find: # Update the X font indexes: and delete the block of code.

WARNING: I am assuming you are intelligent enough to understand the part of the code to delete. It's not that difficult to understand really, two separate blocks of codes have been well separated using comments. So, if you don't want to take a risk, comment the codes (add # infront) instead of deleting them.

Now save and exit.

#nano /etc/cron.daily/
And paste the following code:

    # Update any existing icon cache files:
    if find /usr/share/icons 2> /dev/null | grep -q icon-theme.cache ; then
    for theme_dir in /usr/share/icons/* ; do
    if [ -r ${theme_dir}/icon-theme.cache ]; then
    echo "Updating icon-theme.cache in ${theme_dir}..."
    /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null &
    # This would be a large file and probably shouldn't be there.
    if [ -r /usr/share/icons/icon-theme.cache ]; then
    echo "Deleting icon-theme.cache in /usr/share/icons..."
    #/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null &
    rm -f /usr/share/icons/icon-theme.cache

    # Update mime database:
    if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then
    echo "Updating MIME database:  /usr/bin/update-mime-database /usr/share/mime &"
    /usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null &

    # Update all the shared library links:
    if [ -x /sbin/ldconfig ]; then
    echo "Updating shared library links:  /sbin/ldconfig"

    # Update the X font indexes:
    if [ -x /usr/X11R6/bin/fc-cache ]; then
    echo "Updating X font indexes:  /usr/X11R6/bin/fc-cache"
Now make it executable:

#chmod +x /etc/cron.daily/
Now reboot your system and see if it has improved the boot time.

Posted in Slackware
Views 2770 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 09:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration