You are not logged in.

#1 2004-12-06 22:03:45

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Fastboot Initscript Patches

Hey!

I just make a couple little modifications to the Arch Linux initscripts...  Basically, it will start up your computer more similar to a Windows system:  It will start up what's neccessery ; bring up the login; then start up daemons.  This is how I did it:

When FASTBOOT is enabled in rc.conf, the daemons will be all run in the background, so you can login much quicker.  The downside is that there will be a little lag during the inital startup (much similar to Windows systems).  But for people who reboot there computer often, this is a useful option.  I really hate waiting for the hotplug and sshd daemons to start up before I can log in.

My old solution was to use a desktop manager, and put that as my first daemon, so I could log into my desktop while daemons are still running, but I'm not happy with any of the login managers currently available.  These patches are a solution for this.

Now these patches don't bloat the initscripts, nor force you to boot this way.  The default is FASTBOOT="no", so you don't have to conform to someone else's preferences.

To apply this patch, go into the src directory of initscripts and do:

patch -p1 < fastboot.patch

I'll post the link to the patch in a minute!  I'm testing out my server, it's been giving me problems lately... Enjoy everyone!


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#2 2004-12-06 22:08:21

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Fastboot Initscript Patches

if all tests are ok and people like it (i run my own initscripts that do similar thing), then you can maybe try to convince God (did i said God? i mean Judd ;-) funny, that these 2 names rhyme) to addapt your solution


The impossible missions are the only ones which succeed.

Offline

#3 2004-12-06 22:10:50

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#4 2004-12-06 22:13:57

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

Please test and tell me what you think!


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#5 2004-12-06 22:18:57

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

dp wrote:

if all tests are ok and people like it (i run my own initscripts that do similar thing), then you can maybe try to convince God (did i said God? i mean Judd ;-) funny, that these 2 names rhyme) to addapt your solution

Heh, yeah.  I submitted a feature request.  The only thing I'm wondering about is the logging.  For my logging, I'm outputting all of the daemon messages and errors to /var/log/init.daemon.  This file is replaced every startup.  I'm not sure what the Arch way of doing this is, or the proper way.  Any suggestions?


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#6 2004-12-06 22:34:31

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Fastboot Initscript Patches

i would also suggest backgrounding the shared library update on boot too... throw it in the same patch... and if you're feeling sassy you can add a parameter for the sleep time between ifconfig $IFACE up and dhcpcd $IFACE in the network boot script

Offline

#7 2004-12-06 22:35:14

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Fastboot Initscript Patches

and profile it with this: http://bbs.archlinux.org/viewtopic.php?t=8485
its a great little utility I found

Offline

#8 2004-12-06 22:39:16

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: Fastboot Initscript Patches

I just booted from a cold system to a desktop in <30 seconds.  Thanks punkrockguy.  Also, I didn't notice any problems with it at all.  I simply fail to see a downside to this...  Such a simple thing...


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#9 2004-12-06 22:43:09

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Fastboot Initscript Patches

aCoder wrote:

I simply fail to see a downside to this...  Such a simple thing...

well, it does background all boot daemons... while the script portion itself is backgrounded, the daemons are not - meaning that inorder execution is still there.  however it's possible that the foreground can get to some points expecting the background to be complete... I don't know for sure but i would stress test it to be sure (many different boot order configurations)... perhaps it may screw up gdm/kdm/xdm or something... though these can always be placed first in the daemons array to guarentee speedy delivery

Offline

#10 2004-12-06 22:51:37

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: Fastboot Initscript Patches

GDM works fine for me.  However, I put it in inittab rather than the daemons array.


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#11 2004-12-06 23:04:54

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: Fastboot Initscript Patches

I've just tested it, and it works fine, but I can't find the file /var/log/init.daemon


And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.

Offline

#12 2004-12-06 23:31:09

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

phrakture wrote:

i would also suggest backgrounding the shared library update on boot too... throw it in the same patch... and if you're feeling sassy you can add a parameter for the sleep time between ifconfig $IFACE up and dhcpcd $IFACE in the network boot script

Hmm, the shared library is a good idea!  Bash really isn't my specialty, but I'll give it a try. I'll submit a second patch later!


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#13 2004-12-07 00:03:27

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

kakabaratruskia wrote:

I've just tested it, and it works fine, but I can't find the file /var/log/init.daemon

Oh, I now know why... I can fix it:  but before I do:  Is this a good way to log the daemon messages?  What would be the standard arch way to do it?  Would minilog already log this information?  Should I use minilog somehow?  I'm clueless on this part, I need some help.  What do you think?


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#14 2004-12-07 00:13:19

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Fastboot Initscript Patches

