1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On Sun, Apr 20, 2003 at 05:03:39PM +1200, leon j. breedt wrote: |
5 |
> sorry about blowing smoke...i think i just witnessed one of faster bootups |
6 |
> after changing to LC_ALL=C. this will teach me... |
7 |
|
8 |
I have gotten fast booting of a Gentoo box nearly down to a science at |
9 |
this point. ;) Setting LC_ALL=C is not something I've done yet. |
10 |
|
11 |
I have a notebook which lacks APM and found swsuspend unstable. |
12 |
|
13 |
|
14 |
My assumption was that there were core things which must be done before I |
15 |
login to the system, and anything else could be done behind the scenes. I |
16 |
have actually speculated that it is probably safe to build a config which |
17 |
does little more than mounting filesystems, bringing up lo, and starting a |
18 |
display manager. I'm not that far along yet. Here's what I have done so |
19 |
far: |
20 |
|
21 |
My kernel has everything built as modules which can be, but it still takes |
22 |
too long to boot. (Before I modularised everything, the kernel itself |
23 |
took 14 seconds, now it's about 10 seconds..) I do not know how to make |
24 |
it any faster to boot. Tips here are welcome. Keep in mind I am not |
25 |
looking for the "feel" of being fast. I'm doing this with a stopwatch. |
26 |
|
27 |
Runlevel boot contains bootmisc, checkroot, clock, hostname, localmount, |
28 |
modules, net.lo, rmnoilogin, and urandom. I've modified modules to simply |
29 |
perform the modprobing in the background, and I do not bother to print out |
30 |
the eend for the notices of module loading. Everything else normally in |
31 |
boot was removed because I don't need it. |
32 |
|
33 |
Runlevel default has been totally gutted. It contains metalog and extra, |
34 |
that is all. I'm not sure metalog will not be removed soon. |
35 |
|
36 |
Runlevel extra is interesting. Here is /etc/init.d/extra: |
37 |
|
38 |
#! /sbin/runscript |
39 |
|
40 |
depend() { |
41 |
after * |
42 |
} |
43 |
|
44 |
start() { |
45 |
/sbin/telinit b &>/dev/null & |
46 |
} |
47 |
|
48 |
|
49 |
The things that actually live in runlevel extra are cupsd, gpm, ifplugd, |
50 |
local, metalog, and pcmcia. The inittab line basically starts this in the |
51 |
background with output sent to the bitbucket. |
52 |
|
53 |
It still takes a significant amount of time for the services to all start, |
54 |
but they need not be running at that point, so I don't have to care. |
55 |
|
56 |
|
57 |
Before I began this effort, I found two problems. First, as soon as the |
58 |
e100 module was loaded, hotplug would be intelligent enough to try and |
59 |
load the damned network script. Absolutely brilliant, given that it's a |
60 |
laptop, the ethernet connector is permanently affixed, that net.eth0 does |
61 |
not as Gentoo provides it support anything more intelligent than dhcpcd, |
62 |
and that I almost never plug in an ethernet cable unless I'm leeching. I |
63 |
have ifplugd to handle this interface. |
64 |
|
65 |
Why is this significant? It added several seconds to the boot sequence as |
66 |
runlevel 3 tried to down eth0, which meant letting dhcpcd sit there for as |
67 |
much as ten seconds attempting to commit suicide. I spent nearly an hour |
68 |
trying to figure out how it was getting started, and modified net.agent to |
69 |
treat eth0 as an assumed preconfigured interface. Some mechanism to tell |
70 |
hotplug to not try to configure certain interfaces other than editing bash |
71 |
scripts would be nice. |
72 |
|
73 |
Another error which was pre-existing and never isolated is this: |
74 |
|
75 |
insmod: insmod: a module named usbcore already exists |
76 |
insmod: insmod: insmod |
77 |
/lib/modules/2.4.20-acpi-r9/kernel/drivers/usb/usbcore.o failed |
78 |
insmod: insmod: insmod usbcore failed |
79 |
|
80 |
I cannot find what is attempting to insmod usbcore. In fact, I cannot |
81 |
find any scripts which call insmod at all in /etc or in /sbin. hotplug's |
82 |
usb-agent will try to modprobe it, but that's not an issue really since |
83 |
modprobe would deal sanely. I am considering that I might want to modify |
84 |
init.d/modules to modprobe certain things at boot time and certain other |
85 |
things in extra. |
86 |
|
87 |
I guess it might work to grab the most current initscripts, but my |
88 |
notebook is a machine which really should not be compiling all the time, |
89 |
so I've been hesitant to run ~x86 when not necessary. Doesn't seem to |
90 |
matter though, /sbin/rc is basically the same as on my notebook and that |
91 |
is probably where further optimisations would be made. |
92 |
|
93 |
I welcome assistance, a clue where the above insmod error is from, and a |
94 |
suggestions as to how to get the boot under 17 seconds. This is down from |
95 |
24, but I am aiming for less still. (I note that booting Debian used to |
96 |
take over a minute on my notebook..) |
97 |
|
98 |
- -- |
99 |
Joseph Carter <knghtbrd@×××.org> This end upside-down |
100 |
|
101 |
"Nvidia's OpenGL drivers are my "gold standard", and it has been quite a |
102 |
while since I have had to report a problem to them, and even their brand |
103 |
new extensions work as documented the first time I try them. When I have |
104 |
a problem on an Nvidia, I assume that it is my fault. With anyone else's |
105 |
drivers, I assume it is their fault. This has turned out correct almost |
106 |
all the time." |
107 |
-- John Carmack |
108 |
-----BEGIN PGP SIGNATURE----- |
109 |
Version: GnuPG v1.2.1 (GNU/Linux) |
110 |
Comment: 1024D/20F62261F1857A3E79FC44F98FF7D7A3DCF9DAB3 |
111 |
|
112 |
iEYEARECAAYFAj6iWDYACgkQj/fXo9z52rPUWgCeLyIne2AvXyhy+rBAl60ZNl3e |
113 |
VSMAn0hfI4plMCdWSyGYROlLOkz1fXTV |
114 |
=69Ch |
115 |
-----END PGP SIGNATURE----- |
116 |
|
117 |
-- |
118 |
gentoo-dev@g.o mailing list |