Announcement

Collapse
No announcement yet.

Booting Linux Fast

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Booting Linux Fast

    So ive got some stuff bookmarked about booting linux fast and i just thought i'd share, i know some of this has been posted before

    http://www.linuxbios.org/ < replacing the usual bios with a linux one

    http://www.bootchart.org/ < kind of like bootvis for windows without the automated optimisation

    Reducing OS Boot Times for In-Car Computer Applications:
    http://www.linuxjournal.com/article/7544
    http://www.linuxjournal.com/article/7594
    http://www.linuxjournal.com/article/7857

    Parallelize Linux system services to improve boot speed:
    http://www-106.ibm.com/developerwork...xw04BootFaster
    Signature: [==||========] 20% complete

  • #2
    I'd like to add another option: software suspend (aka hibernate); see this page for details.

    Comment


    • #3
      Goodstuff
      Signature: [==||========] 20% complete

      Comment


      • #4
        I'd also like to mention another means of making it "boot" faster, particularly for the car enviroment. Lets say you have a super cool carputer with Network, GPS, and an SQL database for your library. If these devices aren't needed immediately, then you can take them out of your rc scripts and start them AFTER the player has started. This way you will be up and playing music while your waiting for everything else to be fully functional. Sort of like Parallelizing I suppose.

        Comment


        • #5
          Originally posted by TheLlama
          I'd also like to mention another means ... Sort of like Parallelizing I suppose.
          Definitely.

          The IBM developer article mentioned above goes into, among other things, getting "the important stuff" out of the way first, then loading subsequent procs that depend on said stuff.

          The article specifically talks about Linux boot procedures, but the same can apply to running apps - it a small leap to put your audio player on that list of "important stuff."

          Comment


          • #6
            Llama is right. We use a custom kernel and we've compiled almost everything as modules.

            We load our UI first (from a custom startup script) and we then insert the modules in a sequential fashion. We're using tinylogin (compiled for ARM7) for to automatically login as root on the box. We also re-wrote the startup scripts from scratch. We're on LFS 5.1; so we're not using any off-the-shelf distro. We wrote our own.

            As for tweaking your kernel - there are TONs of ways to accelerate it's startup time. One way is to use XIP (eXecute In Place) directly from Flash. The kernel is uncompressed in flash and loads into ram in a 1 to 1 basis. The net result is that the kernel doesn't need to decompress and it loads about 1100ms faster. You can't do this on x86 architecture because of hardware limitations (ahem 640k limit; thanks Bill!). Here's a list of some great kernel tweaks:
            Apply a preset "loops per jiffie" patch
            Apply a patch for eliminating IDE probing; You can preset your IDE data after the kernel enumerates the device for the first time. Subsequent boots never have to probe again.
            Remove all the "printk()'s" from the kernel source. This eliminates all the startup text, but you can still debug via serial.

            We've had NUMEROUS people ask for a copy of the distro. Here's our standard reply: Our distro is not for x86 computers. It won't work on an EPIA or anything like that. We're on an embedded BIOS-less platform. As such, we can't provide you with a CD-Distro for your carptuer. Sorry!

            By tweaking the hell out of our kernel, we're down to about a 5 second boot. That's power-on to prompt. Our app loads in about 2-3 seconds. A cold-start boot takes roughly 8 seconds from power to UI.

            We have hardware suspend and we can resume from that in about 2500ms.


            Sorry for the super long post - I just wanted to provide as much info as possible.
            DashPC - The Linux Car (since 1999).

            Dash LCD, Via Epia, GPS, XM, OBDII, DSSC Shutdown Controller.

            As seen in the book Geek My Ride

            Comment


            • #7
              Thanks cbergeron, that was a very informative post. I'm familiar with jiffies as I had to use them for my VFD timing. However, what do you mean by a preset "loops per jiffie" patch? Sounds like you have some good things going with your embedded ARM board. I am currently using an advantec half-sbx board (667mhz eden). When I finish my player I will evalutate the resource load and get a more watered down board. Check your PMs.

              Peace

              Comment


              • #8
                What kernel version are you using Thellama?

                I can post a patch here if you're using 2.6

                cheers,
                CB
                DashPC - The Linux Car (since 1999).

                Dash LCD, Via Epia, GPS, XM, OBDII, DSSC Shutdown Controller.

                As seen in the book Geek My Ride

                Comment


                • #9
                  I'm currently running Linux 2.6.8 (Gentoo distro) on an AMD64.

                  I'll prolly upgrade to 2.6.10 in the next day or so.

                  Comment


                  • #11
                    cbergeron: What are you using for navigation? That is the ONE thing keeping me from using Linux which is what I want. I can't believe I don't use Windows on any of my PCs but my car computer will be Windows just for navigation.

                    Edit: Oops, now I see it is probably GPSDrive. I have played with it a little but I just can't see it comparing to iGuidance. If only they would get NavTeq data.

                    Comment


                    • #12
                      slax linux i found cool cos will load from cd (instructions on there site for customising to HD use) but the idea of using a cd does mean that it has a small space

                      Comment


                      • #13
                        yes but thats more than enough space for a linux install. Of course a slax cd won't have your frontend on it so you should just make your own live cd. However, I don't see how a CD can make linux start up quicker.

                        Comment


                        • #14
                          its not faster BECAUSE its on a CD, it loads faster because it is cut down to be tiny in disc space, so has very few features, so with nothing to load its quick to load.

                          it will have your front end on there cos you can add anything you like to it.

                          and like i said you can run it from your HD or USB or even CF if your system supports it

                          i cant remember the stats but i think the complete slax os on a CD is around the 60mb, so there is plent of room for whatever else you need

                          Comment


                          • #15
                            [QUOTE=cbergeron]
                            Remove all the "printk()'s" from the kernel source. This eliminates all the startup text, but you can still debug via serial.
                            /QUOTE]

                            You can accomplish the same by appending "silent" as a boot option. It skips over any printks, but you have the same problem that you do with removing them from the source. Any panics will never show up and you still are stuck with the printfs.
                            Jason
                            It gimme the jibblies

                            Comment

                            Working...
                            X