phrakture wrote:

i would also suggest backgrounding the shared library update on boot too...

add that and u've got yourself a winner wink

Offline

#15 2004-12-07 01:04:22

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Fastboot Initscript Patches

phrakture wrote:

i would also suggest backgrounding the shared library update on boot too...

excellent idea!  8) ... booting on battery, it takes me over 40s to update the shared links  :evil:


The impossible missions are the only ones which succeed.

Offline

#16 2004-12-07 02:23:15

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

fastboot v2 out.. changes:

logger works... sort of...
shared library links now runs at end in background
new PKGBUILD available

Patch:
http://lukaswayne.freelinuxhost.com/fastboot-2.patch
PKGBUILD:
http://lukaswayne.freelinuxhost.com/PKGBUILD

Note:  To use the PKGBUILD, put the PKGBUILD in $ABSROOT/base/initscripts/ with the patch, and then makepkg.

I've tested these on my machine, seems to work fine, except for logs have errors in them.. See for yourself...

TODO in next version:
Fix logs

Please test with different configs and let me know how it works on your machine! 

... Maybe Judd will like it big_smile


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#17 2004-12-07 02:24:58

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: Fastboot Initscript Patches

This version boots so much faster... It's amazing.. Just a little lag when logging in...


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#18 2004-12-07 03:09:29

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: Fastboot Initscript Patches

There is a parenthesis missing on the PKGBUILD (the last one).


And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.

Offline

#19 2004-12-07 03:30:29

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: Fastboot Initscript Patches

The new ones aren't a whole lot faster when I use gdm.  The login appears faster, but it sits at the text login for a while, probably during linking, then starts gdm.  It does, however, make for a 'quiter' boot.


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#20 2004-12-08 12:24:49

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: Fastboot Initscript Patches

only a thought what would happen if your home is not local but on a network drive, does this still work then?

Offline

#21 2004-12-08 13:20:54

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: Fastboot Initscript Patches

only if you log in after the network is mounted. But you can split your daemons in FOREGROUND and BACKGROUND daemons adding an entry for FOREGROUND_DAEMONS in rc.conf and modifying your rc.multi like this:

if [ "$FASTBOOT" = "yes" -o "$FASTBOOT" = "YES" ]; then
+    for daemon in "${FOREGROUND_DAEMONS[@]}"; do
+        if [[ `echo $daemon | grep '^[^!]' | wc -l` -eq 1 ]]; then
+            /etc/rc.d/$daemon start
+        fi
+    done
    {
    for daemon in "${DAEMONS[@]}"; do
        if [[ `echo $daemon | grep '^[^!]' | wc -l` -eq 1 ]]; then
            /etc/rc.d/$daemon start
        fi
    done
    } &> /var/log/init.daemon&
else
    for daemon in "${DAEMONS[@]}"; do
        if [[ `echo $daemon | grep '^[^!]' | wc -l` -eq 1 ]]; then
            /etc/rc.d/$daemon start
        fi
    done
fi

Offline

#22 2004-12-08 17:19:39

Legout
Member
From: Wuerburg/germany
Registered: 2004-01-19
Posts: 292

Re: Fastboot Initscript Patches

hi!!

Thank you for this Patch. Arch boots very fast now. My friends will be suprided! Another good reason to use Arch Linux!!

Offline

#23 2004-12-08 17:34:48

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Fastboot Initscript Patches

tpowa wrote:

only a thought what would happen if your home is not local but on a network drive, does this still work then?

the timing may be an issue... but I would just put the network daemon first in the list... on my machine that should work just fine

Offline

#24 2004-12-08 17:37:29

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: Fastboot Initscript Patches

i tested the patch but if you use kdm and it's started last you don't see a difference, if you put kdm first it takes a long time to load

Offline

#25 2004-12-09 00:40:24

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Fastboot Initscript Patches

tpowa wrote:

i tested the patch but if you use kdm and it's started last you don't see a difference, if you put kdm first it takes a long time to load

that's because kdm needs resources to start (X + kdeinit) and this is

a) slow, if in background things are done (daemons)

b) slow, if it has to wait a lot of background-loading daemons to start first

... a way to improve this is to preload X and kdeinit stuff to ram while starting the first daemons in the background ... then run kdm in the middle and then the rest of the daemons in background

i tried it, but it is not possible without making a big mess out of the initscripts ... and you gain not more than ~6s


The impossible missions are the only ones which succeed.

Offline

Board footer

Powered by FluxBB