LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-07-2008, 07:53 AM   #1
me-$-on
Member
 
Registered: May 2007
Posts: 64

Rep: Reputation: 15
Tweaking and pushing Slackware12.1-what now?


Hello.
Since i am familiar with windows for a long time, i always tried everything possible, to make a system faster, more secure and more flat.
Of course, i don't want to make a lfs now, but i still try to manage this now under my sw12.1 with conventional methods.
During the installation there are several options(daemons) , which one can check or uncheck, that's already ok.
But i want more tweaking.
-
-
Could someone do me a favour and reply to this by giving some small hints, how to tweak effectively my system?
My primary aims look like that:
-
- faster bootup
- boot up debug screen shall only be visible, until x and my vga are ready, then
the gui login screen shall appear, although dmesg still is running in the back.

- deactivating uneccesary daemons ( already done by setup, but what else is possible
?)
- that's all for the time being!
-
-
I'm already reading the LinuxSysAdmin Guide, the Securing and configuring the Linux-Kernel-the ultimate solution and two other documents now, and i will follow their hints, but only for completion, i'm now asking here in the forum, what else could be made.
THX!
 
Old 06-07-2008, 10:32 AM   #2
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Slackware
Posts: 7,341

Rep: Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744
Smile

Quote:
Originally Posted by me-$-on View Post
-- faster bootup
I'll answer one of your questions:-)

Break-out a text editor of your choice and edit /etc/lilo.conf

Change the following area:

# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200

To a lower number (here's mine):

# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 600

To edit lilo.conf you could use nano which is an easy_to_use editor

#nano /etc/lilo.conf
 
Old 06-07-2008, 11:04 AM   #3
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Already got that

Thanks for that hint.

I think, i already have done that.
My slackware boot logo flickers for about 1 second, just to show every noob, what i'm running.
I mean after that i see the dmesg-boot screen scrolling ( at leat i think it is dmesg too, what is happening then).
I want to shorten this procedure.
 
Old 06-07-2008, 11:37 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by me-$-on View Post
I want to shorten this procedure.
Then you want one of those parallelising init replacements. I'll recycle a post with some names of 'em in it. The thread also goes a bit into measuring performance and tries to ask what is and what isn't relevant wrt optimisation: http://www.linuxquestions.org/questi...22#post3157022
 
Old 06-07-2008, 12:20 PM   #5
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by me-$-on
- faster bootup
You could try compiling your own kernel containing only options relevant to your system -- but I wouldn't expect too much of a difference in boot-up time with a custom kernel compared to the generic-smp kernel. If you read `man lilo.conf` it will tell you that adding the "compact" option to /etc/lilo.conf (and subsequently running /sbin/lilo to write it to the MBR, of course) reduces load time. This does not work on ALL systems though, so it's a hit-or-miss solution.
Quote:
Originally Posted by me-$-on
- boot up debug screen shall only be visible, until x and my vga are ready, then
the gui login screen shall appear, although dmesg still is running in the back.
By this I'm assuming you want a GUI login screen to appear instead of the console login and subsequent "startx" command. To do this, edit /etc/inittab and change your default runlevel from 3 to 4. You would change this:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
to this:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
That only provides ONE VT though, so if you want more than one (ie you want it to be more like runlevel 3) you would have to edit this part:
Code:
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
and include 4 as an option in more of the VTs (by default, the only VT available in runlevel 4 is tty6). See `man inittab` for more information.
Quote:
Originally Posted by me-$-on
- deactivating uneccesary daemons ( already done by setup, but what else is possible
?)
All of the init scripts that launch services are located in /etc/rc.d/. To enable/disable services, you can set/unset the executable bit using `chmod +x rc.scriptname` and `chmod -x rc.scriptname` as root. Disable the scripts you don't need (of course, figuring out which scripts and services you don't need is up to you). If you REALLY want a fast bootup you can hack the rc.S and rc.M files, but that would be for advanced users only and you should understand exactly what the scripts are doing before editing them.
 
Old 06-07-2008, 01:00 PM   #6
ArkRoyal
LQ Newbie
 
Registered: Jun 2008
Posts: 11

