WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ultrafast startup  (Read 10637 times)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ultrafast startup
« Reply #15 on: December 06, 2009, 04:49:14 PM »
About on demand loading, to create the icon/menu entry one would need to mount, read, and umount the extension, to copy the icon and other necessary info. This wouldn't really make sense, since doing the work at once is faster in total.
Perhaps you misunderstood... the copying of icons is a once-only thing, then re-used every time. Mounting extensions is a once-only thing, at run time.

The advantage of my method is I don't need to remaster anything at all, dead simple scripts as shown in my earlier post, updating extensions or tc itself is as simple as before, and my booting time is essentially the same as  with a completely raw tc. For example, booting from usb, 8 seconds from when the first boot message appears to the ready desktop. I have rox, opera with flash, OSS, thunderbird, vlc, mtpaint, couple of games, pcmanfm, wine, beaver, geany... in fact the booting time is completely unaffected by the number of extensions.

Offline u54749

  • Jr. Member
  • **
  • Posts: 70
Re: ultrafast startup
« Reply #16 on: December 06, 2009, 06:59:46 PM »
Quote
Hmmm... Any chance you could post that in the programming/scripting area?

Build script not fit for public consumption at this time.   Contains too much stuff specific to my setup.  Also loads non-published extensions. Useless in the current form.  So needs clean-up before publishing.

Will think of a way to do a kind of proof-of concept if sufficient people show interest.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: ultrafast startup
« Reply #17 on: December 06, 2009, 08:33:57 PM »
Jur, I really like your system, as it seems simple and relatively easy for others to immitate. Let me see if I understand it.

1) Your /tce directory only includes the stuff that you are pretty sure you want to use every time you boot up your computer. In my case that would be 915resolution.tcz, OSS.tczm, mc.tcz, opera.tcz, a couple of wireless.tczl files, and a few dependencies.

2) Everything else is invoked on an as-needed basis from your custom wbar. (Can flash for Opera be invoked in that way, or should it be loaded with Opera in the standard boot?

3) Your custom wbar is invoked . . . how? By a line in bootlocal.sh?

Would you be willing to post more examples of the custom wbar entries? The example of Opera may be something I can use as a model for all others, but I'd like to confirm that with a couple of other examples.

Thanks for sharing a neat idea.


Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ultrafast startup
« Reply #18 on: December 06, 2009, 10:24:40 PM »
My /tce folder contains 915resolution, jwm and its dependencies, mc and its dependencies, the wireless files, and acpid - so only the items needed during boot.

OSS and flash10 I have also now moved to /optional, since OSS is needed only for vlc player or flash10, so it is only mounted when either of these apps are mounted. I still have to include flash10's dependencies because it doesn't have a list, only getflash10 has a list but not all of those are needed, so I am just sorting that out.

So here is the custom wbar config file:
Code: [Select]
# The Bar && Font && Font size (11)
i: /usr/share/wbar/osxbarback.png
t: /usr/share/fonts/luxisr/11
c:

i: /usr/share/wbar/aterm.png
t: Aterm
c: exec aterm

i: /usr/share/wbar/cpanel.png
t: Panel
c: exec cpanel

i: /usr/share/wbar/appbrowser.png
t: Apps
c: exec appbrowser

i: /home/tc/.mywbar/beaver2.png
t: beaver2
c: exec /home/tc/.mywbar/beaver2.sh

i: /home/tc/.mywbar/gtkfind.png
t: gtkfind
c: exec /home/tc/.mywbar/gtkfind.sh

i: /home/tc/.mywbar/mtpaint.png
t: mtpaint
c: exec /home/tc/.mywbar/mtpaint.sh

i: /home/tc/.mywbar/opera10.png
t: Opera
c: exec /home/tc/.mywbar/opera.sh

i: /home/tc/.mywbar/rox-filer.png
t: rox-filer
c: exec /home/tc/.mywbar/rox-filer.sh

i: /home/tc/.mywbar/thunderbird.png
t: Thunderbird
c: exec /home/tc/.mywbar/thunderbird.sh

i: /home/tc/.mywbar/vlc.png
t: vlc
c: exec /home/tc/.mywbar/vlc.sh

i: /home/tc/.mywbar/xmahjongg.png
t: mahjongg
c: exec /home/tc/.mywbar/xmahjongg.sh
I use this command in .xsession to invoke wbar:
Code: [Select]
wbar -nofont -vbar -pos left -jumpf -0.1 -bpress -config /home/tc/.mywbar/tce.wbar

