Chapter 9. Boot, Initialization, Shutdown and Runlevels

Table of Contents

1. This Chapter Is Up For Adoption
1.1. Structuring The Chapter
1.2. DocBook XML Markup
1.3. Additional Questions
2. Practice Questions
3. Answers to Practice Questions
4. References

1. This Chapter Is Up For Adoption

If you feel you are an expert in the subject area for this LPI topic and would like to write this chapter please email the author of the LPI study guide to communicate your intentions. Authors should be LPI certified or hold a similar certification in a related subject.

Please adopt only one chapter at a time and plan to finish the chapter within thirty days of adopting it.

More information about the study guide can be found at: http://www.happy-monkey.net/LPI/

1.1. Structuring The Chapter

The structure of chapters within the study guide needs to be consistent. The following structure may be used as a guide. Authors are also encouraged to view the chapter covering "Hardware & Architecture" as a template.

  1. Author Name

    This is to ensure that authors get credit for their work. Please include your level of LPI certification after your name. If there are other appropriate certifications, please include these as well. For example, someone writing a chapter on networking might include the fact that they have a Cisco certification in addition to the LPI certification like this: "Joe Smith, LPIC-1, CCNA".

  2. A Brief Look At The Objectives

    Each chapter should start with a high-level look at the LPI testing objectives. Within this "Brief Look" section there should be hyperlinks to sources of additional information. For example, one might say, "The networking section of the exam requires familiarity requires familiarity with IP addresses and subnet masks." The phrases 'IP addresses' and 'subnet masks' should be hyperlinked to additional information. Wikipedia is the prefered source of external information, but it is also helpful to link to man pages for specific commands.

  3. Detailed Discussion

    Each one of the LPI exam objectives should receive a section for more detailed coverage of the objective and how it relates to Linux and the LPI exam. A good way to do this is by using hands-on exercises and examples from real-world Linux systems whenever possible. For example, when discussing a configuration file in /etc, give a sample of what a typical file might look like and encourage the reader to cat the file on their own system.

    Objectives may be grouped together when it is logical to do so.

  4. Practice Questions

    At the end of each chapter there should be a section dedicated to practice questions that cover the exam objectives. These should not be verbatim questions from the exam! The idea is to let readers test their mastery of the knowledge in each chapter and get a feel for the exam format, not to help them cheat. Anyone intentionally submitting verbatim questions will be reported to the LPI and risks losing their certification.

1.2. DocBook XML Markup

The LPI Study Guide is written using DocBook XML markup. This allows the guide to be published in HTML, PDF and other formats using the same source document. Those familiar with DocBook are encouraged to submit chapters this way. Be sure to use markup for commands and filenames in addition to sections. Use the chapter on "Hardware & Architecture" as a template.

For those not familiar with DocBook should submit chapters in plain text in a format similar to the example below.

A Brief Look At The Objectives

Successful completion of the Hardware & Architecture section
of the LPI exam requires familiarity with Personal Computer
(PC) expansion cards [http://url-to-wikipedia/expansion-cards]...

Next-Section-Title

More text...

1.3. Additional Questions

Please email the author of the LPI study guide with any other questions not covered.

2. Practice Questions

  1. Your /etc/inittab file has a line that reads "id:1:initdefault:" What mode will the system enter when it is booted?

    1. Single user mode

    2. Non-network multi-user mode

    3. Network multi-user mode

    4. Multi-user GUI mode

  2. According to the Linux Standard Base (LSB) specification, runlevel 3 is reserved for which of the following system states?

    1. Single user mode

    2. Non-network multi-user mode

    3. Network multi-user mode

    4. Multi-user GUI mode

  3. You have edited your /etc/inittab and changed the line "id:5:initdefault:" to read "su:5:initdefault". What will be the runlevel on the next reboot?

    1. 0

    2. 1

    3. 5

    4. None, the init daemon will prompt for the runlevel before finishing boot-up.

  4. What command can be used to replay messages that were displayed while the Linux kernel was kernel booting?

3. Answers to Practice Questions

  1. Answer A is correct since runlevel 1 is single-user mode. Answer B, C and D are incorrect. According to the Linux Standard Base specification, non-networked multi-user mode is runlevel 2, networked multi-user mode is runlevel 3 and multi-user GUI mode is runlevel 5.

  2. The correct answer is C, runlevel 3 is network multi-user mode on an LSB compliant system. Single user mode is runlevel 1, non-network multi-user mode is runlevel 2 and multi-user GUI mode is runlevel 5.

  3. Runlevel 5, answer C, is correct. Answer A, runlevel 0, is for system halt. Although answer B may be tempting it is incorrect. The label of "su" makes no difference in the runlevel, everything is determined by the number "5". Answer D is incorrect since the system will only prompt for a runlevel if initdefault is missing.

  4. The dmesg command will allow you to print the kernel ring-buffer which contains the kernel's boot messages.

4. References

For an in-depth reference see the From PowerUp To BASH Prompt HOWTO from The Linux Documentation Project. Also skim the run levels section of the linux standard base specification document.