Linux Bootup and Login Sequence

1. BIOS boot-ups; checks peripherals; finds bootable device.

2. First sector loaded into RAM and executed-- GRUB 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/sda1.

7. Kernel executes Upstart /sbin/init as PID 1.

8. The Upstart init executes tasks in directory /etc/event.d for event startup, specifically, /etc/event.d/rcS, then /etc/event.d/rc-default for default run level. These tasks, rcS and rc-default, launch the System V counterpart scripts in directory /etc/init.d.

9. The System V /etc/init.d/rcS runs the scripts in directory /etc/rcS.d to set environment path, start swap, check the file systems, and so on; then /etc/init.d/rc executes all scripts for default run level, defined in /etc/inittab.

10. init spawns getty programs on each terminal.

11. getty prompts for login.

12. getty executes /bin/login to authentic user.

13. login requests a password and validates it against /etc/passwd, or NIS maps, or LDAP (depending on PAM settings).

14. login prints the message from /etc/motd.

15. login starts a shell.

16. The shell executes the appropriate startup files (.profile for sh, ksh; .bash_profile for BASH; .cshrc and .login for csh and tcsh).

17. The shell prints a prompt and waits for input.