Here is the wine invoker:
Code: [Select]
#!/bin/sh
[ ! -f /usr/local/tce.installed/wine-gl ] && tce-load -i /mnt/sdb1/tce/optional/wine-gl.tczl
wine $1 &
beaver has the same looking code.

To get windows apps to use wine even before it is mounted, I open rox, navigate to the directory containing the win app, then set the default run application as the file in .mywbar - so it will mount it first if not already mounted and then run the app the normal way.

Even regularly run apps such as opera resides in /optional.

To update extensions in /optional, I use jpeters' script which he kindly modded so it included extensions in /optional.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: ultrafast startup
« Reply #19 on: December 07, 2009, 01:17:08 AM »
I'm curious why you don't just keep everything in your tce_dir and load a sparse symlinked group. By leaving /opt/.tce_dir set to your main tce_dir,  update/mount/install/download  functions all work as usual. "tce-load -i  app" ( I use a "load" script ), loads any additional extension from the tce_dir that you need on the fly, complete with it's icon and menu.    
« Last Edit: December 07, 2009, 01:35:19 AM by jpeters »

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: ultrafast startup
« Reply #20 on: December 07, 2009, 08:48:44 AM »
Thanks, jur. I'm going to give your setup a try--maybe shave a few seconds off my boot time.

And jpeters, I'm confident you also have a good way of speeding system load, but I don't yet understand it. If everything is in the tce directory, everything loads. Right? That's what I do now, except for stuff in my optional directory, which I load with appbrowser as needed. I don't think I'm comprehending how you suggest modifying things.


Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: ultrafast startup
« Reply #21 on: December 07, 2009, 11:19:05 AM »
Thanks, jur. I'm going to give your setup a try--maybe shave a few seconds off my boot time.

And jpeters, I'm confident you also have a good way of speeding system load, but I don't yet understand it. If everything is in the tce directory, everything loads. Right? That's what I do now, except for stuff in my optional directory, which I load with appbrowser as needed. I don't think I'm comprehending how you suggest modifying things.

