Comment Re:it's easy to speed up boot (Score 1) 536
Here is what I use with little side effects. This is for Debian.
1. Moved /etc/init.d/rc to /etc/init.d/orig_rc
2. Created /etc/init.d/rc as:
#!/bin/sh
if [ "$1" -eq 0 -o "$1" -eq 6 ]; then /etc/init.d/orig_rc $*
else
nohup /etc/init.d/bgd_rc $* &
fi
3. Created /etc/init.d/bgd_rc as:
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel
exec 1>&2
echo "1" > /proc/sys/kernel/printk
: > /etc/hotplug/net.enable
nice -n 19 /etc/init.d/orig_rc $*
echo "7" > /proc/sys/kernel/printk
if [ -f /nohup.out ]; then
mv /nohup.out /var/log/console.log
chmod 644 /var/log/console.log
fi
4. Moved some of the time consuming and unnecessary for _my_ startup from /etc/rcS.d into /etc/rc2.d so they start early in rc2.d; e.g., moved /etc/rc2.d/S36disover to /etc/rc2.d/S036discover and /etc/rcS.d/S40hotplug to /etc/rc2.d/S040hotplug. Note S40 -> S040 so dependencies of files in /etc/rc2.d are maintained.
5. I also installed mingetty so it logs me in automatically on VT 1, but this is in general not a good idea.
With all this, I get prompt almost as soon as init is started. All time taking tasks, such as pcmcia, hotplug etc. are run in the background after logged in.
1. Moved
2. Created
#!/bin/sh
if [ "$1" -eq 0 -o "$1" -eq 6 ]; then
else
nohup
fi
3. Created
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel
exec 1>&2
echo "1" >
: >
nice -n 19
echo "7" >
if [ -f
mv
chmod 644
fi
4. Moved some of the time consuming and unnecessary for _my_ startup from
5. I also installed mingetty so it logs me in automatically on VT 1, but this is in general not a good idea.
With all this, I get prompt almost as soon as init is started. All time taking tasks, such as pcmcia, hotplug etc. are run in the background after logged in.