What goes up must come down.
●Startup
andshutdown

Shutdown yourLINUX.

●New file systems.

●umount●

Application cleanup.

●

disconnect fromremote hosts.

The really real world.

Philosophy●●You can't press theundo button if anelephat knocks down
your house, or eats
your crop!
You can't create a
new elephant bycalling the copy
constructor!

Philosophy●●●

Human beings do notcreate objects; they
represent them ormold them.
Computers are used
to represent objects.
In elephantmanagement
software, there are noelephants in thecomputer.

Philosophy●

In designing, running,or debugging
software, you must
make a distinction
between an object
and therepresentationof an object!
●

A program may
represent an object.

Application caching●note to self
updatereality later●●

Applications “cache”
to postpone updating
their representationsof reality.
They write “postit”
notes to themselves
reminding themselves to do it later!
A system crash
causes these notes tobe lost!

Startup RunLevels●

0 system halt●

1 Single user mode●

●RunLevels

2 multiuser, no net,no gui
3 muliuser with net,no gui●

4 not used●

5 multiuser with gui●6 rebootRun levels on startup

Add number to command line on startup to bootwith reduced functionality, to avoid crashes other,problems!

What is INITRD?
●kernel
INITRD

Modular Kernels – nobuilt in drivers!

●

LINUX bootloaders●

GRUB, LILO●

use BIOS to boot●How do I bring up
LINUX, if I do notknow how to read thehard disk?

Initrd

Initrd allows Linux to have a temporary virtual“disk” during booting. On this disk are the drivers
necessary to start LINUX (and do other things).
Initrd's are basically the same, but the software tocreate them is distro dependent. Usually calledmkinitrd.

Yast example

sysconfig parameterOther distros are different!

Red Hat has a different way of specifying which
modules are to be included in INITRD. READ
YOUR DOCUMENTATION. Luckly, most users
don't have to mess with this stuff. It is all figuredout by your point and clicky installation installer
thingy!

/boot partition●●Bootloader uses
BIOS to read inkernel, INITRD!
Therefore, kernel,
INITRD must be in a/bootpartition readable by10 meg

the BIOS!
●

So put it in /boot●overcome bios limits!

Large Disk Howto disk limits
http://www.tldp.org/HOWTO/Large-Disk-HOWTO-4.html●●

ATA Specification (forIDE disks) - the 137
GB limit
BIOS Int 13 - the 8.5
GB limit●

8.4 GB limit●

4.2 GB limit●

7.9 GB limit●

8.4 GB limit●

528 MB limit●

33.8 GB limit●

2.1 GB limit●

137 GB limit●

3.2 GB limit●

2 TiB limit●

7.9 GB limit

Init Scripts●●●

Init Scripts●

located in /etc/init.d/control what happens
at startup, shutdowntime.
LINUX STANDARD
BASE defines
Really controled bylinks in/etc/init.d/rc?.d (don'ttouch)Install / Uninstall Init scripts●

Use insserv to install.

●

Use insserv -r to remove●/usr/lib/lsb/install_initd●/usr/lib/lsb/remove_initd

These programs really manipulate the links in /etc/init.d/rc.?d.
Every time they run they recompute these links. Take a run levelparameter so you can control what happens at various run levels.
These scripts can be run manually:#cd /etc/init.d#./sendmail restart#restarts sendmail!

System Services (runlevel)

Control scripts for runlevels

Other Distributions are different

Write your own init scripts
●
●

●

●

In BashStart with/etc/init.d/skeleton
Read all the
documentation first.
define start, stop,
maybe restart.

●

Control script
execution order with●

# Provides:●# Required-Start:●# Required-Stop:

Start/Kill Daemons●startproc●killproc●

start_daemon●

to kill daemons.

●

to start daemons.