Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Input Devices Linux Hardware

The 1-Second Linux Boot 156

An anonymous reader writes "Less than one second Linux boot! This video shows an OMAP3530 capturing video data from a camera and rendering it to an LCD display — the video appears on the LCD display in less than a second from reset."
This discussion has been archived. No new comments can be posted.

The 1-Second Linux Boot

Comments Filter:
  • by Fieryphoenix ( 1161565 ) on Friday February 26, 2010 @09:57PM (#31294082)
    Guess Linux is faster than Slashdot.
  • Posted from Linux, but surely I have failed.

  • ... is Large and in Charge.
  • by Anonymous Coward on Friday February 26, 2010 @10:06PM (#31294142)
  • by WrongSizeGlass ( 838941 ) on Friday February 26, 2010 @10:30PM (#31294250)
    It must have been his first time.
  • by pushing-robot ( 1037830 ) on Friday February 26, 2010 @10:30PM (#31294262)

    An OS optimized for a single platform being loaded uncompressed from ROM (or in this case flash) is nothing special. Heck, many of the computers of 30 years ago booted up in a second or two for the same reasons.

    • Re: (Score:3, Interesting)

      by tepples ( 727027 )

      An OS optimized for a single platform being loaded uncompressed from ROM (or in this case flash) is nothing special.

      The popular Atom-based netbooks are so similar that they're almost "a single platform", and a lot of them have flash from which one can load an uncompressed kernel (or one lightly compressed with a cheap codec like LZO).

      Heck, many of the computers of 30 years ago booted up in a second or two for the same reasons.

      So why do computer users let Wirth's law [wikipedia.org] overpower Moore's?

      • So why do computer users let Wirth's law [wikipedia.org] overpower Moore's?

        Because it's now Wirth/Moore?

    • by marcansoft ( 727665 ) <hector@marcansoft.UMLAUTcom minus punct> on Saturday February 27, 2010 @01:55AM (#31295208) Homepage

      Yup, 1-second embedded boot is fairly is fairly nice but the summary is misleading and this is not even remotely comparable to desktop boot times. They're using an initramfs, no real filesystem, and no real distribution.

      To put things into perspective, I have an OMAP3530 platform in front of me (same as TFA, funny coincidence) and a totally vanilla kernel that I compiled a few days ago boots in 2.5 seconds, not counting the long time wasted by the totally suboptimal bootloader (3-second deliberate boot delay, networking support, loading the kernel from an SD card, all that crap). That time includes mounting an ext3 filesystem from an SD card and starting to run init from it, and the kernel has built-in drivers for all onboard hardware including USB host+OTG, Ethernet, networking (ipv4 and ipv6), HDMI display output, audio, etc. Of course, booting the rest of the (real, full-blown) distro up takes a while as usual, but TFA is basically showing an embedded application that could be as simple as a single binary running from initramfs (I've actually poked a MontaVista Linux system once, and their startup was basically a single shell script - not quite SysV Init!). Remove the sd/ext3 stuff, remove useless drivers, replace the bootloader with a minimal build, use a busybox shell script + a single executable binary for the actual application, and you're probably getting close to 2-second total boot times without even beginning to optimize stuff with DMA and the like.

      • Re: (Score:1, Funny)

        by Anonymous Coward

        Or you could just get rid of that 3 second delay to get it to boot in -0.5 seconds. It will turn on before you've pressed the button!

    • Exactly. My original Nintendo didn't take any time at all to boot up. Even all the major consoles boot up in a few seconds. When you don't have to explore the system for new hardware and you can just load a preconfigured image into memory, things go a lot faster. I think there should be ROM chips you can flash, and you only have to reflash them if you have a hardware change.
  • Misleading summary (Score:5, Insightful)

    by cualexander ( 576700 ) on Friday February 26, 2010 @10:31PM (#31294266)
    This is a linux computer in a car that has very specific hardware and limited functionality. Wake me up when you can get a true desktop machine to boot in 1 second and then we can talk. This is like saying, "My toaster runs linux and it can boot instantly!" Big freaking deal.
    • by aldld ( 1663705 )
      My pet rock runs Linux, and it boots up in exactly zero seconds!
    • Re: (Score:2, Insightful)

      I don't see why the summary is misleading or why a desktop machine would be the only measuring stick worth considering, especially when you think of how seldomly Linux is run on the desktop.

      This is like saying, "My toaster runs linux and it can boot instantly!"

      What would be wrong with that?

      They poured a tonne of work into making this happen. Just because they control the hardware their hard work isn't worth anything? I think it's pretty cool what they've been able to do, someone no one else in the history

      • They poured a tonne of work into making this happen. Just because they control the hardware their hard work isn't worth anything? I think it's pretty cool what they've been able to do, someone no one else in the history of Linux has ever been able to do.

        I'm not sure this is a first, nor am I sure this took that much work. Using DMA to optimize the obvious three or four huge RAM copies during boot is hardly a tonne of work. That's more like a week of work.

    • by caseih ( 160668 ) on Friday February 26, 2010 @11:35PM (#31294622)

      Actually it is a pretty big deal. In most embedded systems that need to be instant on, a manufacturer would likely use highly customized code with highly customized hardware. The big deal here is that a (relatively) full linux kernel and system boots in the same time as all that custom code giving a manufacturer a solid, generic, and cheap base to work from. In other words, rather than having to rely on highly customized, specific firmware for the device, a more generic linux-based system platform can be used. This makes everything cheaper and thus must more profitable. This is proof that Linux is flexible and agile enough to be used from the smallest devices all the way up the line. Same kernel-level APIs everywhere. Same tools. A tremendous advantage for embedded device makers rushing to get to market.

    • by Korbeau ( 913903 )

      "My toaster runs linux and it can boot instantly!" Big freaking deal.

      I think that according to the Slashdot crowd, a toaster that runs Linux IS a big freaking deal!

    • This is a linux computer in a car that has very specific hardware and limited functionality.

      So it's just like a Mac in fact...

      Wake me up when you can get a true desktop machine to boot in 1 second and then we can talk. This is like saying, "My toaster runs linux and it can boot instantly!"

      Big freaking deal.

    • Re: (Score:2, Insightful)

      by rsun ( 653397 )
      And the number of embedded Linux systems with ludicrous boot times that could be improved by something like this is quite high. Think of that BluRay player that takes 90 seconds to open the tray from power off, or your new LCD TV that takes 30 seconds to produce a picture, or your Tivo that takes minutes to be ready to do anything. The vast majority of these devices run embedded linux and getting the boot times down to sub 10 seconds would go a long way to making customers much happier. I know I'd be much h
  • But (Score:4, Funny)

    by DuChamp Fitz ( 987592 ) on Friday February 26, 2010 @10:45PM (#31294362)
    does it run crysis?
  • Sense? (Score:2, Interesting)

    by Hurricane78 ( 562437 )

    Apart from the “because I can”, what’s the actual point of this?

    I mean restarting the computer is rather a Windows thing. Why would you reboot a Linux machine? There isn’t a new kernel that often...
    If it’s a desktop, you are going to switch it on in the morning, go take a piss, enter the password, go find something to eat, and then it runs for the day. Same thing when you were away and came home.

    And for anything else (e.g. laptops) there always is hibernation.
    Also the trick to

    • Why would you reboot a Linux machine? There isn’t a new kernel that often...

      I walk to the tram stop. Its at the end of the line so the tram stops there for a while. I validate my ticket. Find a seat. Take my eeepc 701 out of its bag. I have to shut it down because hibernation uses the battery and I need that power to last all the way to work. I start to boot it up. A cafe near the tram stop has free wifi so I can check /. from there. But before ubuntu boots up the tram moves off.

      So you see, if linux booted faster I could get free wifi.

      • Re: (Score:3, Informative)

        by wagnerrp ( 1305589 )

        I have to shut it down because hibernation uses the battery and I need that power to last all the way to work.

        Standby uses battery to continually refresh the memory. Hibernation dumps the memory to disk and powers down. There is no battery consumption save whatever is needed to run the clock.

        • I have to shut it down because hibernation uses the battery and I need that power to last all the way to work.

          Standby uses battery to continually refresh the memory. Hibernation dumps the memory to disk and powers down. There is no battery consumption save whatever is needed to run the clock.

          Maybe thats what it is doing then.

        • the eeepc 701 has 512 megs of ram (many upgraded to 1gb) and 4 gb of ssd. There is rarely enough disk space available to to suspend to disk with all the space being taken up with a decent linux install and a bunch of apps and maybe some mp3s and a couple movies.
        • by Kuraz ( 702906 )

          Standby uses battery to continually refresh the memory. Hibernation dumps the memory to disk and powers down. There is no battery consumption save whatever is needed to run the clock.

          I have a laptop with broken battery than only runs when plugged-in and strangely, hibernation only works when i keep it plugged-in. if i hibernate, unplug, move it to another room, plug-in again then somehow it has to fully reboot again.

      • by hitmark ( 640295 )

        the celeron used in the 701 and the 900 (i have one of the latter) have a issue with battery drain even when "fully" powered down.

    • Re:Sense? (Score:5, Interesting)

      by fuzzyfuzzyfungus ( 1223518 ) on Friday February 26, 2010 @11:13PM (#31294502) Journal
      Embedded systems, I suspect.

      For servers and a fair few desktops, uptime is a virtue. They are rarely or never voluntarily shut down. For that reason, boot time isn't a huge issue(particuarly for servers, you are probably going to spend more time twiddling your thumbs while some RAID card spins up the drives and meditates upon infinity than you are actually booting your OS).

      For laptops, suspend(ie. with RAM still live) is almost always the right thing to do(if the ACPI gods are with you and everything is likely to come out of suspend cleanly) because laptops almost always have at least a bit of power available. Only when the system is unplugged and the battery virtually dead do you need to bother hibernating to disk or shutting down. Again, boot time not a huge deal, though likely to be faster than either of the first two cases, because the hardware is more predictable and there are fewer disks to worry about.

      Embedded stuff, though, particularly embedded stuff in certain consumer electronics, or in hostile, low-power environments, really needs to be able to wake up fast. When joe user turns on his digicam, he wants it to come up now, and he doesn't want it flattening its batteries keeping an image alive in RAM. When some minimalist sensor node with only a solar cell and a trickle-charged capacitor for company needs to wake up and transmit some data back to the mothership, it needs to spend as little energy as possible on booting, and as much as possible on sensing and transmitting.

      Since Montavista is mostly known for embedded stuff, I assume that this is why they care.
    • by CAIMLAS ( 41445 )

      With a mobile computer (ie one not tethered by a power cable, such as one in a car, a PDA/smartphone, or the like) can benefit quite a bit from being able to go from a power-off state to on-and-usable.

      It doesn't matter if the device has a 10 day "on but not in use" lifetime if it's still draining the battery, and the device gets used once every 5 days for half an hour at a time. That'll lead to a lot of "crap the battery is dead again".

      Also, for automotive use, it would be very useful to actually be able to

  • by macraig ( 621737 ) <mark.a.craig@gmail . c om> on Friday February 26, 2010 @11:30PM (#31294606)

    Where's the very relevant word embedded in the Slashdot title? Even TFA's author was honest enough to include it in the original title.

  • Boot times (Score:4, Informative)

    by fm6 ( 162816 ) on Friday February 26, 2010 @11:46PM (#31294680) Homepage Journal

    I just bought a cheap digital TV that takes almost 5 seconds to boot. Sad.

    • by Tacvek ( 948259 )

      I just bought a cheap digital TV that takes almost 5 seconds to boot. Sad.

      So? Many older analog televisions took up to 10 seconds to "boot", because thats how long it took to warm up the cathode ray tube.

      • Re: (Score:3, Informative)

        So? Many older analog televisions took up to 10 seconds to "boot", because thats how long it took to warm up the cathode ray tube.

        My grandparents had an early color set that was nearly a minute. But, so what, 5 seconds, a minute, go take a pee and get a snack.

        1-second embedded linux is very significant because some vendors use proprietary OS stacks because they boot faster.

    • Re: (Score:3, Funny)

      by feepness ( 543479 )

      I just bought a cheap digital TV that takes almost 5 seconds to boot. Sad.

      Just imagine! With this you could watch almost 4 more seconds of TV at a time!

      • by fm6 ( 162816 )

        It's not so much the loss of TV time as the gain of thumb-twiddling time....

    • I`m guessing Dynex...
      • by fm6 ( 162816 )

        You guess right! Fellow victim?

        • Yeah... i'm renting an apparment in the US, and among the furniture we have two of those. You are right about that boot time being damn annoying!
          • by fm6 ( 162816 )

            I don't actually find the boot time all that annoying. Certainly not as annoying as the LCD's piss-poor viewing angle and the cruddy tuner.

            The word I used was "sad". I mean, a consumer product that can't turn on as quickly as a computer? Somebody should be ashamed!

    • You should be so lucky. I have a DVD recorder that I use as an OTA TV receiver. Unfortunately it has the same video processor as the Xbox 360. If allowed to stay in standby mode it will overheat behave erratically and randomly lock up. When standby is turned off it takes 30 seconds to boot itself up. This is one of many reasons (it can't play an audio CD without crashing) why that POS is the last Panasonic product I'll ever buy.

      • You should be so lucky! I've got to boot my TV blindfolded, with my bare hands, out in the snow, for 60 minutes, up a hill, while strangling a dozen chicken and whistling the tune to the Family Guy theme, etc etc.

        • by fm6 ( 162816 )

          You should be so lucky! I live in an alternate continuum where TVs have to be started by rubbing two glass tubes together and the phrase "you should be so lucky" actually means "I should be so lucky".

          • Now I'm confused. Did I use the phrase wrong? I just repeated what the parent post said. Not a native speaker, just acting like one, eager to learn, etc.

            • by fm6 ( 162816 )

              I never would have guessed that English wasn't your first language if you hadn't told me. That's why I made fun of you, I thought you were a native speaker being sloppy. (Very common around here.) The post you were imitating got the expression backwards. This usage of "should" is pretty old, and confusing to the native speaker, never mind someone like you. "I should be so lucky" == "If only I were that lucky."

              • Makes sense. Don't worry about making fun of my usage, I do it all the time to both native and second language speakers. ;)

  • by bertok ( 226922 ) on Saturday February 27, 2010 @12:54AM (#31294962)

    What I've never quite understood is why most operating systems boot every time like it's the first time. If you look at most operating systems, they run a bunch of scripts, initialize a bunch of things, thrash the hard drive with random read and/or write patterns, and end up.. at exactly the same state every time. Why not just capture that state, and restore it?

    If you think about it, the only differences between typical boots are:

    - The date & time
    - The type of boot (hibernation or cold boot)
    - Some USB type devices that may have been plugged in or unplugged
    - Minor logging events ('successful boot', 'need an fsck/chkdsk', etc...)

    Really, all of that work can be done in milliseconds, not minutes. Operating systems should just read the ~100MB "ready for use" image from a nice contiguous section of the disk, write it straight into memory, and then do a quick sanity check for changed hardware.

    A typical desktop SATA drive can read at 50MB/sec sequentially, so this should take, what, 2 seconds at most? On a good SSD, it should be 500ms!

    I have a high-end laptop with a good SSD, and it still takes 46 seconds to go form "pressed the power button" to "logged on and usable" with Windows 7, and I suspect it wouldn't be much better with Linux.

    The CPU utilization of typical machine booting in a VM with a very fast disk or SSD behind it is interesting to watch. It takes several seconds of 100% CPU time to boot either Windows or Linux. If you think about it, there's no useful computation that the OS can possibly be doing before it's booted. That's 100% wasted time.

    • Well, Hibernate does does that. The only problem is that it is not stable on all machines. It works once in a while on my laptop, usually not.
      • by pmontra ( 738736 ) on Saturday February 27, 2010 @03:00AM (#31295448) Homepage
        Don't know on other OSes but hibernate on Linux stores all the RAM on disk. I've got 4 GB of RAM and restoring them takes about the same time as booting (some 35-40s to login), getting through Gnome/Nautilus startup (so slow) and restarting the apps I need. The real boot time to a useful desktop is about three minutes. Hibernate is not faster than that and a shutdown is much faster than writing those 4 GB to disk. Furthermore hibernate doesn't work well on my laptop. I think it's the video driver not restoring the video card state correctly (the radeon open source driver).
    • by Korbeau ( 913903 )

      I half agree with you. Well, you can put your computer in hibernation/sleep mode. Works for me and a lot of folks. It does exactly what you describe.

      I even think that nowadays that should be the default option for "shutdown".

      But you still need to shutdown or reboot from time to time. And there's no easy halfway solution there. If you had to reboot for a problem, it means the original image may already be wrong / corrupted and you need to re-do all the testing and scripts. If you had to reboot for a ha

    • Typically the only reason my linux machines get rebooted is precisely because the hardware HAS changed. Or the kernel has. What other reason can there be to reboot?

      And as for your assertion that linux wouldn't be any better, I get a cheap netbook with a joke SSD and it boots faster. (Aspire One ZG5)

      Windows boot time is not entirely fair however, it tries to do a lot of things. People think that all a computer does is draw a desktop, but to get all that in order a lot of hardware has to be configured and t

    • by evilviper ( 135110 ) on Saturday February 27, 2010 @10:49AM (#31296940) Journal

      What I've never quite understood is why most operating systems boot every time like it's the first time.

      Because you told it to do so. If you didn't want it to reboot, you should have suspended or hibernated the system instead.

      Really, all of that work can be done in milliseconds, not minutes. Operating systems should just read the ~100MB "ready for use" image from a nice contiguous section of the disk, write it straight into memory, and then do a quick sanity check for changed hardware.

      You've reinvented Hibernate mode, with it's existing limitations, and more mistakes you've added... Anyone who's used hibernate know it mostly works, but some devices need to be more fully initialized (like your video card) and starting to use it when it's in a different state than it last was, is a sure recipe for disaster. Despite claims to the contrary, I'd say S3 Suspend is easier to get working CORRECTLY, than Hibernate, and with power requirements less indistinguishable from the "off" load, and boot times of <2 seconds, S3 is far better all around.

      I continue to use this old PC (Socket-A MSI Mobo) as my desktop because S3 Suspend mode works (almost) perfectly with FreeBSD-6.x. The ability sit down at my PC, hit the power button, and have all my apps open where I left them (not just the minimal OS up and running) is incredibly valuable. It's a real shame so few people have had the opportunity to experience it. In addition, it's great to be able to just get up and walk away from my computer at any time, for any reason without giving it a second thought... because in 10 minutes it'll be using no power, and when I come back, it'll be right where I left it. Never mind the implications for a UPS-powered system, like a system left right where it was when you last used it, which can be powered from the smallest battery for hundreds of hours, easily.

    • by CAIMLAS ( 41445 )

      I have a high-end laptop with a good SSD, and it still takes 46 seconds to go form "pressed the power button" to "logged on and usable" with Windows 7, and I suspect it wouldn't be much better with Linux.

      Wow, seriously? I've got a Hitachi RAID1 (mdraid) in Ubuntu 9.04 and it takes maybe 20s to get to the X login screen from POST. It's a little longer in 10.04 on similar hardware, but then I haven't bothered to prune unneeded services - still no more than 40s or so. I don't have the time to get up and get a glass of water from the kitchen, at any rate (a 25 foot distance from where I sit).

    • by Graff ( 532189 )

      What I've never quite understood is why most operating systems boot every time like it's the first time. If you look at most operating systems, they run a bunch of scripts, initialize a bunch of things, thrash the hard drive with random read and/or write patterns, and end up.. at exactly the same state every time. Why not just capture that state, and restore it?

      Mac OS X pretty much does just this. It uses several files such as BootCache, BootCache.playlist, and Extensions.mkext to store a preset startup state that it can load fairly quickly. There still need to be some sanity checks to make sure that hardware and software haven't changed but overall the Mac OS X boot process is pretty quick.

      Here's a good summary of the boot process for Mac OS X [osxdaily.com]. It's a little old but most of it is still relevant.

  • Of that time, 800 ms are spent just stabilizing the clocks.

    • No, of 1.5 seconds. The 1-second mark is a guesstimate based on subtracting power sequencing time from the actual 1.5-second mark, approximately.

  • ...That found it ironic that the name of the company that appears to specialize in Linux solutions has the word "Vista" in the name of the company? I mean, how old are these guys? was this planned?
  • It's good, but ... (Score:3, Interesting)

    by DrogMan ( 708650 ) on Saturday February 27, 2010 @07:44AM (#31296188) Homepage
    I'm not convinced it's that big a deal, although if they can sell it for £5K then good luck to them!

    I build little embedded(ish) systems myself - AMD Geode boxards (ALIX) and my custom compiled kernel boots in 1.08 seconds (according to kernel output) If I didn't compile in networking and USB, I'm sure it would be under a second.

    The biggest time is the boards BIOS (5 seconds), then loading the image off flash then the kernel uncompressed and boots - 1.08 seconds.

    If I had more access to the board and had 4MB of flash ram as part of the memory map, then I could eliminate the long BIOS + Load times and jump into kernel on cycle 0. That's where the trick is, I guess - a fast load of the kernel into RAM, or keep it in FLASH that's part of the memory map.

    After the kernel is loaded it's just userspace - I run a cut-down system, but it still takes another 15-20 seconds or so to get time, dns, networking, apache, etc. going. You're probably not doing that with an in-car device or a camera, etc.

    So it's not really hard to make a kernel boot fast and possibly even launch one application - the big savings are going to be on the hardware when you can eliminate BIOS and load times, and the amount of userland you then have to load - which is the real difference between "embedded" and general purpose (e.g. desktop)

    • The biggest time is the boards BIOS (5 seconds),

      AMD Geode and its companion chips are allegedly well-supported by coreboot. I thought PC Engines stuff was supported already? Have you tried coreboot with a linux kernel payload?

      • by DrogMan ( 708650 )
        Not tried it - the board I'm using is the PC Engines one - supported in the depreciated V3 of the code.. (which means it'll be back-ported to the supported V2 version eventually according to the site)

        I currently use the on-board "BIOS" to PXE boot them first time round which I then use to write the image to the compact-flash card, so keeping that around is handy.

        However, I can live with the boot time of my units - little Linux/Asterisk boxes. They boot fast enough for this purpose, ta!

  • Could the Swiftboot people consider making Ubuntu boot in 1 second? Sweeeeeeeeeeeeeeeeet
  • ...don't know how good you got it. The first computer I learned to boot was a PDP-8 with no boot rom. The only mass storage medium was punched paper tape. Booting consisted of setting the front panel switches [comm.sfu.ca] so that the first few bytes of RAM contained a program that said "read the paper tape and execute it". Then you loaded the OS tape into the reader, prayed that it wouldn't jam or tear, pressed a button and waited a couple minutes.

    • And you probably used a teletypewriter to code with too. Put a sock in it old man, at least they are going forward.

      • by fm6 ( 162816 )

        Of course I used teletype. Except for batch machines, for which I used a keypunch. And of course with punched media, there's no such thing as a delete key. (Shudder.) Don't think for a moment that I'm the teeniest bit nostalgic!

There are never any bugs you haven't found yet.

Working...