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 &
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.
#nano /etc/cron.daily/script.sh
And paste the following 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:
#chmod +x /etc/cron.daily/script.sh
Now reboot your system and see if it has improved the boot time.
Regards
4 Trackbacks / Pingbacks
Improving Slackware boot time « The Linux Space | Just linux! December 9th, 2009 at 17:32
[...] View post: Improving Slackware boot time « The Linux Space [...]
Pimp my Slack! « The Linux Space December 13th, 2009 at 07:23
[...] this [...]
v4nelle's blog » Βελτίωση εκκίνησης Slackware June 13th, 2010 at 03:12
[...] Για το Slackware μπορείτε να ρίξετε μια ματιά εδώ και εδώ [...]
Βελτίωση εκκίνησης Slackware « Another one trash blog… May 28th, 2011 at 16:50
[...] Σε desktop μηχανήματα όλοι θέλουμε να έχουμε γρήγορο boot. Για το Slackware μπορείτε να ρίξετε μια ματιά εδώ και εδώ [...]