LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-03-2007, 08:28 PM   #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
Optimize slack boot process / init scripts ?


I've heard it can be very beneficial to change and optimize the init / boot scripts to make Slackware boot faster.

1) Where can I look to get some specific guidance on how to do this ? Or is this a bad idea ?

It's just that Slackware seems to take kinda long to boot up.

While I'm here, I'd like to also ask this (still about Slackware boot process):

2) I installed Slackware on an old VAIO computer, specs are approximately:

Pentium III M - 1.3 Ghz
128 MB RAM
16 MB ATI Radeon - M
40 GB HDD

The problem is it takes forever to boot. It gets really slow in the early booting process, when it is "Checking BIOS integrity" and then the dots '.............................................' appear really really really slow.

Why ? What is it doing that is taking this long ? I've always though it's loading the kernel into RAM ... is this so ? How can I make it boot faster, if at all possible ? Of course, changing the init scripts will also be helpful, cuz that takes a while too.

Thanks.
 
Old 02-03-2007, 10:18 PM   #2
Th3_J3st3R
Member
 
Registered: Mar 2003
Location: Milwaukee
Distribution: Slackware 12.0
Posts: 84

Rep: Reputation: 16
Have you recompiled your kernel selecting specific options to reflect your hardware?
I had the same thing when I would recompile and select options that my system didnt support, as for specifics I couldnt tell you. What kernel are you using? Or which one did you select when you installed?
 
Old 02-03-2007, 10:49 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Kernel on both my current machine and the older one is huge26.s.

I was thinking of recompiling, but I usually don't like to unless I really have to.

They are both laptops.

I was thinking of trying a 2.4.x kernel to see if it would speed things up, but it has a usb mouse, and I've had problems with the 2.4.x kernel and usb mice. Maybe I'll try. I don't have access to the older computer right now, so I can't do much there. But I can optimize things here on my newer laptop.

(I'm not going to recompile a 2.4.x kernel, I would like to use a 2.6.x kernel for many many reasons ... maybe I'll recompile that, but not right now)

Last edited by H_TeXMeX_H; 02-03-2007 at 10:50 PM.
 
Old 02-04-2007, 12:30 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
To clarify, the slowest part is when it says:

Code:
Loading Linux......................................................
(right before the BIOS integrity verified or whatever)

Each dot takes 5 seconds to appear ... which is insane if you ask me.

So any ideas on why it would boot so slow ? Is this when it is loading the kernel into RAM ? If so, maybe the HDD is really slow at being read, or the RAM isn't working properly ? (I'll check that RAM with memtest when I next have access to that computer, and I'll check the HDD to make sure DMA is enabled if that matters)

Last edited by H_TeXMeX_H; 02-04-2007 at 12:35 PM.
 
Old 02-04-2007, 12:36 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Do you maybe have the "nodma" or "noacpi" boot options?
 
Old 02-04-2007, 12:43 PM   #6
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
Let us know how the memory and the HD are but I tend to think that if you don't have any problems except loading the kernel then it might be something with the kernel. This is where the kernel is loaded into RAM, yes. You might have to check around your kernel config to see if there's anything funky in there.

In my honest opinion you might have to recompile the kernel if for any reason to have a slimmer kernel so that it's not loading as much information into RAM. It's not completely impossible that there's some driver in there that might be "confusing" things when drivers get loaded for the disk or the processor.

You may also want to
Code:
lilo -t -v
This will do a dry run of lilo and let you know if there are any errors in the bootloading process.

EDIT: jschiwal brings up a good point. What's being passed to the kernel at boot?

Last edited by zetabill; 02-04-2007 at 12:45 PM.
 
Old 02-04-2007, 12:58 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by zetabill
Let us know how the memory and the HD are but I tend to think that if you don't have any problems except loading the kernel then it might be something with the kernel. This is where the kernel is loaded into RAM, yes. You might have to check around your kernel config to see if there's anything funky in there.

In my honest opinion you might have to recompile the kernel if for any reason to have a slimmer kernel so that it's not loading as much information into RAM. It's not completely impossible that there's some driver in there that might be "confusing" things when drivers get loaded for the disk or the processor.

You may also want to
Code:
lilo -t -v
This will do a dry run of lilo and let you know if there are any errors in the bootloading process.

EDIT: jschiwal brings up a good point. What's being passed to the kernel at boot?
I have no boot options being passed to kernel.

I'll do the following when I get there and post back results (note that it will take ~ 1 mo. to get back to the other computer ... it's at my other house)

1) Check RAM with memtest
2) Check HDD for DMA enabled
3) Dry run lilo and see if it reports errors
4) Recompile kernel (I'll probably try 2.4.x and see if usb mouse works, if so then I'll use that)

Last edited by H_TeXMeX_H; 02-04-2007 at 12:59 PM.
 
Old 02-04-2007, 01:18 PM   #8
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
The fact that it is hangin on boot.......... shows there is something wrong on your kernel compilation. Seriously, stay away from huge26.s!!! I use it only when I want to find out what modules I need for specific hardware. Just recompile kernel (it hardly takes 15-20 mins) and it will save you many many hours if you configure it correctly.
If you don't want to recompile the kernel, use 2.6.18 kernel packages from the DVD/testing.

Changing the boot scripts won't make any difference in above.

