1 / 17

Objectives Topic 2.6

LPI Linux Certification. Objectives Topic 2.6. Understanding the boot process Demonstrate your ability to change run levels, shutdown and reboot. Boot the system. Lilo – job is to launch a linux kernel capable of accepting information in the form of a command line

nerita
Download Presentation

Objectives Topic 2.6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LPI Linux Certification Objectives Topic 2.6 Understanding the boot process Demonstrate your ability to change run levels, shutdown and reboot

  2. Boot the system • Lilo – job is to launch a linux kernel capable of accepting information in the form of a command line Example linux root= /dev/hda9 overrides normal boot and boots the kernel who’s label is linux on device hda and partition #9

  3. Modular nature of Linux • Modules are kernel executable files produced by a C compiler for devices or process and reside in the /lib/modules/ directory – can be started before or during operation by root • Module configuration is located in /etc/conf.module /sbin/lsmod

  4. A typical etc/conf.modules • alias scsi_hostadapter aic7xxx • alias eth0 3c59x • alias parport_lowlevel parport_pc • pre-install pcmia_core /etc/rc.d/init.d/pcmcia start • alias sound op13sa2 • pre-install sound insmod sound dmabuf=1 • alias midi op13 • options op13 io=0x530 irq=5 dma=0 dma2=1 mpu_io=0x388 io=0x370 Note alias sound is created for a audio driver opl3sa2 – you can see the I/O ports, interrupts and DMA channels

  5. Note • Lilo, at boot time,can only pass kernel options on to the kernel example linux 1 for run level 1 • Module options are specified in the conf.modules files

  6. Kernel boot time messages • As kernel boots it sends detailed status of its progress in the form of text messages • Viewed with the dmesg command dmesg | less • Dmesg > bootmsg.txt dumps boot messages to a file for later inspection

  7. Changing Run Levels • Specifies how a system is controlled by which services are running at boot time • Example linux 3 command line only

  8. Changing runlevels during Operation • Init – change run levels during operation (by root) • Example – init 1 switches to single user mode – will disable others • Example – init 5 changes from text mode to X login screen

  9. Linux start up scripts /etc/rc.d • rc.sysinit – launched by init at boot time, it handles some essential chores such as mounting file systems • rc.local – file that is called upon by rc.sysinit, it contains local customizations – preferred by sys- admins to edit because it won’t be lost during a system upgrade • rc – file script that used to change between run levels • Init.d – file that controls individual start ups for services such as Apache or Mysql or Bourne shell

  10. Setting the default run level • Init reads the /etc/inittab file • To determine your run level use the command runlevel - displays previous and present run level

  11. Changing Runlevels with init and telinit • Init 0 = shutdown now • Init 1 = single user maintenance • Init 2 = multiuser no nfs • Init 3 = text mode (command line) • Init 5 = GUI interface starts X • Init 6 = reboot immediately Note telinit is equal to init

  12. Shutdown • Shutdown command brings the system down in a secure and organized fashion • Options are on page 144 • Shutdown –r now = immediately • Shutdown –r +5 System maintenance is required = shutdown in 5 mins with maintenance message • Shutdown –h 23:59 = shutdown just before midnight

  13. Questions • 1. Kernel options are passed on by A. By the kernel B. By Lilo C. I don’t know • Kernel module options are specified in which file A. local/conf.modules B. etc/conf.modules C. rc.d/rc.local

  14. 3. Dave has a linux system with an interrupt conflict caused by his 3c509 network card. How could Dave instruct the system to use interrupt 11 for his network adapter? • A. linux eth0=irq11 ant the lilo prompt • B. add options 3c509 irq=11 to etc/conf.modules • C. reload linux

  15. 4. How do I dump my kernel boot time messages to a text file? A. Cut and paste B. dsmeg | less C. dsmeg > bootmsg.txt 5. How do I change the run level to single user at boot time? A. Init 1 B. linux 1 C. Rub 3 times and say I love you

  16. I want to change my default run level at boot time to 3, which file do I edit? A. rc.local B. rc.sysinit C. /etc/inittab • What command would I issue if I wanted to determine my present run level A. runlevel B. Init C. Da!

  17. I want to shutdown my system at noon for system maintenance, afterwards take a long lunch. A. Shutdown –h now B. Shutdown –r C. Shutdown –h 12:00 • What is the difference between init 0 and shutdown? • What would happen if I changed my default run level to level 6 in my /etc/inittab file?

More Related