Welcome, Guest. Please login or register.

Login with username, password and session length

MyPCLinuxOS Forum

Pages: [1] 2 3 4 5 ... 17   Go Down
  Print  
Author Topic: Fastinit  (Read 30330 times)
0 Members and 1 Guest are viewing this topic.
c-chan
Insane Poster
******
Offline Offline

Posts: 1052


Pig


« on: February 09, 2008, 07:38:12 PM »

Hello all!
I'm very happy and proud to announce the first phase of our research into fastinit, which can promise to half or even quarter the perceived boot-up time of the latest EeePCLinuxOS release.

Since we're using KDE 3.5, I doubt our boot-up time can ever match that of the AsusOS -- but considering that 17-20 seconds is within the realm of possibility, I think that's pretty darn fast for an OS that already has everything the Asus one has, but 100x more!  Grin

Moreover, anything we develop here would be purely open source, and thus available to PCLOS Main and all other derivatives that can potentially make use of a fast-boot solution.

I'm very proud of our accomplishments with EeePCLinuxOS, and happy to see Jmiahman seemingly taken on any challenge that he comes up against (and winning, or at least on the road to victory).  However, I think work on fastinit of such monumental importance, I'm willing to bet even more time and more money (and yes, even ditch those cowardly USB installs!) to help Jmiahman make it a reality!

This is the future right here folks, and we'd be crazy not to accept the challenge of embracing it!   Cheesy

This thread will be used to research, study and discuss fastinit, existing alternatives, or just standard init in general.

Here in the front page, I'll be posting external reference material (as well as a copy of the original fastinit file,... just in case) to help with our research.  Smiley

=================================

Asus Eeepc fastinit reimplementation
http://helllabs.org/blog/20071231/asus-eeepc-fastinit-reimplementation/

Eeepc fastinit reimplementation update
http://helllabs.org/blog/20080205/eeepc-fastinit-reimplementation-update/

EeeUser Threads
Small fastinit source discussion:
http://forum.eeeuser.com/viewtopic.php?id=3576
Question about other fast distros:
http://forum.eeeuser.com/viewtopic.php?id=11793
Xandros Boot Discussion:
http://forum.eeeuser.com/viewtopic.php?id=7138
Boot Issues:
http://forum.eeeuser.com/viewtopic.php?id=12521

* asusosfastinit.tar (10 KB - downloaded 469 times.)
* asusosfastreboot.tar (10 KB - downloaded 252 times.)
* asusosfastshutdown.tar (10 KB - downloaded 252 times.)
« Last Edit: February 09, 2008, 07:46:14 PM by c-chan » Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #1 on: February 10, 2008, 05:58:36 PM »

I have had no real luck with fastinit but I have looked into the LiveCD side of init and why it takes so long (thanks Ivan) it seems that it's loading a ton of modules on boot that's not needed. These modules are needed for the USB install portion but not for USB CD Rom to EeePC portion. What we may be able to do is create a boot option that only loads the modules only needed for the EeePC. That should reduce our boot time in that aspect. 
Logged
c-chan
Insane Poster
******
Offline Offline

Posts: 1052


Pig


« Reply #2 on: February 10, 2008, 06:57:53 PM »

Aw well, Rome wasn't built in a day, and neither was EeePCLOS.  Smiley

There's plenty of time to figure out Fastinit; but if you [and Ivan] have made progress with the mklivecd init file, then the most efficient thing to do is experiment with that first.  Phenomenal work!!  Cheesy

BTW, can you post the source files up for the PCLOS mklivecd init, PCLOS regular init, and the experimental fastinit (the one made for Mandriva?). 
Logged
c-chan
Insane Poster
******
Offline Offline

Posts: 1052


Pig


« Reply #3 on: February 11, 2008, 08:38:45 AM »

This is continued from the 1.0 Release thread:

Quote
So far this is what I've done. In playing with fast init I've change the finit-alt.c file to call guest instead of user.

For everyone else, finit-alt.c is the Fastinit reimplementation from Hells Lab that was designed for alternative Linux distributions (although currently tested only with Mandriva 08).  The three are:

  • Finit.c (meant to mimic the original fastinit from the AsusOS)
  • Finit-mod.c (optimized version of the original fastinit from the AsusOS)
  • Finit-alt.c (optimized version adapted for alternative Linux distros)

The source still isn't posted, but a little bird sent me a copy of the fastinit reimplementation source, so now I'm wondering if I should post it myself.  Grin

(Don't know where to get our own init files, though)

Quote
For some reason though it won't boot X as it says guest doesn't have ownership of the console. I've tried multiple changes, but I am no pro at C and I really don't understand the init process enough to pick anything out other then the obvious.

By any chance, did you try creating a user called "user"?)  Might not work, but more like a process of elimination thing.  Smiley

From the source code, I imagine this is the snippet that tells the system to start up X:

