System and Network Administration
lecture
in color
Bootstrapping
- machines start their active lives not knowing much of ANYTHING.
- 'bootstrapping': a series of steps in which the computer successively
"becomes smarter" about its environment.
- Each step builds upon the previous one and allows the next one.
Initial state: knowing nothing
- has a binary I/O system (BIOS) in rom.
- has empty memory.
- BIOS knows how to access the 'boot block' of a disk.
Boot block
- 'first' block of a disk
- contains a 'bootstrap loader'
- loader is specific to operating system.
- present on selected hard disks AND floppy disks.
Overview of generic booting
- load loader
- loader loads kernel
- kernel starts everything
Bootstrap loader
- goal: "get smart enough" to load further blocks from disk.
- linux: LILO (LInux LOader)
- now we know how to locate root filesystem and the system
kernel /vmlinux (or /vmlinuz)
- load kernel /vmlinux into memory
Kernel
- goal: start up everything else
- locate and mount filesystems (/, /usr)
- check filesystems for errors.
- check which operating mode we should be in.
- start running scripts in /etc/rc* to turn on
services.
Building Linux: a bootstrap process
- Chicken and egg problem.
- You can't build linux if there's no linux on the system.
- But you can't get linux on the system until you build it.
- You can't run linux on the filesystems you're building.
Overview of building linux
- Base state: nothing
- run mini-linux from floppy
- mount fake ramdisks
- run install program from fake system
- build real disks
- reboot real disks
- perform post-installation configuration
Base state:
- no linux at all.
- Mr. Bill rules.
- BIOS supports floppy disk boot.
Step 1: run a mini-linux
- boot linux boot floppy.
- LILO loads.
- LILO loads "special" vmlinuz
Step 2: mini-linux dissociates itself from real local filesystems
- vmlinuz builds 'ramdisks': fake disks that live in memory.
- Pretends that these are real.
- Runs installation program from ramdisk.
Step 3: Installation program
- allows you to contact network where all linux files reside.
- partitions disks
- mounts real disks in temporary location (/mnt)
- copies software onto real disks from network.
- builds real bootblock on real disk!
Step 4: Post-installation
- reboot using REAL bootblock.
Step 5: LILO
- loads from real hard disk
- starts loading kernel
Step 6: First boot
- Kernel loads
- one-time scripts are run to configure system
- asks about network information
- asks about root password
- now up and running!
What if it doesn't work...
- or: what we did so you won't have to...
- First, hardware must be put together correctly.
- Everything has to agree in several ways
Booting woes
- BIOS: often the ONLY thing you can't change.
- non-volatile memory failure: backup battery needed.
Non-volatile memory
- Determines boot devices and trial order (try floppy)?
- Controls clock and can exhibit y2k problems.
- Setting: press F1 or F2 while booting.
- Possible problems: backup batteries are BAD.
BIOS limits:
- disk size (addressability of IDE disks)
- in PROM if machine > 5 years old.
- old limit: 512MB or even less.
- difficult to change if in PROM.
- limits whether one can load bootblock!
- Problem: 512MB limit, 900MB partition.
- Old Solution: don't use bootblock from disk!
- Use floppy disk to boot!
- Avoids bios limitations on hard disk.
- Another solution: 10 MB partition /boot at beginning of disk
- Create 10mb partition /boot
- Kernel is put there when building.
- even really old BIOS's can read it!
- MUCH BETTER than relying on floppies! Do this in A1!
BIOS extensions:
- some devices have their OWN ROM's that they add to lower memory.
- Example: SCSI cards.
- Must map card BIOS to unused memory using onboard 'jumpers'.
- If two devices use same memory, system becomes unbootable.
A typical computer
- BUS: a group of 'wires' shared by all component 'cards'
- ISA, PCI: two form factors for cards (spacing of contacts on connectors).
- Many computers have both.
Hardware Configuration
- physically plug in cards.
- Configure cards (using software and hardware)
Card Configuration options:
- IRQ: a number, between 1 and 15, that specifies an 'interrupt' channel.
- Memory range: a pair of hex addresses between 0x8000 and 0xffff where
read-only memory is created by plugging in the card.
- IO Port address: a hex address between 0x100? and 0x400? describing
where 'ports' for the card reside.
Card configuration rules:
- All cards (and the computer, usually on a motherboard) must have
non-conflicting and unique choices for IRQ, Memory, and Ports.
- If not, chaos ensues.
- Two kinds of cards: hard-jumper and software-configurable.
lecture
in color
/comp/150NET/notes/boot-old.php
downloaded on Nov-23-2009 04:18:51 PM,
was last modified on Feb-17-2004 10:47:05 PM.
All lecture note content is copyright 2004 by
Alva L. Couch,
Computer Science,
Tufts University