LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > ~sHyLoCk~
User Name
Password

Notices


Rate this Entry

Improving Slackware boot time

Posted 12-09-2009 at 12:30 AM by ~sHyLoCk~
Updated 12-09-2009 at 12: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:

Code:
 # 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:

Code:
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 :

Code:
# 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:

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

Quote:
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.

Code:
#cd /etc/rc.d/

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

It should read:

Code:
if [ -x /etc/rc.d/rc.local ]; then
    . /etc/rc.d/rc.local &
    fi
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.

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

Code:
 #!/bin/sh
    # 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 &
    fi
    done
    # 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
    fi
    fi

    # 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 &
    fi

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

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

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

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

Comments

 

  



All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
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