Modify rc.M for a faster boot, is this safe.
I have managed to half my boot speed to around 20 seconds by making a couple of changes to rc.M
I would like to know if what I have done is safe or will it cause unexpected problems further down the line. Code:
# Initialize the networking hardware. Remmed font cache update, icon cache update, mime type update and GTK+/pango but added them to a script that I intend to run from cron. Code:
#!/bin/sh samac |
None of these modifications will speed anything up significantly. First, you cannot background inet1 because it is sourced. Second, the '&' at the end of the other commands will background them, so I don't see why you would move these to cron. The ones you should move to cron are the GTK+/pango updates as these are very slow and don't need to be run very often.
|
Hmm rc.inet1 on my computer takes at least 15 seconds to find the dhcp address, yet GTK+/pango are completed in about 1 to 2 seconds. OK I agree with the other things.
samac |
Updates library links and such from cron is recommended actually by many people here to shave off the boot time. As far as inet however, you may want to fully test that before committing it. Messing with inet1 because it's the first network daemon initialized can cause a lot of problems with network services, so do be VERY careful with it.
There is yet another way to shave off more boot time but it involves replacing sysvinit with another init package like Runit. Now before you go rushing off to grab Runit, let me warn you ahead of time. Runit does NOT come with premade run scripts to initialize daemons, you have to create them on your own using the trigger commands located in each sysv/bsd script used by Slackware and it's a tedious process to create, test, and debug them. It is however sysvinit script compatible, and you can run sysvinit and bsdinit scripts from Runit while you migrate them to Runit run scripts. The Runit website has a lot of information that is vital you fully read and understand. This is just my personal opinion, but Runit is fast and highly customizable as an init system, but it's not as user friendly as sysvinit and bsdinit. Most stuff is admin created, so you'll have to know bash shell scripting at least and daemon control executions and flags extensively. It handles runlevels differently also. It does have an auto triggered console in case a boot process fails which is nice for administration purposes. As well as this most daemons can be loaded in parallel vastly speeding up boot time and shutdown processes, it also does daemon management as well. My suggestion is to not go the route of an alternative init until you fully understand init systems. BSDinit ans SysVinit can be sped up, but it depends on which service daemons you want to load, and when you load them. Desktops like KDE and Xfce have the ability to run daemons on startup in the background. I've been experimenting with Runit for a few months now but I'm still not comfortable with it, however, it is one of the more promising init systems that spans several operating systems across the UNIX spectrum. |
My machine is a stand alone machine only used to access the internet and read email. I run no other network services, that I am aware of, and so far it doesn't seem to have had any problems, although I was concerned that rc.inet2 would probably be run before rc.inet1 finished configuring the hardware.
I have no plans to change to Runit, but I would like to speed up my dhcp connection. The main problem is that my broadband router needs longer than the default Slackware setup time to be found, to reply and set up dhcp. So I've had to lengthen the wait time from 10 to 15. If this process could be done in the background then I get my boot time to about 20 seconds. samac |
Had a quick look at rc.inet2 and the only thing that I use in there is rc.firewall, possibly rc.inetd, so I can't see a problem for me. Am I missing something?
samac |
Quote:
|
If you want a faster boot, consider looking at e4rat. Once setup, it monitors all the programs and files that are used for a certain period of time - say 10 minutes. Then, it rearranges all the files on disk to be physically ordered in the order you use them. This results in a boot process that merely shifts the disk head in a steady direction, not randomly. I found it to be very significant. And it's not only the boot - there's the startup of X-windows, your DE (eg gnome,kde, xfce) and the first few programs you generally use (firefox, thunderbird, libreoffice, xterm - all of these start up faster. As long as you set the sample period big enough. Of course, all meaningless if you have a ssd. I recently acquired a hybrid disk - a 1 TB laptop drive with 8 GB of ssd - 4 for read-cache and 4 for write cache. This also makes a difference, altho' you have no real control over how it works.
|
Quote:
|
My router is supplied by the ISP and it only wants to connect using dhcp, so a atatic IP doesn't seem to be the solutions, unless anyone knows a way around this.
samac |
Just set up a static IP and your router as standard gateway and nameserver, I don't see why this shouldn't work.
|
Still no luck
IP 192.168.3.33 netmask 255.255.255.0 router IP 192.168.3.254 Gateway192.168.3.254 nameserver 192.168.3.254 or 8.8.8.8 I'm using netconfig as root and restarting rc.inet1 and rc.inet2 after each modification. I'm currently back on dhcp. samac |
Could you tell us the make of this router, so that we can all avoid it.
|
Quote:
|
Quote:
samac |
Layout:
computer ---- Belkin F5D7230 ----- Zyxel P-660R-T1 ----- ISP via telephone line ..................Wireless Access Point samac |
The Belkin has a version number A000de and it is not possible to install dd-wrt. Is what you are suggesting still possible?
samac |
Get a Buffalo Networks router.
|
Quote:
|
Quote:
|
Hmm. http://cache-www.belkin.com/support/...xxx_manual.pdf and scroll to page 45.
Setup your IP pool to not include the address that you want to give your computer that you're talking about in this thread (otherwise it might be given to another machine that logs into your network). |
Quote:
|
Quote:
|
@Richard Cranium
Thanks for the link much better than the pamphlet that came with the router. I do have access to the router, but I haven't been able to set things up yet, perhaps the manual will help (I hear cries of RTFM resound widely across the internet). @TobiSGD & Richard Cranium Could it have something to do with the Belkin Wireless router being set up as a wireless access point that is causing the problem with it not connecting through to the internet when I set a static IP in rc.inet1.conf samac |
Quote:
Back in the day when wireless drivers were rare (and troublesome) on Linux and nearly non-existent on OS/2 and BeOS I circumvented the problem by using a wired NIC supported sweetly in each, and connected wirelessly through a cheap little portable WAP. Worked great for years until I just decided wired was better in too many ways. |
Quote:
|
Marking this as solved.
I had to change the usage of the Belkin from a wireless access point back to a router, then I had reset it and set it back up. Then after running netconfig and restarting the network. I have internet and also a machine that boots in about 19-20 seconds after the lilo prompt. samac |
All times are GMT -5. The time now is 07:41 PM. |