LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-19-2010, 05:18 AM   #1
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
slackware 13.1 speeding up boot time


Just some things I changed to speed up the boot time.

In '/etc/rc.d/'

rc.acpid
Code:
    echo "Starting ACPI daemon:  /usr/sbin/acpid &"
    /usr/sbin/acpid &
rc.hald
Code:
    echo "Starting HAL daemon:  /usr/sbin/hald --daemon=yes &"
    /usr/sbin/hald --daemon=yes &
rc.M

Note that commenting out some of these may mess things up, but you can run these commands manually. However, I don't see why this has to be done EVERY BOOT.

Code:
# Update the X font indexes:
#if [ -x /usr/bin/fc-cache ]; then
#  echo "Updating X font indexes:  /usr/bin/fc-cache -f &"
#  /usr/bin/fc-cache -f &
#fi

# 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

# These GTK+/pango files need to be kept up to date for
# proper input method, pixbuf loaders, and font support.
#if [ -x /usr/bin/update-gtk-immodules ]; then
#  /usr/bin/update-gtk-immodules --verbose
#fi
#if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then
#  /usr/bin/update-gdk-pixbuf-loaders --verbose
#fi
#if [ -x /usr/bin/update-pango-querymodules ]; then
#  /usr/bin/update-pango-querymodules --verbose
#fi
rc.S

Code:
# Mount non-root file systems in fstab, but not NFS or SMB 
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted.  Also check that
# devpts is not already mounted before attempting to mount
# it.  With a 2.6.x or newer kernel udev mounts devpts.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
#sleep 3
Of course you can also use the lilo 'compact' option, and compile a new kernel ... but I bet many will not do that.

Anyway, I'll be away on vacation for a while, so I'll see you later
 
Old 07-19-2010, 09:05 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Have you tried initng?
 
Old 07-19-2010, 10:14 AM   #3
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
This may come in handy... wanted to cut down on some of the "extra" stuff, but did not have time to look for them.
 
Old 07-19-2010, 10:48 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Woodsman's advice on this:

http://humanreadable.nfshost.com/sdeg/boot_time.htm
 
1 members found this post helpful.
Old 07-19-2010, 10:52 AM   #5
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
I moved the GTK immodules updating into a new file and named it rc.update-gtk, and added a call to it from rc.M. This means I just need to chmod it every now and then to run it.

What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
Anyone any suggestions?

TIA
 
Old 07-19-2010, 11:35 AM   #6
rmjohnso
Member
 
Registered: Mar 2006
Location: Wisconsin
Distribution: Slackware64-Current
Posts: 294

Rep: Reputation: 43
Quote:
Originally Posted by vdemuth View Post
I moved the GTK immodules updating into a new file and named it rc.update-gtk, and added a call to it from rc.M. This means I just need to chmod it every now and then to run it.

What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
Anyone any suggestions?

TIA
You could always move the script to one of the cron directories and have cron take care of it for you. That's typically what I do.
 
Old 07-19-2010, 06:06 PM   #7
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
You could try this I've just knocked up :
Code:
#!/bin/bash
SCRIPT=${1:-""}
NUMBOOTS=${2:-10}
CONFFLE=${3:- "/etc/boots.count"}
if [ ! -e $CONFFLE ] 
	then
	echo "boots=0" > $CONFFLE
fi
TEST=$(cat $CONFFLE  | sed 's/boots=//' )
let TEST+=1
if [ $TEST -gt $NUMBOOTS ]
	then
	let TEST=$NUMBOOTS
fi
if [ $TEST -eq $NUMBOOTS ] 
	then  
	let TEST=0
	sh $SCRIPT

fi
echo "boots=$TEST" > $CONFFLE
It's a simple little bash script that takes another script name, number of boots to cycle (optional - defaults to 10), boot count file (optional - defaults to /etc/boots.count) as parameters. You need to save it somewhere (say /etc/rc.d/rc.boots" and make it executable. Then just substitute your call in /etc/rc.d/rc.M with this and the script name to run. So - to run your rc.update.gtk every 20 boot just put this in /etc/rc.d/rc.M
Code:
/etc/rc.d/rc.boots /etc/rc.d/rc.update-gtk 20"
Note that I have just cobbled this together and done very, very little testing and the script itself does no error checking so beware. It just keeps a count in /etc/boots.count but you could supply differing count files for different boot scripts so they maintain their own count files. This is neccesary as each call of the script treates the associated count file as it's own. If you just have the script to run in that command with a cycle number it defaults to ten boot cycles.
 
Old 09-21-2010, 12:13 PM   #8
theCapitain
Member
 
Registered: Jul 2010
Location: Northern Italy
Distribution: Slackware, Slax
Posts: 59

Rep: Reputation: 2
Hi,
I've followed the suggestions pointed out in this thread, beside putting in background the start of some daemon I've put part of rc.M into an executable saved in cron.daily like explained by Woodsman obtaining a considerable reduction in boot time. Now I wander if there is a way of knowing if and when this cron's commands are executed … just to be sure that I've done everything properly. Can someone give me instructions?

Last edited by theCapitain; 09-21-2010 at 12:16 PM.
 
Old 09-21-2010, 12:26 PM   #9
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
I cut down my boot time on slackware-13.0 by building a monolithic kernel with just the
built-in hardware that's part of my laptop so much so that lsmod returns a blank screen
until I plug something in to a usb port
 
Old 09-21-2010, 12:34 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
I just buy a faster machine.
 
Old 09-21-2010, 12:38 PM   #11
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
Quote:
Originally Posted by Richard Cranium View Post
I just buy a faster machine.
Sounds more like a Windows-specific solution to me...
 
Old 09-21-2010, 12:45 PM   #12
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Works for slack too.
 
Old 09-21-2010, 12:49 PM   #13
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
I just go make coffee while it boots.
 
Old 09-21-2010, 01:08 PM   #14
easuter
Member
 
Registered: Dec 2005
Location: Portugal
Distribution: Slackware64 13.0, Slackware64 13.1
Posts: 538

Rep: Reputation: 62
Quote:
Originally Posted by GazL View Post
I just go make coffee while it boots.
+1.
 
Old 09-21-2010, 01:46 PM   #15
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Richard Cranium View Post
I just buy a faster machine.
I accept donations of used hardware from rich people :-)
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Speeding up LiveDVD boot, is it possible to get a list of files access on boot? MikeyCarter Linux - Software 1 11-17-2009 02:38 AM
Speeding up boot time with Ubuntu Netbook Remix callumacrae Linux - Laptop and Netbook 2 11-02-2009 10:59 AM
Speeding up compile time? Method9455 Linux - Kernel 1 07-01-2007 07:59 PM
Need help speeding up my boot NonSumPisces Linux - General 2 09-05-2004 04:42 PM
Speeding up Linux (Slack) boot pandasuit Slackware 19 08-28-2004 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:55 PM.

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