Rep: Reputation: 0
One of the things you can do is recompile your kernel with everything you need in the kernel. Use no modules at all. Then make /etc/rc.d/rc.udev not executable. This will turn off hot pluging and also prevent module loading. If you need some module, I do believe that some video for linux stuff only runs from modules, you can't do this.

You could also hack the start up scripts and background things so the script continues while other things go on in the background. This will take a little work and some knowledge of what need to run before other things start. For example, and maybe the only thing, rc.inet1 needs to complete before rc.inet2 starts. If you are adventurous you might want to fold inet2 into inet1, good luck.

As for disabling dmesg at boot up I would suggest against it. It doesn't take much, if any at all, time for it to run and when something BAD happens it usually is your only information as to what is the trouble. So don't blind yourself for a millisecond of boot time.
 
Old 06-07-2008, 01:10 PM   #7
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
Do you really want to speed up the boot procedure?

I have lilo waiting 0 seconds - so that's as fast as that part of booting can get.

I use ranish partition manager as a boot manager so if I want to change the boot partition or which partitions are available I use that.

Normally I don't, so I just hit enter.

What slows down booting are the periodic file system checks and probing for new hardware.

If you really wanted to speed up the boot procedure those would be the two areas to concentrate on - and I would advise against it and pose the question how much time are you really saving?

With Linux you do not have to re-boot very often at all, unlike with versions of Microsoft OS's.

You boot once maybe in the morning - saving max 1 minute in booting time will cost you a lot of work.

The hardware testing seems tedious but compared to the difficulties you would have if you installed new hardware or if you got problems with your file systems, I'd say that slight delay is worth it.

I would definitely say that you should turn off daemons that you don't use - if not for speed then for security reasons. For example, don't have cups and apache running when in fact they aren't being used.

If you think you need to re-boot, check out the telinit command and what sighup does.
 
Old 06-08-2008, 01:25 AM   #8
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by harryhaller View Post
What slows down booting are the periodic file system checks and probing for new hardware.

If you really wanted to speed up the boot procedure those would be the two areas to concentrate on - and I would advise against it and pose the question how much time are you really saving?
If you system starts doing a routine fsck you can simply CTRL-c out of it if you don't feel like waiting.

The biggest gains are from not using the huge kernel, turning off services you don't need, and making sure you don't have errors at bootup. If you have trouble getting an IP from DHCP, for instance, that can particularly slow things down.

Of course hacking the init scripts is necessary to go the extra mile, and only you can decide if it is worth it.
 
Old 06-08-2008, 06:01 AM   #9
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks very much!

Ok, all those hints are exactly what i supposed, to get.
Thanks!
-
-
It is right, that most linux systems are started once and that the little amount of time does not count comparing to the usage of almost a whole day.
-
-
The computer i'm trying to tweak is the one of my cousin.
I tweaked his old wxp up to the most possible performance.
After having still many problems with intrusion and infection by malicious scripts, i decided to lift his mind into the devine spheres of linux.
-
Better for me than coming every three weeks and reinstalling everything!
-
Now he misses the 11 seconds start-up, as he had before with windows.
He uses his computer only for internet, printing, multimedia.
-
So now I have many ideas posted by you and i will try some things first on my slackware before doing this for my cousin.
-
And, it is right, that the DHCP procedure and the udev-triggering take the most time while boot-up.
And, i think, for an usb, i need udev, or not?
 
Old 06-08-2008, 10:34 AM   #10
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by me-$-on View Post
And, i think, for an usb, i need udev, or not?
You don't have to, but it can make life simpler. I don't recommend bypassing udev/HAL/dbus for your cousin just to boot a little quicker.

This thread, Boot time Slackware and Debian, might interest you as well. It shows an example of speeding up the boot a little by pushing some of the actions to a cron job.

I don't think ldconfig, fc-cache, update-mime-database, or update-desktop-database need to be included in such a "house-cleaning" cron job. These are/can be run as a background process during boot so they should not slow the boot down.

Here is my shortened /etc/cron.daily/house-cleaning
Quote:
#!/bin/sh
# /etc/cron.daily/house-cleaning
# These were taken out of /etc/rc.d/rc.M to speed up the boot

