This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CIS 191 – Lesson 4
Lesson Module Status• Slides - draft• Flash cards – 14• No-stress quiz – done• Web calendar summary – done• Web book pages – done• Commands – done• Skills pacing - done• Next lab – done• Software – • cis191-rh9, duke vms • centos, knoppix iso
• Chocolate – done• Make copies of test -
CIS 191 – Lesson 4
Objectives Agenda
• Install openSUSE 11
• Walk through system startup and shutdown
• Change default run level
• Customize run levels
• Manage services
• Questions from last week
• Test
• Exercise: Test Lab 2 pen drive boots
• Skills needed
• Booting the system
• Rooting the system *
• Init and Runlevels
• Shutting down the system
• Startup & shutdown walkthrough
• OpenSUSE inittab
• Exercise: Start Lab3 (CentOS)
• Wrap up
= hands on exercise for topic
System Startup and Shutdown
CIS 191A
Lesson 1
VMware ServerUbuntu 8.04
Lesson 2
PartitioningMake file systemsRH9
Lesson 3
BootingDual bootFedora 8/DOS
Lesson 6
RPM, apt-getTarballsCustom Distro
Lesson 5
TroubleshootingOpenSUSE
Lesson 4
RootingCentOS
Lesson 7
X windowsDebian InstallReview
Final
Course Skills Pacing
CIS 191 - Lesson 4
Last weeks Assignment
• Questions on previous material or assignments?
• Lab 2 and five posts due midnight today
CIS 191 - Lesson 4
Housekeeping
CIS 191 - Lesson 4
Last weeks Assignment
• Code names for grades page
• Hand back graded work
CIS 191 - Lesson 4
Test
• Flashcards (random for practise)
• Monitors off• Books closed• You may use one double-sided crib sheet
CIS 191 - Lesson 4
Boot USBPen Drive
(Lab2)
CIS 191 - Lesson 4
Test Pen Drives made in Lab 2Consultants and Clients exercise
Things that could go wrong:• not ext3• path issues in grub.conf• no init= on kernel line• Used different Linux than Fedora 8 or 9 to make (possible initrd issues)•Use: http://simms-teach.com/howtos/115-fedora-9-usb-boot.pdf if needed •Redo with Duke VM if all else fails
• If your pen drive boots on class PC: • You are a consultant and your job is to find a client to get their pen drive to boot.
• If your pen drive does not boot yet:• Raise your hand for a consultant to come and assist.
• When all pen drives are booting:• Dark chocolate will appear
CIS 191 - Lesson 4
SkillsNeeded
CIS 191 - Lesson 4
Lesson 4Skills Needed
• Know where to find key logs and scripts
• Read logs to monitor startup and shutdown
• Be able to show and set the default run level
• Password protect single user mode
• Be able to customize run levels (Red Hat systems)
• Manually stop and start a service
CIS 191 - Lesson 4
Booting theSystem
CIS 191 - Lesson 4
Booting the System
1. Power On Self Test (POST) – loads the BIOS.
2. BIOS loads the Master Boot Record.
3. MBR read its partition table to determine which
partition to boot into.
4. MBR loads the boot program in the active partition.
5. Boot program presents user with boot prompt menu.
6. Based upon user selection, boot program loads
desired kernel along with and supplied boot options
7. Kernel uncompresses and loads into memory.
8. Kernel detects hardware and initializes its data.
CIS 191 - Lesson 4
Rooting theSystem
CIS 191 - Lesson 4
Rooting the System
1. Kernel mounts the root file system2. Kernel creates and starts the init process3. init reads /etc/inittab for its instructions4. init performs system initialization:
• presents some kind of welcome banner• allows for and interactive startup• set up keyboard mapping, system fonts, plug and play
devices, …• checks for dirty file systems, can cleans them if
necessary• checks disk quotas and swap space• mounts all file systems
5. Chooses which runlevel to come up in and executes those scripts via rc script
6. daemons load7. getty processes are spawned on terminal devices
CIS 191 - Lesson 4
Init andrunlevels
CIS 191 - Lesson 4
Init and Runlevels
The /etc/inittab file:• A two letter system identifier id• A list of runlevels for specified actions• An action – how and when should a command be run• The process – which command to run
Runlevels• Runlevel 0• Runlevel 1• Runlevel 2• Runlevel 3, 4, 5• Runlevel 6• rc scripts and/or rc.d directories for each run level• RC script naming conventions
• Start with S or K• A number• A daemon shell script
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – Page 1
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
• runlevels - A list of runlevels for specified actions
• action – how and when should a command be run
• process – the command or script to run
Set default system runlevel
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – Page 1
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
• runlevels - A list of runlevels for specified actions
• action – how and when should a command be run
• process – the command or script to run
Initialize system (applies to all runlevels)
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – Page 1
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
• runlevels - A list of runlevels for specified actions
• action – how and when should a command be run
• process – the command or script to run
Transition to specific runlevel
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – Page 1
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
To force user to login with root password for singe user mode add:
s0:S:wait:/sbin/sulogin
(more in CIS 193)
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – page 2
# Trap CTRL-ALT-DELETEca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes# of power left. Schedule a shutdown for 2 minutes from now.# This does, of course, assume you have powerd installed and your# UPS connected and working correctly.pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels1:2345:respawn:/sbin/mingetty tty12:2345:respawn:/sbin/mingetty tty23:2345:respawn:/sbin/mingetty tty34:2345:respawn:/sbin/mingetty tty45:2345:respawn:/sbin/mingetty tty56:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5x:5:respawn:/etc/X11/prefdm -nodaemon[root@rh9 root]#
• mingetty prompts for a username then initiates login process on ttys
• respawn fires up programs again when they end
• Note: Runlevel 1 is single user mode
• Action to take on ctrl-alt-del• To disable, comment out with #
Runlevel 5 is graphics mode using X
CIS 191 - Lesson 4
/etc/inittabpassword protection in single user mode
During GRUB boot, edit the kernel line and add "single" to boot into single user mode
Withouts0:S:wait:/sbin/sulogin
in/etc/inittab
Logged in as root without entering a password
Withs0:S:wait:/sbin/sulogin
in/etc/inittab
Must enter password to be logged in as root
CIS 191 - Lesson 4
runlevel commandshow previous and current runlevels
[root@rh9 root]# runlevelN 5[root@rh9 root]#
Previous runlevel (N=None)
Current runlevel
CIS 191 - Lesson 4
Important log filesdmesg command or /var/log/dmesg
File names specify action, order, and service:• S = Start, K=Kill• Two digit start/stop sequence order• Name of service(daemon) to start or kill
Symbolic links used to actual scripts in /etc/rc.d/int.d/
CIS 191 - Lesson 4
Red Hat Runlevel 3 - /etc/rc.d/rc3.d/S55sshd
This is the script that is run by the rc script to start and stop the ssh service
CIS 191 - Lesson 4
init commandChange runlevels now
CIS 191 - Lesson 4
show and customize runlevelsservice and chkconfig commands
[root@rh9 root]# service cups stopStopping cups: [ OK ][root@rh9 root]# service cups startStarting cups: [ OK ][root@rh9 root]# service cups restartStopping cups: [ OK ]Starting cups: [ OK ][root@rh9 root]# service cups statuscupsd (pid 1774) is running...[root@rh9 root]#
1. Find out what your current runlevel is.2. Start and stop the cups service.3. Configure cups service to not start for runlevel 34. Change from run level 5 to runlevel 25. Check cups service (hint: service cups status)6. Change from 2 to 37. Check cups service8. Reconfigure cups service back to original setting for
runlevel 3 and start the service manually.
Note: If you mouse starts acting "weird" in your VM after changing runlevles, then restart the gpm service:
service gpm restart
CIS 191 - Lesson 4
Shutting downthe system
CIS 191 - Lesson 4
Shutting down the system
Shutting down: • Users log out• Services halt• Data is saved• File systems are unmounted• System powers off
Types of shutdowns:• init 0 – no user warning• shutdown [-hcr] time – warns users before shutting down• halt and reboot – shortcuts for shutdown• Ctrl-Alt-Del – shutdown behavior can be disabled
CIS 191 - Lesson 4
shutdown commandSchedule for a time in the future
CIS 191 - Lesson 4
shutdown commandCancelling a pending shutdown
CIS 191 - Lesson 4
halt commandshortcut to shutdown
CIS 191 - Lesson 4
Startup and Shutdownwalk-through
CIS 191 - Lesson 4
/etc/inittabRed Hat 9 – Page 1
[root@rh9 root]# cat /etc/inittab## inittab This file describes how the INIT process should set up# the system in a certain run-level.## Author: Miquel van Smoorenburg, <[email protected]># Modified for RHS Linux by Marc Ewing and Donnie Barnes#
# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)#id:5:initdefault:
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
# Trap CTRL-ALT-DELETEca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes# of power left. Schedule a shutdown for 2 minutes from now.# This does, of course, assume you have powerd installed and your# UPS connected and working correctly.pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels1:2345:respawn:/sbin/mingetty tty12:2345:respawn:/sbin/mingetty tty23:2345:respawn:/sbin/mingetty tty34:2345:respawn:/sbin/mingetty tty45:2345:respawn:/sbin/mingetty tty56:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5x:5:respawn:/etc/X11/prefdm -nodaemon[root@rh9 root]#
CIS 191 - Lesson 4
Red Hat 9 Starting UpGRUB boot code runs
[root@rh9 root]# cat /boot/grub/grub.conf# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE: You have a /boot partition. This means that# all kernel and initrd paths are relative to /boot/, eg.# root (hd0,0)# kernel /vmlinuz-version ro root=/dev/sda2# initrd /initrd-version.img#boot=/dev/sdadefault=0timeout=10splashimage=(hd0,0)/grub/splash.xpm.gztitle Red Hat Linux (2.4.20-6) root (hd0,0) kernel /vmlinuz-2.4.20-6 ro root=LABEL=/ initrd /initrd-2.4.20-6.img[root@rh9 root]#
CIS 191 - Lesson 4
Red Hat 9 Starting UpGRUB boot code uncompresses kernel
CIS 191 - Lesson 4
Red Hat 9 Starting Upkernel starts up – screen capture and dmesg
Checking 'hlt' instruction... OK.POSIX conformance testing by UNIFIXmtrr: v1.40 (20010327) Richard Gooch ([email protected])mtrr: detected mtrr type: IntelPCI: PCI BIOS revision 2.10 entry at 0xfd8a0, last bus=1PCI: Using configuration type 1PCI: Probing PCI hardwarePCI: Using IRQ router PIIX [8086/7110] at 00:07.0Limiting direct PCI/PCI transfers.isapnp: Scanning for PnP cards...
Red Hat 9 Starting Upkernel starts up – dmesg
CIS 191 - Lesson 4
dmesg output (snipped)
isapnp: Scanning for PnP cards...isapnp: No Plug & Play device foundLinux NET4.0 for Linux 2.4Based upon Swansea University Computer Society NET3.039Initializing RT netlink socketapm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)Starting kswapdVFS: Disk quotas vdquot_6.5.1pty: 2048 Unix98 ptys configuredSerial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabledttyS0 at 0x03f8 (irq = 4) is a 16550AttyS1 at 0x02f8 (irq = 3) is a 16550A
Red Hat 9 Starting Upkernel starts up – screen capture and dmesg
CIS 191 - Lesson 4
Red Hat 9 Starting Upkernel starts up – screen capture and dmesg
ttyS1 at 0x02f8 (irq = 3) is a 16550AReal Time Clock Driver v1.10eFloppy drive(s): fd0 is 1.44MFDC 0 is a post-1991 82077NET4: Frame Diverter 0.46RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizeUniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xxPIIX4: IDE controller at PCI slot 00:07.1PIIX4: chipset revision 1PIIX4: not 100% native mode: will probe irqs later ide1: BM-DMA at 0x1408-0x140f, BIOS settings: hdc:DMA, hdd:piohdc: VMware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM driveide1 at 0x170-0x177,0x376 on irq 15ide-floppy driver 0.99.newideide-floppy driver 0.99.newidemd: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27md: Autodetecting RAID arrays.md: autorun ...md: ... autorun DONE.NET4: Linux TCP/IP 1.0 for NET4.0IP Protocols: ICMP, UDP, TCP, IGMPIP: routing cache hash table of 2048 buckets, 16KbytesTCP: Hash tables configured (established 16384 bind 32768)Linux IP multicast router 0.06 plus PIM-SMNET4: Unix domain sockets 1.0/SMP for Linux NET4.0.RAMDISK: Compressed image found at block 0Freeing initrd memory: 248k freed
CIS 191 - Lesson 4
Red Hat 9 Starting Upkernel starts up – screen capture and dmesg
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
init program starts
/etc/rc.d/rc.sysinit
init checks file system
allows for interactive startup
CIS 191 - Lesson 4
Red Hat 9 Starting Upinit runs – /etc/rc.d/rc.sysinit and /etc/rc.d/rc scripts
/etc/rc.d/rc.sysinit
/etc/rc.d/rc 5
Snippet from /etc/inittab
l5:5:wait:/etc/rc.d/rc 5
From /etc/inittab
# System initialization.si::sysinit:/etc/rc.d/rc.sysinit
init checks file system
allows for interactive startup
CIS 191 - Lesson 4
Red Hat 9 Starting Upinit - starting /etc/rc.d/rc 5
Snippet from /etc/rc.d/rc:
# See if we want to be in user confirmation modeif [ "$previous" = "N" ]; then if [ -f /var/run/confirm ] \ || grep -i confirm /proc/cmdline >/dev/null ; then rm -f /var/run/confirm CONFIRM=yes export CONFIRM echo $"Entering interactive startup" else echo $"Entering non-interactive startup" fifi
Red Hat 9 Rebootinginit – stopping services in /etc/rc.d/rc 6
K05K05K10K10K15
K92
K87K88K88K90K90
K80
K60K50
K30K25
K74
S00
Snippet from /etc/inittab
l6:6:wait:/etc/rc.d/rc 6
S01
CIS 191 - Lesson 4
OpenSUSEinittab
CIS 191 - Lesson 4
/etc/inittabopenSUSE 11 – Page 1 of 4
opensuse11:~ # cat /etc/inittab## /etc/inittab## Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany. All rights reserved.## Author: Florian La Roche, 1996# Please send feedback to http://www.suse.de/feedback## This is the main configuration file of /sbin/init, which# is executed by the kernel on startup. It describes what# scripts are used for the different run-levels.## All scripts for runlevel changes are in /etc/init.d/.## This file may be modified by SuSEconfig unless CHECK_INITTAB# in /etc/sysconfig/suseconfig is set to "no"#
# The default runlevel is defined hereid:5:initdefault:
# First script to be executed, if not booting in emergency (-b) modesi::bootwait:/etc/init.d/boot
CIS 191 - Lesson 4
/etc/inittabopenSUSE 11 – Page 2 of 4
# /etc/init.d/rc takes care of runlevel handling## runlevel 0 is System halt (Do not use this for initdefault!)# runlevel 1 is Single user mode# runlevel 2 is Local multiuser without remote network (e.g. NFS)# runlevel 3 is Full multiuser with network# runlevel 4 is Not used# runlevel 5 is Full multiuser with network and xdm# runlevel 6 is System reboot (Do not use this for initdefault!)#l0:0:wait:/etc/init.d/rc 0l1:1:wait:/etc/init.d/rc 1l2:2:wait:/etc/init.d/rc 2l3:3:wait:/etc/init.d/rc 3#l4:4:wait:/etc/init.d/rc 4l5:5:wait:/etc/init.d/rc 5l6:6:wait:/etc/init.d/rc 6
# what to do in single-user models:S:wait:/etc/init.d/rc S~~:S:respawn:/sbin/sulogin
# what to do when CTRL-ALT-DEL is pressedca::ctrlaltdel:/sbin/shutdown -r -t 4 now
CIS 191 - Lesson 4
/etc/inittabopenSUSE 11 – Page 3 of 4
# special keyboard request (Alt-UpArrow)# look into the kbd-0.90 docs for thiskb::kbrequest:/bin/echo "Keyboard Request -- edit /etc/inittab to let this work."
# what to do when power fails/returnspf::powerwait:/etc/init.d/powerfail startpn::powerfailnow:/etc/init.d/powerfail now#pn::powerfail:/etc/init.d/powerfail nowpo::powerokwait:/etc/init.d/powerfail stop
# for ARGO UPSsh:12345:powerfail:/sbin/shutdown -h now THE POWER IS FAILING
# getty-programs for the normal runlevels# <id>:<runlevels>:<action>:<process># The "id" field MUST be the same as the last# characters of the device (after "tty").1:2345:respawn:/sbin/mingetty --noclear tty12:2345:respawn:/sbin/mingetty tty23:2345:respawn:/sbin/mingetty tty34:2345:respawn:/sbin/mingetty tty45:2345:respawn:/sbin/mingetty tty56:2345:respawn:/sbin/mingetty tty6##S0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt102#cons:12345:respawn:/sbin/smart_agetty -L 38400 console
CIS 191 - Lesson 4
/etc/inittabopenSUSE 11 – Page 4 of 4
## Note: Do not use tty7 in runlevel 3, this virtual line# is occupied by the programm xdm.#
# This is for the package xdmsc, after installing and# and configuration you should remove the comment character# from the following line:#7:3:respawn:+/etc/init.d/rx tty7
• Users log out• Services halt• Data is saved• File systems are unmounted• System powers off
Example of shutdowns:• init 0 – shuts down with no user notification• init 6 – reboots with no user notification• shutdown +5 Everyone off fast! – notifies users
with custom message and shuts down to single user mode
• halt – stops everything so power switch can be turned off manually
• reboot – reboots the computers• Ctrl-Alt-Del – shutdown behavior can be
customized in /etc/inittab
CIS 191 - Lesson 4
Shutting the System Down
CIS 191 - Lesson 4
Canceling shutdown
CIS 191 - Lesson 4
Example shutdown
CIS 191 - Lesson 4
Example shutdown
CIS 191 - Lesson 4
Example shutdown
CIS 191 - Lesson 4
Example shutdown
Now enter halt command
CIS 191 - Lesson 4
Example halt after shutdown
Power switch can be turned off now manually
CIS 191 - Lesson 4
Science ExperimentFrom runlevel 5, logged in as roothalt shutdown +1 bye
broadcastservices stoppedsingle user modemanual poweroff to end
broadcastservices stoppedpowered off
broadcastservices stoppedpowered off
no broadcastservices stoppedpowered off
openSUSE 11
broadcastsplash-escservices stoppedpowered off
broadcastTERM > PS'esSingle user modemanual poweroff to end
broadcastsplash-escservices stoppedpowered off
broadcastsplash-escservices stoppedpowered off
no broadcastsplash-escservices stoppedpowered off
FC9 broadcastpowered off
broadcastsingle user modemanual poweroff to end
broadcastpowered off
broadcastpowered off
no broadcastpowered off
Ubuntu 8.04
broadcastsplash screenpowered off
broadcaststopping servicesrecovery menusingle user modemanual poweroff to end
broadcastsplash screenpowered off
broadcastsplash screenpowered off
no broadcastsplash screenpowered off
CIS 191 - Lesson 4
New Commands
and files
CIS 191 - Lesson 4
New commands:chkconfig - show and manage services (daemons)cntl-alt-del - can be configured for shutdowndmesg - shows kernel messageshalt - shortcut to shutdowninit - change runlevelsreboot - shortcut to shutdownrunlevel - show previous and current runlevelservice - for starting and stopping services (daemons)shutdown - graceful system shutdown
New Files and Directories:/etc/inittab - instructions for init program/etc/rc.d/ - red hat runlevel directories/sbin/init - primordial init program/var/log/dmesg - kernel bootup messages (rh9, ubuntu)/var/log/boot.log - service startup and shutdown messages (rh9)/var/log/boot.msg - all bootup messages (openSUSE 11)
VMware:tbd - tbd
CIS 191 – Lesson 4
Next Class
Assignment: Check Calendar Page on web site to see what is due next week.
Quiz questions for next class:
•On Red Hat systems, what command is used to manage services by runlevel (show and configure services to stop or start)?
• How can you view kernel startup messages?
• What does the line id:5:initdefault: do in /etc/inittab?
CIS 191 – Lesson 4
Backup
CIS 191 - Lesson 4
See this bug at https://bugs.launchpad.net/upstart/+bug/98955
Ubuntu 8.04ubuntu bootlogd is broken – no /var/log/boot messages
This work-around did not work
CIS 191 - Lesson 4
Red Hat 9 boot & rootsi::sysinit:/etc/rc.d/rc.sysinit