You can check out the load-group script, which creates a symlinked  tce-group from a load.grp file placed in your tce_dir. Tce_group is added to your bootcodes (there's a script to add and remove it from your menu.lst file)   I also included a script to change /opt/.tce_dir back to the main /tce_dir so that update/install/mount functions act upon the main directory instead of the symlinks.  There's also a "load" script, which performs "load -i app"  for on-the-fly mounts from the tce_dir.  
 

Offline julianb

  • Newbie
  • *
  • Posts: 41
Re: ultrafast startup
« Reply #22 on: December 07, 2009, 03:01:58 PM »
Quote
For fast boot why not just use "suspend" (hibernate) ?

Stand-by (suspend to RAM) might be good for some folks, but if the machine boots in ten seconds it's barely needed. For off-grid solar powered computing, (which is where my tiny core linux machines will be used) using suspend to RAM requires too much power. I also don't know how to make tinycorelinux suspend to RAM.

If there's a hibernate (suspend to hard drive) feature for tiny core linux, I don't know how to use it AND I don't see how that would be faster than an ordinary shutdown / startup on a well-set-up tinycore system.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ultrafast startup
« Reply #23 on: December 07, 2009, 03:32:07 PM »
Quote
For fast boot why not just use "suspend" (hibernate) ?

Stand-by (suspend to RAM) might be good for some folks, but if the machine boots in ten seconds it's barely needed. For off-grid solar powered computing, (which is where my tiny core linux machines will be used) using suspend to RAM requires too much power. I also don't know how to make tinycorelinux suspend to RAM.

If there's a hibernate (suspend to hard drive) feature for tiny core linux, I don't know how to use it AND I don't see how that would be faster than an ordinary shutdown / startup on a well-set-up tinycore system.

I could not agree more. These are needed for Windows and other OS that take minutes to boot.
If these are stock 990a 4GB SSDs they have the slowest SSDs I have encountered. So writing state to them would be quite slow.

julianb, I hope you tried mount style extensions before you embark on scripting. IMO scripting solutions presented so far are better suited for static extension collections.

You could also try adding the boot code of elevator=noop to see if that helps boot and run time.
10+ Years Contributing to Linux Open Source Projects.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ultrafast startup
« Reply #24 on: December 07, 2009, 06:15:39 PM »
julianb, I hope you tried mount style extensions before you embark on scripting. IMO scripting solutions presented so far are better suited for static extension collections.
You may recall that I made a suggestion for improving boot times in this thread:
http://forum.tinycorelinux.net/index.php?topic=3367.0

I have verified for myself that it makes a massive difference; if not using Xorg, I have essentially the same boot time as with a raw tcl.

So by adding an installation option to extensions, the user could opt for having the lightning-fast boot that tcl offers while still having all the extensions they want. Based on the trivial amount of scripting I have to do when adding another app, I imagine this would be very easy to implement on tcl.

Of course it would add new user confusion but that can be alleviated by explanation.

Since distros are often compared on the basis of booting times, and fast boot times make headlines, I think this is a very worthwhile feature to have as standard in tcl.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: ultrafast startup
« Reply #25 on: December 08, 2009, 12:06:24 PM »
julianb, I hope you tried mount style extensions before you embark on scripting. IMO scripting solutions presented so far are better suited for static extension collections.
You may recall that I made a suggestion for improving boot times in this thread:
http://forum.tinycorelinux.net/index.php?topic=3367.0

I have verified for myself that it makes a massive difference; if not using Xorg, I have essentially the same boot time as with a raw tcl.

So by adding an installation option to extensions, the user could opt for having the lightning-fast boot that tcl offers while still having all the extensions they want. Based on the trivial amount of scripting I have to do when adding another app, I imagine this would be very easy to implement on tcl.

Of course it would add new user confusion but that can be alleviated by explanation.

Since distros are often compared on the basis of booting times, and fast boot times make headlines, I think this is a very worthwhile feature to have as standard in tcl.

Thank you Jur for initiating this thread. It has brought out several good ideas as to how to manage booting with extensions.

I have been using the script driven wbar idea for a long time to achieve dynamic extension management. By dynamic I mean installing and uninstalling extensions. I went down this path mainly because I was booting from a floppy disk which was painfully slow. I have since moved on to using a netbook so I don't have the slow boot anymore but I still use my dynamic extension management scripts for Samba and VNC . I use two color wabr icons to denote install or uninstall actions.

I posted my ideas a long time ago here:
http://forum.tinycorelinux.net/index.php?topic=1705.0
http://forum.tinycorelinux.net/index.php?topic=1693.0

The above has been changed of course since I posted the information to keep pace with tinycore changes.

Anyway, I agree with your approach albeit for different reasons and would also like to see more discussion on the future of extension management for tinycore.

Edit: Just to be clear my current install scripts use mount not copy to the file system.
« Last Edit: December 08, 2009, 05:06:04 PM by bigpcman »
big pc man

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ultrafast startup
« Reply #26 on: December 08, 2009, 04:18:23 PM »
I stand by what I wrote. I think better promotion of "mount" style  extension loading over "install" (copy) goes along way towards better performance. I am going to do so for 2.7.

Customized scripting solutions are welcomed in the scripting section of the board.
10+ Years Contributing to Linux Open Source Projects.

Offline netbook21

  • Newbie
  • *
  • Posts: 4
    • netbook images
Re: ultrafast startup
« Reply #27 on: January 19, 2010, 06:45:38 AM »
hp netbooks generally have ultrafast boot (HP QuickWeb)

Offline ChadwickCohen

  • Newbie
  • *
  • Posts: 1
Re: ultrafast startup
« Reply #28 on: February 08, 2014, 04:05:26 AM »
one of my desires in using tinycorelinux is to have an ultra-quick boot. on the machine I installed it on (eee pc 900a, install on 4gb ssd) the fresh install boot-time was quick, probably less than 20 seconds. after i installed applications, the boot became much slower. (maybe 40 seconds) i'm still a newb with this tinycore stuff.

so anyway, i'm interested in making the machine keep extensions sitting on disk, ready to load, but have them only load when i open up an app that uses them.

neat thing about tiny core linux, if startup and shutdown are ultra-quick, there isn't a lot of need for a sleep mode. minimizing energy used at startup and shutdown is also desirable for me, because i am setting these machines up to be used in an off-grid environment where power is from

Really liked your set up.. I know thread is bit old but I was searching for similar sort of set up and hope it works.
« Last Edit: February 09, 2014, 10:07:45 AM by ChadwickCohen »