# 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/nu$
fi
done
# This would be a large file and probably shouldn't be there, but if it is
# then it must be kept updated, too:
if [ -r /usr/share/icons/icon-theme.cache ]; then
echo "Updating icon-theme.cache in /usr/share/icons..."
/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/$
fi
fi

# SCIM and other GTK+ input methods like this file kept updated:
if [ -x /usr/bin/gtk-query-immodules-2.0 ]; then
echo "Updating gtk.immodules: gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.imm$
/usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 2> /dev/null
fi
Doing something like this is particularly useful if you do reboot your computer more than once in a day. Remember that hacked init scripts can get overwritten during a system upgrade if you are not careful.
 
Old 06-08-2008, 11:24 AM   #11
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by me-$-on
Now he misses the 11 seconds start-up, as he had before with windows.
Windows really started up in 11 seconds? What version of Windows is that? Is that from hibernation or suspend or is it the true bootup time? Maybe I've just been using old hardware with Windows, but bootup time was nothing like that.
 
Old 06-08-2008, 11:44 AM   #12
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by T3slider View Post
Windows really started up in 11 seconds? What version of Windows is that? Is that from hibernation or suspend or is it the true bootup time? Maybe I've just been using old hardware with Windows, but bootup time was nothing like that.
Windows "boot time" is an illusion because once you login you have to wait for X amount of services to start before you have your full resources to use. In Linux, when the system is booted pretty much everything is already started, so there is no "slow time" right after you log in. This is particularly notable if the Windows installation uses things like Anti-Virus/Spyware, etc software or uses Automatic Updates (or any Auto-Update features).
 
Old 06-08-2008, 12:15 PM   #13
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by shadowsnipes
Windows "boot time" is an illusion because once you login you have to wait for X amount of services to start before you have your full resources to use. In Linux, when the system is booted pretty much everything is already started, so there is no "slow time" right after you log in. This is particularly notable if the Windows installation uses things like Anti-Virus/Spyware, etc software or uses Automatic Updates (or any Auto-Update features).
Very true -- but I don't think any of my Windows systems even got to the desktop in 15 seconds. But I haven't used Windows regularly for a while, so it may have been old hardware just being slow -- but I'm still impressed.
 
Old 06-08-2008, 01:31 PM   #14
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
I wrote a decent post on how do speed up boot time in 12.0, much of it should still apply to 12.1, user discretion is advised, as not all things may match:
http://www.linuxquestions.org/questi...ml#post2921723

When I upgrade to 12.1, I'll write a new one, maybe on my site where it will be more accessible.
 
Old 06-08-2008, 01:34 PM   #15
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by T3slider View Post
Very true -- but I don't think any of my Windows systems even got to the desktop in 15 seconds. But I haven't used Windows regularly for a while, so it may have been old hardware just being slow -- but I'm still impressed.
Windows XP, for instance, can actually run really well even on old hardware if it is trimmed up nicely. Disabling all unnecessary services (particularly network related ones), disabling unused hardware (drivers), turning off graphical fluff (including systray icons), using static page files on another hdd, and defragging the system at least once a month can do wonders. If you don't need networking at all, you can really cut some stuff out and get even a PIII class computer to boot in about a dozen seconds.

Regardless of all of this, however, you can never cut as much as you can with Linux, because Windows is not truly modular like Linux is. I can get my Slackware system to boot in a few seconds if I want to by simply just hacking the init scripts.

I think the next versions of Windows are moving towards a more modular style, because M$ is realizing not everyone wants bloated software like Vista.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Pushing a LF to a screen Ghostwheel Linux - Server 3 03-05-2007 10:45 AM
pushing a shell in FC6 mrurmil Linux - Security 5 02-16-2007 08:33 AM
Pushing the desktop tkrin Linux - Networking 12 12-21-2005 09:55 PM
Pushing logs on a network af_dave Linux - Networking 1 07-25-2004 08:42 PM
pushing applications edrabs Linux - Software 1 11-26-2003 02:13 AM

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

All times are GMT -5. The time now is 09:20 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