To learn Linux commands, we need to understand how the Linux system works, here we first understand how Linux on a computer to start loading!!
Linux system Boot Process
The first step, BIOS initialization
1. The BIOS detects all external devices to see what peripherals are in the active area
2. Start looking for boot disk--Follow the BIOS settings to find the location where the boot file is stored
Second step, execute boot loader
1. First to MBR (Master boot record) disk to find the boot file, for example: Grub/lilo
2. Go to boot partition (boot partition) to find the boot file-for example: Grub/lilo
3. Boot loader, load boot file (find active partition through partition table, and read the active partition loader to run in memory)
Step three, load the kernel
Pass kernel boot parameterization to kernel, such as run level parameter 3-support network, but support only command line 5--support network, and support graphical interface
(the loader reads the Linux kernel image from the partition on which the/boot/resides, based on the information set in the/boot/grub.conf configuration file, and then the kernel
The image is loaded into memory and given control to the Linux kernel)
Fourth step, kernel acquisition
1. After the right of control
1.1 Detecting hardware
1.2 Unzip and install the necessary drivers
1.3 Initializing file system-related virtual devices
1.4 Mount the root file system, mount the root directory below
After 1.5 or more 4 steps to complete Linux in the process space to load the INIT program-init gain Control
2. Start init and initialize the service
2.1 Execute/etc/rc.d/rc.sysinit Script file-----Initialize environment variables, network configuration, start swap, check and Mount file system
2.2 Execute RC File-----rc file defines the corresponding initialization configuration for different runlevel
3.3 Execute rc.local file----for different users, initialize the personality configuration
4.4 Setting up the use environment
All initialization is done, this is the login with username and password
Summarize
BIOS initialization---> Find and Execute loader---> Load boot kernel and perform kernel initialization (mostly root file mount, driver install)---> Start init service (Initialize system public configuration)---> Initialize user's personal configuration---> Start the desktop
Linux system start-up detailed