But anyways , see my thread http://www.linuxquestions.org/questi...d.php?t=499631 . There is a pretty long discussion there , I got my boot-up time right now to 25 secs which is pretty okay (and I have included all of what I need).


Prefer 2.6 for kernel recompilation, no need to make dependencies etc. (much much easier).

to check for dma : hdparm /dev/hda | gerp dma

And btw, you used the word "optimize", that can only be done with kernel recompile. Other methods may just reduce no. of services etc.(like sendmail/httpd/mysqld)

Last edited by duryodhan; 02-04-2007 at 01:23 PM.
 
Old 02-04-2007, 02:38 PM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by duryodhan
But anyways , see my thread http://www.linuxquestions.org/questi...d.php?t=499631 . There is a pretty long discussion there , I got my boot-up time right now to 25 secs which is pretty okay (and I have included all of what I need).
Thanks for the link, I'll go through it later today and see what I can do.

Ok, I'll recompile the kernel. Only one question ... this is a laptop, and I don't know much about the hardware inside, I only have what standard hardware probing commands can provide. How would I go about compiling a kernel with only exactly what I need compiled in ? Is there any way to get specific info, or as much info as I need on the hardware of this computer and which parts of the kernel go with which hardware ? (I had problems doing this the last time I wanted to compile a minimal kernel like this ... I must have left some things out or put other things in)
 
Old 02-04-2007, 04:01 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Update: thanks again for that link and info ... that literally cut my boot time in half ... about 20 sec now (ok, more like 38 sec (because it must load hplip and nvidia kernel module otherwise it would be less than 30 sec), but it's a lot faster than before ... it took about 1 min + before)

What I did was move '/sbin/ldconfig' and '/usr/X11R6/bin/fc-cache' calls from 'rc.M' to 'rc.local_shutdown' ... does the same thing really, only at shutdown not startup. Also commented out 'atd' and 'gpm' as they take long to startup and I rarely use them, if I need them I start them manually. Made hotplug un-executable as it is not really needed by anything. And I put an '&' after dhcpcd call, which was also a slow starter ... seems to work just fine (and I see no reason why it shouldn't ... I don't care when it sorts out my dynamic IP, it's probably gonna be before I use the internet anyway). Now for the kernel ...

Last edited by H_TeXMeX_H; 02-04-2007 at 05:54 PM.
 
Old 02-04-2007, 06:31 PM   #11
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
Quote:
Originally Posted by H_TeXMeX_H
I only have what standard hardware probing commands can provide. How would I go about compiling a kernel with only exactly what I need compiled in?
First part: lspci, lsusb, dmesg. These command will tell you more than you want to know about hardware. You can just google for the hardware name for the correct drivername.

Second: For options not related to drivers it's basicly googleing, and trial and error. Read the help available during menuconfig. Those "if unsure say Y/N" messages are really helpful for newbs.
 
Old 02-04-2007, 06:44 PM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
ok, thanks ... seems like it's gonna take a while to get down exactly what I need ... well, I'll work on it when I have time and tweak it until I get it ... seems that's the only way.

Thank you all for your responses
 
Old 02-04-2007, 06:56 PM   #13
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Also, look up the exact motherboard model number by Google, check out the hardware it comes with.
Use the 'compact' option in LILO if your system will allow it.
and third, append 'idebus=66' into your LILO as well, if you see in dmesg "assuming idebus is 33Mhz" and you know that your IDE bus can go faster than that.
When I changed my IDE bus to boot at 66Mhz, it lopped better than 60% off by boot time.
 
Old 02-04-2007, 07:07 PM   #14
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by GrapefruiTgirl
Also, look up the exact motherboard model number by Google, check out the hardware it comes with.
It's a laptop ... so how do I get the MB number ? I can't open it ... it'll fall apart

Quote:
Use the 'compact' option in LILO if your system will allow it.
and third, append 'idebus=66' into your LILO as well, if you see in dmesg "assuming idebus is 33Mhz" and you know that your IDE bus can go faster than that.
When I changed my IDE bus to boot at 66Mhz, it lopped better than 60% off by boot time.
Not sure about compact, but I feel the 'idebus=xxx" might be a tad unsafe. Especially without detailed info on my system.

But good news, I recomplied my kernel and now it's 1/3 the size it was before ... 1MB as opposed to 3MB. This greatly increases boot up time. Now the entire boot process takes 45 sec from the time I hit the on button. I feel that maybe I can get it even lower, but that maybe the time invested it such an action may be too much right now. Maybe during spring break or the summer I'll mess around with it.
 
Old 02-04-2007, 09:01 PM   #15
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
for compiling your kernel and about how to check your hardware etc. etc. see :
http://www.kroah.com/lkn/

And also look at Shilo's guide - Making it scream.

Last edited by duryodhan; 02-04-2007 at 09:36 PM.
 
  


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
what is the scripts in /etc/init.d for? blackzone Linux - General 7 09-06-2006 11:10 PM
starting named on boot without init scripts evilchild SUSE / openSUSE 1 03-05-2005 07:46 AM
Optimize boot process? on RedHat9.0 Forced2Morph Linux - General 1 10-12-2004 06:48 AM
X not starting on boot (init scripts) cootetom Mandriva 11 05-05-2004 08:37 AM
slack init scripts gui10 Slackware 11 05-15-2002 11:12 AM

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

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