Code:
if (!fork()) {
/* child process */

vhangup();

close(2);
close(1);
close(0);

if (open("/dev/tty1", O_RDWR, 0))
exit(1);

sigemptyset(&act.sa_mask);
act.sa_handler = SIG_DFL;

sigemptyset(&nmask2);
sigaddset(&nmask2, SIGCHLD);
sigprocmask(SIG_UNBLOCK, &nmask2, NULL);

for (i = 1; i < NSIG; i++)
sigaction(i, &sa, NULL);

dup2(0, 0);
dup2(0, 1);
dup2(0, 2);

touch("/tmp/nologin");

#ifdef AGPDRV
system("/sbin/modprobe agpgart");
system("/sbin/modprobe " AGPDRV);
#endif

while (access("/tmp/shutdown", F_OK) < 0) {
debug("start X as " DEFUSER);
#ifdef DEBUG
system("su -c startx -l " DEFUSER);
system("/bin/sh");
#else
system("su -c startx -l " DEFUSER " &> /dev/null");
#endif
}

Since it's using su to start up X, could eliminating "su -c" prevent the ownership problem?  How does this work in our own init (the second one after the mklivecd one)?

Quote
It's pretty simple to play with you just need to do a make on the source and copy the finit, finit-mod and finit-mdv to /sbin, then add init=/sbin/finit-mdv to your grub entry.

Believe it or not, this has psyched me up to the point that I've opted to take up my "Absolute Beginner's Guide to C" book again.  Grin

Read it a long time ago when I had no EeePC and thought I could learn stuff reading through it in my commute (didn't work), but now that I have something to practice with, I think I'm getting the hang of it more.  Functions amazingly-similar to the BASH scripting language.

But don't get me wrong, though,... I won't be ready to be of much help until at least a few weeks.  I may even have to postpone my EeePCLinuxOS documentation to make time to learn this stuff, unless someone else can pick up the slack for me.  I don't mind it though, as this is very exciting stuff.  Even if I can't help with fastinit, I'm still learning a real programming language!  Cheesy

Quote
With the live init process I've edited /usr/share/mklivecd/linuxrc and in the SCSI section taken out all the extra modules that we don't use, just make sure not to take out ata_piix, then you have to create another remaster too see if it works. I ended up hosing my install messing with all of this so someone at this point could take this information and most likely get farther then me with it at this point.

I hope you mean you "hosed" your experimental EeePCLinuxOS system.  Wink

You've talked with Ivan and Tex before, so is there anyway they (or someone they know) can look at the stuff to see where it might have gone wrong?
Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #4 on: February 11, 2008, 08:48:30 AM »

Thanks for the boost. I was looking for that.
Logged
c-chan
Insane Poster
******
Offline Offline

Posts: 1052


Pig


« Reply #5 on: February 11, 2008, 08:51:55 AM »

Oh please.... Get yourself one of these for a REAL boost.... Tongue



(darn, I sound like a bloody advertisement.  Grin)
Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #6 on: February 11, 2008, 08:59:11 AM »

Tried just creating a user called user.. No go. (or Nova Wink )
Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #7 on: February 11, 2008, 09:03:05 AM »

With eliminating the su -c it of course works but then the issue becomes we login as root and not the user. I'll still time it though and see if there's a decent decrease in boot time.
Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #8 on: February 11, 2008, 09:08:44 AM »

45 Seconds....How about instead of using startx we just start kdm.
Logged
c-chan
Insane Poster
******
Offline Offline

Posts: 1052


Pig


« Reply #9 on: February 11, 2008, 09:28:21 AM »

Quote
Tried just creating a user called user.. No go. (or Nova Wink )

*snaps finger*  Darn.

Quote
With eliminating the su -c it of course works but then the issue becomes we login as root and not the user. I'll still time it though and see if there's a decent decrease in boot time.

Granted the AsusOS does log us in some weird superuser environment -- hopefully it's not a prerequisite.  Nonetheless, as long as something works in that respect, it offers the testing environment we need -- after that, it's only a stone-throw away from figuring out how to get it to fast boot into a multiuser environment.  That's our "innovative" goal.  Smiley

Quote
45 Seconds....How about instead of using startx we just start kdm.

That's from 59 or more seconds?  Cool!  Smiley

Not much it seems, but consider that the mklivecd init is still there to add extra bulk, so I can imagine the cost-savings with it reduced.  Cheesy

Not sure how kdm differs from X, but go for it.  It sounds like it could limit us in case someone wants to use Gnome, IceWM, etc, but may not be the case (or it may be something that can be updated via our EeePCLOS Tools).

BTW, you probably will do so, but just thought I'd remind you to post findings over at Hells Lab.  Maybe the guy might be interested in fastinit implementation in EeePCLOS and help out some?  Mandriva and PCLOS are not terribly different, are they?  Smiley
« Last Edit: February 11, 2008, 09:30:41 AM by c-chan » Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #10 on: February 11, 2008, 09:34:33 AM »

*snaps finger*  Darn.

Granted the AsusOS does log us in some weird superuser environment -- hopefully it's not a prerequisite.  Nonetheless, as long as something works in that respect, it offers the testing environment we need -- after that, it's only a stone-throw away from figuring out how to get it to fast boot into a multiuser environment.  That's our "innovative" goal.  Smiley

That's from 59 or more seconds?  Cool!  Smiley

Not much it seems, but consider that the mklivecd init is still there to add extra bulk, so I can imagine the cost-savings with it reduced.  Cheesy

Not sure how kdm differs from X, but go for it.  It sounds like it could limit us in case someone wants to use Gnome, IceWM, etc, but may not be the case (or it may be something that can be updated via our EeePCLOS Tools).


Too bad we're not timing shutdown Wink 2 seconds... it's actually 48 seconds to boot from grub to KDM. Yes we do have the added live environment that takes about 30 seconds.. Ouch I'm trying to get that lower, but we're also loading the clock and other things that we maybe able to take out. The reason I'm suggesting just loading kdm is two reasons.

1. We already do Smiley instead of going straight into user. If autologin is needed we just let KDE handle that, but this allows us to have multiuser support.
2. KDM can load as root (and does anyways) without any security issues and errors from console.

So we have finit working now too a point. I'll post the source here in a bit.
Logged
jmiahman
Moderator
Insane Poster
*
Offline Offline

Posts: 2604


Arrr


« Reply #11 on: February 11, 2008, 10:13:53 AM »

This opens a pandora's box worth of issues with KDE and shuttingdown. None of the shutdown options work, might have to do some tricky stuff as a work around.
Logged
Pages: [1] 2 3 4 5 ... 17   Go Up
  Print  
 
Jump to: