Lecture 4/3/2008
Linux (Debian) Bootup and Login Sequence
1. BIOS boot-ups; checks peripherals; finds bootable device.
2. First sector loaded into RAM and executed-- (LILO, GRUB, NT loader): prompt appears.
3. Kernel loaded from sector list, /boot/vmlinuz-2.6.x-xx;
places the appropriate initial RAM disk image, initrd, into RAM.
4. Kernel executed; unpacks.
5. Kernel initializes hardware.
6. Kernel mounts root, /, file system, say /dev/hda1.
7. Kernel executes /sbin/init as PID 1.
8. init executes /etc/init.d/rcS script, which
runs the scripts in directory /etc/rcS.d to
set environment path,
start swap, check the file systems, and so on;
then init executes all scripts for default run level,
defined in /etc/inittab.
9. init spawns getty programs on each terminal.
10. getty prompts for login.
11. getty executes /bin/login to authentic user.
12. login requests a password and validates it against /etc/passwd, or NIS maps, or LDAP (depending on PAM settings).
13. login prints the message from /etc/motd.
14. login starts a shell.
15. The shell executes the appropriate startup files
(.profile for sh, ksh; .bash_profile for BASH;
.cshrc and .login for csh and tcsh).
16. The shell prints a prompt and waits for input.