[SOLVED] Optimize slack boot process / init scripts ?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
(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.
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?
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.
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054
Rep:
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)
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)
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.