Slashdot Mirror


Anatomy of the Linux Boot Process

Donna writes "This article discusses detailed similarities and differences involved in booting Linux on an x86-based platform (typically a PC-compatible SBC) and a custom embedded platform based around PowerPC, ARM, and others. It discusses suggested hardware and software designs and highlights the tradeoffs of each. It also describes important design pitfalls and best practices."

33 of 170 comments (clear)

  1. The good thing about Linux by X43B · · Score: 5, Insightful

    What I like about Linux is never having to reboot except when it is time for a kernal upgrade. :)

    1. Re:The good thing about Linux by Claire-plus-plus · · Score: 4, Insightful

      What I like about Linux is never having to reboot except when it is time for a kernal upgrade. :)

      Or hardware installation :)

      --
      99 bottles of beer in 175 characte
    2. Re:The good thing about Linux by Quasar1999 · · Score: 5, Funny

      Or hardware installation :)

      About that... I've unsuccessfully tried hotswapping an AGP video card once... I spent the rest of the day looking up motherboard, ram, and video card prices online... using another computer... I'll let you figure out why...

      --

      ---
      Programming is like sex... Make one mistake and support it the rest of your life.
    3. Re:The good thing about Linux by MikeCapone · · Score: 4, Insightful

      That is a good point, but it doesn't mean that the boot process can't be sped up quite a bit.

      It would especially be useful on laptops, or for people who like to save electricity by shutting down their computers when not in use.

    4. Re:The good thing about Linux by WinterpegCanuck · · Score: 3, Funny
      I've always been partial to pulling out running CPU's. . . The system just kind of stops. No errors. Just peace. Like a portrait in time.

      I think I need to write a poem.

      PS. be careful what web page you were viewing at the time, as it isn't so easy to close.

  2. What a Debian system looks like when booting by El+Cubano · · Score: 5, Interesting
    1. Re:What a Debian system looks like when booting by burns210 · · Score: 3, Informative
      Or, you could post to the article that inspired yours(and was cited in it), regarding the Fedora boot process. here.

      Basically, they found that rhgb (which is often turned off by Redhat Engineers) is wasting a lot of time and doesn't accomplish anything. Removing it would increase bootspeed.

    2. Re:What a Debian system looks like when booting by El+Cubano · · Score: 3, Interesting

      Or, you could post to the article that inspired yours(and was cited in it), regarding the Fedora boot process.

      That was not my post. I just remember seeing it on debian-devel. Besides, the if you follow the links from the fedora-devel post you refer to, all you get is a couple of png images of the boot processes. The guy who did the Debian version explains how he did it and also provides links to the necessary tools.

  3. Proof reading? by FyRE666 · · Score: 4, Insightful

    They could have at least made sure the arrows on the diagrams were round the right way!

    1. Re:Proof reading? by larwe · · Score: 4, Informative

      Hi, I'm the author of this article series, and I was steered here by my publication contact at IBM (I don't get much time to read /. - right now I'm working at a day job, this article series, my third book and some contract embedded systems engineering). Anyway, I swear to you (and can email you the original PNG!) that *I* got the arrows the right way around. Unfortunately, someone in IBM's graphics department was apparently DUI operating Adobe Illustrator. I don't always get a chance to proof the graphics before an article gets published; and that was the case for this one. I got a bite at the text, but didn't see the massaged graphics until the article hit the web. I've already poked my end of the chain to get that fixed. To people who find the article boring, I've got two comments: a) It's part of a series. I can't assume much about my readership, so I had to spend essentially the entire first three articles doing groundwork to explain what's happening in the system and why, and how to get a functional development environment working on the box. Article #4 starts giving some actual code, and article #5 will start giving some actual circuits. Unfortunately, IBM sets the release schedule, and that means you have to wait a month between episodes. They also set the article length limits, which means I can only put so much in each instalment. b) Not everything in those three articles is obvious to the lay person. Although I didn't have enough space to go into great detail, I tried to communicate some useful information I've learned in practical 32-bit systems implementation (for commercial purposes). Remember that the target audience is primarily people who are accustomed to building x86-based embedded Linux apps, and many of these people will not know or care about much of the infrastructure under their app.

  4. I have a computer science degree by Claire-plus-plus · · Score: 4, Funny

    But I still found that article as boring as hell!

    --
    99 bottles of beer in 175 characte
    1. Re:I have a computer science degree by j1bb3rj4bb3r · · Score: 3, Funny

      But I still found that article as boring as hell!

      If you had an EE degree, you might find it more interesting... but then likely everyone else would find *you* boring as hell.

      --
      *yawn*
  5. Arrows by Bios_Hakr · · Score: 5, Interesting

    I really hate to nit-pick, but any editor should have caught that the arrows in the flow chart point the wrong way.

    Anyway, I've often wondered why the OS insists on redetecting hardware when BIOS does it for me already. I've heard that the LinuxBios actually does away with the hardware detect phase; leaving it solely to the kernel.

    If the most popular OSes out there are taking care of HW at the high level, why haven't BIOS makers taken advantage of this to reduce their workload?

    --
    I'd rather you do it wrong, than for me to have to do it at all.
    1. Re:Arrows by teknomage1 · · Score: 5, Insightful

      Tradition! Seriously though, BIOS code is very old and designed to provide for the least common denominator.

      --
      Stop intellectual property from infringing on me
    2. Re:Arrows by 0racle · · Score: 3, Informative

      That the OS does it allows older systems to be much more useful. By ignoring whatever crap the BIOS says, my FreeBSD system can use a >8gb drive in a system with motherboard that does not support large drives. However, with a bios still there, the system can be used by a system that relies on it.

      --
      "I use a Mac because I'm just better than you are."
    3. Re:Arrows by Anonymous Coward · · Score: 3, Interesting

      On a PCI system, the OS doesn't really "detect" hardware -- at least not in the old Win95 sense of poking registers to figure out what's there.

      The OS just asks the BIOS for a list of PCI ID values, and loads the appropriate drivers for those IDs.

  6. More discussion? by mistersooreams · · Score: 3, Interesting

    The article makes an interesting read (although the server is getting slow already), but it seems a bit short on commentary. I'm no expert on the low-level systems of Linux, so the bare facts are quite interesting, but I would have been more interested to read a comparison of the merits of the different systems.

    My impression, from the article, is that x86 versions of Linux are carrying quite a lot of legacy (from DOS et al). Does this mean that Linux on other architectures is "better" in any sense? I don't know, but I'd be interested if someone can inform.

  7. Speaking of linux booting... by saskboy · · Score: 3, Insightful

    I've always found it disconcerting that a verbose boot is given by default. Before Linux goes main stream on the home desktop, the distros ought to slap a plain progress bar with a pretty picture [ie. Windows clouds or logos] and not show verbose details unless something is wrong with the boot, or unusual.

    --
    Saskboy's blog is good. 9 out of 10 dentists agree.
    1. Re:Speaking of linux booting... by dmhoward · · Score: 3, Informative

      Most mainstream distributions already do this. For example: Fedora Core, Suse, and many others.

      Danial Howard

    2. Re:Speaking of linux booting... by yamcha666 · · Score: 4, Informative
      The distributions of Linux that are aimed for the main stream home desktop do use some type of a bootsplash.

      The most notable example I can give is Xandros. The booting process shows an animated Xandros logo with very general boot details such as detecting hardware... done, and Loading Kernel ... done.

      The distros that usually don't offer a type of bootsplash by default are aimed for us power users because we want to know what's going on.

    3. Re:Speaking of linux booting... by arkhan_jg · · Score: 4, Informative

      most modern distros do now, especially the livecd's and home-user orientated distros, the software that does it is called bootsplash. It relies on you having a graphic card/monitor supported by the frame buffer drivers though, so don't expect it to work on a 486. It comes in two flavours; a high res virtual terminal with a background image, or silent mode which just has a pretty screen and a progress bar until it launches gdm/kdm etc.

      If it's a server/professional workstation, the services boot loader is probably more useful. I'd sure like to have one on windows when I'm trying to troubleshoot a boot problem, without having to use safe mode - especially if the problem doesn't show up in safe mode...

      --
      Remember kids, it's all fun and games until someone commits wholesale galactic genocide.
    4. Re:Speaking of linux booting... by SEE · · Score: 4, Interesting
      Bruce Tognazzini, founder the Apple Human Interface Group and fomer Apple Human Interface Evangelist, disagrees.

      Some might be surprised to learn, however, that not only do I accept the idea of having flashing updates, such as "loading the kernel," I actually embrace it. First, it keeps the user engaged, and an engaged user is a happy user. Second, it informs. Yes, I'm aware that the only kernel most people are aware off is armed with eleven herbs and spices, but that's because no one has ever introduced them to the UNIX/LINUX kernel.

      In ancient times, before there was disk, we all used tape cassettes to store our applications. We could literally hear them as they loaded into the computer over a period of one to three minutes. (Thank heavens today's hard disks are a million times faster so that, for example, Excel can load in only a few microseconds.) One might assume the sound of a loading program would be indistinguishable from random noise, but that proved not the case. Every application and every image had a unique signature. After a while, we could tell if we'd started the wrong program just by the sound of its code.

      Today, few modem users understand handshaking protocols, but they do become used to a familiar pattern of clicks and screeches indicating normal vs. abnormal connections.

      If regular folk can come to "understand" on some level the sound of high-speed binary code, do you think they cannot absorb some lessons from being subjected to new terminology like "kernel," etc.? Such terms so often come to be useful, as when some system software programmer spits out some horrifying message like, "fatal execution of kernel." At least they won't fear their supply of fried chicken is about to be cut off.

      Entertain them. Teach them a little something, even if it seems "way over their heads." At the very least, it will keep them awake and alert.
    5. Re:Speaking of linux booting... by supercowpowers · · Score: 3, Insightful
      After struggling with making my grandparents computer work with the Windows ME "recovery cd" that came with the computer (they didn't tell me I was going to be working on it, and didn't have the best of resources at hand...), I finally decided to just bite the bullet and install Debian and Gnome on it.

      I know, I know, Debian isn't exactly your "grandmother's distribution", but the distro in question is pretty irrelevant once I get to the point.

      Anyway, I set it up so they basically couldn't screw it up. They don't know the root password, GDM is set to automatically log in their user (yes, their, hilarity would ensue trying to get them to understand the concept of users) on boot, and the desktop has I think 5 icons, "user's home", "Computer", "Pogo Games" (they love this for some reason), "E-Mail" (evolution), "Internet" (loads google in firefox), and "Trash".

      They had to learn very few things to use this system, mainly what the icons do (which is easy because I made them visually huge and self explanatory), and how to shut down (Actions menu, not the Start menu)

      Some other measures I put into place, like making a backup of /home so I could log in remotely and fix it (I had to do this once, because one day the icon for pogo games magically disappeared, even though they "Didn't do anything, I swear!"), but this is really turning rambly really quick...just to give you an idea of how idiot-proof the thing is.

      They haven't had problems with it in about 2 months (since I installed it). Their usage is very basic, and this configuration serves them very well, since I can control the interface to be much less full of surprises than Windows.

      So the world is all well and rosy...well...not quite...

      I took no measures to clean up the default boot process, so it still outputs 'garbage' like
      APM Bios version 1.2 Flags 0x02 (Driver version 1.2)
      Entry f000:c64e cseg16f000 dseg f000 cseg len ffff, dseg len ffff
      Connection version 1.1
      AC off line, batter status high, battery life 82
      [and so on...]
      It fills the entire screen, and scrolls by so fast they couldn't comprehend it even if they knew what it all meant.

      So I've counted about 5 times so far where my grandmother asks something like, "Now, is all that writing going to come up for good now?" It really, deeply bothers them to see all that as opposed to a pretty Windows logo. Not that I blame them.

      So, that progress bar might be 'boring' to you, but it's blissful simplicity to somebody like my grandparents.

      (FWIW, I prefer to see it all on a 1024x768 framebuffer, because I want to know when something is configured wrongly but can still pass that stage failing silently)
      --
      Nyntändo-Schock!
    6. Re:Speaking of linux booting... by mickwd · · Score: 3, Insightful

      "It will zip up to a point, then spend 95% of the time stuck there, and then zip to the end."

      "On a somewhat unrelated note, I have also not figured out why Mandrake 10.1 takes far longer to boot up on a much more powerful computer than my Mandrake 10.0 system."

      Somewhat unrelated ???!!!

      Why don't you try pressing Escape just before the progress bar gets stuck, and find out which particular part of the boot process is causing all the delay. Mandrake may well be trying to set up some service or some piece of hardware that you don't actually use. If so, you can remove the item in question from you setup configuration. This probably explains why Mandrake 10.1 boots slower than 10.0 for you.

  8. Fire safety and misdirected arrows? by Anonymous Coward · · Score: 3, Funny
    Lewin A.R.W. Edwards works for a Fortune 50 company as a wireless security/fire safety device design engineer.

    Time to stop trusting that the arrows if emergency exit signs are right now too?

  9. don't like the splash screens by LiquidMind · · Score: 3, Interesting

    i've noticed on SuSE that it now comes with a boot splash screen (a la Windows loading...). I know that's (somewhat) easily turned off, but really, I don't want my linux to be all fisher-price pretty. give me the rough and unadulterated command lines that are run when it boots up...make it look cool, make it intimidating, give it that matrix-esque feel...make it scare off all the n00bs that think they know everything.

    --
    This sig contains repetition and redundancy.
  10. The BSD boot process by Anonymous Coward · · Score: 5, Funny

    And here i Present you the BSD boot process

    1) birth
    2) death (confirmed by netcraft)

  11. Re:acronymfinder.com didn't help by Repugnant_Shit · · Score: 3, Informative

    Single Board Computer. A computer with almost everything (sometimes even storage by way of flash/nvram) on a single board.

  12. Should be "BIOS" vs. "known hardware" by pchan- · · Score: 4, Informative

    This article glosses over one point that is very critical. That is, in an embedded system, the hardware is known at compile time, as well as all the details of initializing it. On a desktop PC, the hardware configuration is a mystery everytime you boot. Who knows, maybe the user decided to move their network card to a different PCI slot and now it has a different memory address, add a hard drive, remove a sound card, take out half the RAM. This makes the boot process far more complicated. The BIOS method of dealing with this situation is archaeic and painful to use, but it works. That is, you can boot even the dumbest OS (say, DOS, or that memtest86 iso) without having that PS know anything about the hardware.

    Having written a few embedded bootloaders (and modified some others), I will say that booting an embedded device is far far easier than booting a device who's hardware (that is critical to booting) can change between boots.

  13. Stop plagiarizing! by Osty · · Score: 4, Insightful

    From the Slashdot submission:

    This article discusses detailed similarities and differences involved in booting Linux on an x86-based platform (typically a PC-compatible SBC) and a custom embedded platform based around PowerPC, ARM, and others. It discusses suggested hardware and software designs and highlights the tradeoffs of each. It also describes important design pitfalls and best practices.
    And from the actual article:
    This installment of "Migrating from x86 to PowerPC" discusses detailed similarities and differences between booting Linux on an x86-based platform (typically a PC-compatible SBC) and a custom embedded platform based around PowerPC, ARM, and others. It discusses suggested hardware and software designs and highlights the tradeoffs of each. It also describes important design pitfalls and best practices.
    Replacing the string "This installment of "Migrating from x86 to PowerPC"" with "This article" and replacing the word "between" with the phrase "involved in" is not sufficient to serve as summarization in the submitter's own words. Somehow I have a hard time believing that the submitter "Donna" and the article author Lewin Edwards are one and the same person. If I'm wrong, then fine. You can't plagiarize yourself. If I'm correct, then Slashdot's done it again. The article summary isn't an original work by Donna, but a minor modification of the article author's own summary, and should be properly attributed as such.
  14. My boot process by i.r.id10t · · Score: 5, Funny

    Open the office, turn on the computer, walk out of the office, walk across campus to the cafeteria while ogling the young college chicks, get a cup of coffee, walk back, log in, do work.

    --
    Don't blame me, I voted for Kodos
  15. Re:describes important design pitfalls by psetzer · · Score: 3, Funny

    How the mighty have fallen! I'd never expect to see Andrew Tanenbaum trolling Slashdot as AC.

    --
    "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
  16. Re:The article: by grozzie2 · · Score: 3, Funny

    I _think_ the ibm site can handle a /. swarm. No need to karma whore this one.