Linux Adm 3
Linux Adm 3
Unit 2
Startup and Shutdown
Lilo core LILO 2nd stage - can localize generates /boot/map and
"/boot/boot.b" vmlinuz, initrd and load them writes its address into LILO
(CHS) boot sector
addresses stage1_5
Stage 1 (CHS)
Configuration:
/boot/grub/menu.lst
loads for example
Stage 2 (hd0,3)/vmlinuz or Windows
via "chainloading"
#boot=/dev/hda
default=0
timeout=5
title Fedora Core (2.6.15-1.1955_FC5)
root (hd0,0)
kernel /vmlinuz-2.6.15-1.1955_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb
quiet
initrd /initrd-2.6.15-1.1955_FC5.img
default=0
timeout=8
title SUSE SLES 10
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hda7 selinux=0 resume=/dev/hda6
splash=silent showopts
initrd /boot/initrd
linuxrc
no initrd Kernel
modules
Note: Once the system has started, you can switch runlevels
with init runlevel or telinit runlevel
© Copyright IBM Corporation 2006
/etc/inittab (RHEL/Fedora/SLES)
RHEL, Fedora SLES
The default runlevel is 3
# Default runlevel # Default runlevel
id:3:initdefault:
id:3:initdefault:
Always run
# System initialization. /etc/rc.d/rc.sysinit (RHEL)
si::sysinit:/etc/rc.d/rc.sysinit # System initialization.
si::bootwait:/etc/init.d/boot
or /etc/init.d/boot (SUSE)
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2 l0:0:wait:/etc/init.d/rc 0
l3:3:wait:/etc/rc.d/rc 3 l1:1:wait:/etc/init.d/rc 1
Run /etc/rc.d/rc (RHEL) or
l4:4:wait:/etc/rc.d/rc
l5:5:wait:/etc/rc.d/rc
4
5
l2:2:wait:/etc/init.d/rc 2 /etc/init.d/rc (SUSE) with
l6:6:wait:/etc/rc.d/rc 6 l3:3:wait:/etc/init.d/rc 3 the runlevel as
#l4:4:wait:/etc/init.d/rc 4
# Trap CTRL-ALT-DELETE l5:5:wait:/etc/init.d/rc 5 parameter
ca::ctrlaltdel:/sbin/shutdown -t3 -r l6:6:wait:/etc/init.d/rc 6
now
# Run gettys in standard runlevels # Trap CTRL-ALT-DELETE
1:2345:respawn:/sbin/mingetty tty1 ca::ctrlaltdel:/sbin/shutdown -r -
Trap the three-finger salute
2:2345:respawn:/sbin/mingetty tty2 t4 now CTRL-ALT-DELETE
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
# Run gettys in standard runlevels Allow users to log in on six
1:2345:respawn:/sbin/mingetty --
# Run xdm in runlevel 5
noclear tty1 virtual consoles (Virtual
x:5:respawn:/etc/X11/prefdm - 2:2345:respawn:/sbin/mingetty tty2 consoles can be
nodaemon 3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4 activated with Alt-F1
5:2345:respawn:/sbin/mingetty tty5 through Alt-F6)
6:2345:respawn:/sbin/mingetty tty6
/etc/rc.d/rc3.d/K* stop
/etc/inittab
/etc/rc.d/rc3.d/S* start
# ls -l /etc/rc.d/rc3.d
lrwxrwxrwx 1 root root 24 Mar 15 10:47 K02NetworkManager ->
../init.d/NetworkManager
lrwxrwxrwx 1 root root 14 Mar 15 11:45 K05innd -> ../init.d/innd
lrwxrwxrwx 1 root root 19 Mar 15 10:45 K05saslauthd -> ../init.d/saslauthd
. . .
lrwxrwxrwx 1 root root 15 Mar 15 10:48 K15httpd -> ../init.d/httpd
lrwxrwxrwx 1 root root 15 Mar 15 11:45 K16rarpd -> ../init.d/rarpd
. . .
# chkconfig --list
...
acpid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
atd 0:off 1:off 2:on 3:on 4:off 5:on 6:off
...
# chkconfig acpid on
# chkconfig --list
...
acpid 0:off 1:off 2:on 3:on 4:off 5:on 6:off
atd 0:off 1:off 2:on 3:on 4:off 5:on 6:off
...