Startup diagnosis: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Diagnosing Pretty Boot: Update w/ info about pretty boot.)
Line 66: Line 66:


[[Category:Developers]] [[Category:Firmware]] [[Category:OLPC FAQ]] [[Category:OS]] [[Category:Security]] [[Category:Software development]] [[Category:Support]]
[[Category:Developers]] [[Category:Firmware]] [[Category:OLPC FAQ]] [[Category:OS]] [[Category:Security]] [[Category:Software development]] [[Category:Support]]
[[Category:XO startup]]

Revision as of 21:04, 28 August 2008

  This page is monitored by the OLPC team.
  Please copy/paste "{{Translationlist | xx | origlang=en | translated={{{translated}}}}}" (where xx is ISO 639 language code for your translation) to Startup diagnosis/translations HowTo [ID# 154946]  +/-  


  For the general public
<imagemap>

Image:Support-banner-square.png|173px|community support pages rect 0 0 135 204 [1] rect 135 0 345 204 Support FAQ rect 0 205 135 408 [2]

  1. Comment : there's some whitespace here:

rect 135 205 345 408 Other support

  1. maybe desc none is better. testing.

desc none

</imagemap>

Diagnosing Startup Failures

When the XO laptop is powered-on, it makes a brief survey of the available I/O devices, then tries to read in and execute the operating system. The operating system then explores the hardware and begins operations. At various points in this process, software or hardware problems can result in a "hang", a power-off, or another problem. This page attempts to describe what you might see at such a hang, and what the possible causes might be.

Laptop Power and Battery

When the laptop is powered off, has no battery, and is not connected to its AC power adapter, there are no LEDs lit, and the screen is dark. If a battery is inserted without an AC adapter, nothing will change (no LED lights come on). Similarly, if the AC adapter is plugged in, but no battery, no lights come on. But when both the AC adapter and the battery are plugged in, the "battery" light will come on. (Sometimes we call it the battery LED instead of light; they mean the same thing. LED means Light Emitting Diode. There are two battery lights, one below the screen and one on the back of the screen.) The battery light will be green if the battery is fully charged; orange if the battery wasn't full and is now charging; and red if there is a problem with the battery.

You can run the laptop anytime it has AC power, or a battery, or both.

You turn on the laptop by pressing the large round recessed key to the right of the battery light. When you press it, things should start happening in this order:

The "Power" light comes on. This has the same "circle with a vertical bar" shape as the power button. (There are two of these, too; one on the back.)

The screen lights up, but doesn't yet show an image.

The startup sound (composed especially for OLPC by The Edge of U2, by the way) starts playing. (You can change its volume by pressing the "louder" or "softer" keys on the top row of the keyboard, toward the right; and the laptop will remember the new volume for next time.)

The "XO" logo will appear in the middle of the screen.

Then the boot firmware will try to start the operating system, by looking on both the internal flash memory, and on removable storage devices such as USB memory sticks or SD cards.

Special Startup Options

If you don't hold anything down, you will probably get a "Pretty Boot".

If you have disabled security on your laptop (perhaps because you're a software developer), you'll get an Insecure Boot, see #Diagnosing Insecure Boot below.

Before you press the power button, if you hold down any of the "game" keys on either side of the screen, the boot firmware will do special things. These Cheat codes have their own web page.

Check-Key Boot

If you hold down the "Check" key (with a ✓ check-mark on it, the rightmost of the four keys in the game pad to the right of the screen), then you'll get a "Check Boot" which is significantly more verbose. Asking the laptop owner to do this can sometimes produce information that helps to diagnose the problem.

Hardware diagnostics

If you suspect a serious hardware problem, you can invoke the hardware diagnostics by holding the rocker key (to the left of the screen) to the left.

Diagnosing Pretty Boot

XO laptops without a developer key typically start up by making a pretty screen with very little text on it. This adds to the laptop's charm, but makes diagnosis more interesting. On the positive side, it can be interpreted in any language, once you understand it.

The first screen shows grey with the "XO" logo in the middle. When there are no dots around the "XO", the laptop is still running the Open Firmware boot code.

The boot firmware puts up a "sad face" if it can't find a signed operating system on the internal flash memory. (It will also look on USB memory sticks and SD cards.) If your laptop does this, and you don't have anything important stored on the laptop, I suggest doing a full reflash using the Activated Update procedure. That should fix the "sad face".

When the firmware has located the operating system and has read it into memory (typically from the JFFS2 filesystem on the internal "NAND" flash chips), it puts a first dot below the XO logo.

Just after painting the first dot, the firmware gives up control of the machine to the operating system (typically the Linux kernel). The kernel then probes the available hardware, locates the root file system (typically the JFFS2 filesystem on the internal NAND flash chips), reads in the initial user program, and begins the scripted process of creating the running operating system.

I do not yet know when the second dot first appears. Failures when there is an XO logo and a single dot could be caused by a variety of problems.

Each subsequent dot indicates that a particular point in the progress of the Linux startup scripts has been reached. The master script is /etc/rc. As /etc/rc calls each sub-script, it also calls the update_boot_stage() function defined in /etc/rc.d/init.d/functions. That function invokes /usr/bin/rhgb-client to update the graphical boot screen with a frame from /usr/share/boot-anim/. Tweaking the boot animation has more details on the images. You can switch to the virtual console using control-shift-mesh view during this process to see more information.

Eventually a circle of 24 dots sweeps around the XO logo, and part of the logo itself rotates to face each new dot. At the completion of the circle, a solid donut covers up the dots. I do not yet know when this donut appears.

When the grey XO logo and the solid grey circle are visible, a delay of many seconds arises. Eventually, after the X Window System server and the Sugar graphical user interface are running, the screen changes to include a colored XO logo, a black frame around the edges of the screen, and a Journal (book-like) icon at the bottom of the circle -- which has become the "donut" in which later activities are visible.

Diagnosing Insecure Boot

XO laptops without Firmware Security or with a Developer Key produce a large amount of textual output as they start up. This text is very similar to the output of standard Fedora, Linux, or Unix system startup. This may allow people with a Unix background to more easily diagnose their problem.