Linux Startup Process

Source: Internet
Author: User

 

1. BIOS
Start

After the system is powered on, the computer starts from
CMOS
(
Complementary Metal Oxide semicondu
) Chip Loading
Bios
And detects basic information about the system hardware, such as memory, hard disk, and processor. Then
Bios
Search for available
System Boot Disk
If no, the system looks for the primary boot Area
MBR
(
Main Boot
Record
) And run the log in
MBR
. Usually this program is the operating system
Loader
Program (embedded system called
Bootloader
)
The main function is to indicate the system to be loaded and the loading method after the system is started. For example
MBR
Run on
Linux
Of
Loader
Program (
Grub
And
Lilo
), You can load
Linux
Kernel
.

Bios
It is called firmware. In a computer system,
Bios
The program is stored in the motherboard chip, and formatting the hard disk has no impact on this information. Besides using special tools to erase it, its content always exists.

2. Grub
Loading System

Grub
Is a system running
Loader
Program, usually, installed
Linux
After the operating system is started, the first program is
Grub
. This program is used to load the operating system kernel (if there are multiple operating systems, this program is used to choose to start multiple operating systems ).

In
Linux
In the operating system, the startup-related applications are located in
/Boot
Folder. Run
Grub
When the read application is
/Boot/GRUB/grub. Con
F
File, modify this file to set the boot wait time for loading the Operating System (after the wait time is exceeded, the system will start the default boot operating system), boot menu, default operating system and operating system kernel image file name and location.

3.
System Startup File

Load data in the system
Linux
After the kernel, the system runs the following kernel programs in sequence. The
1
Kernel files:
/Sbin/init
, This program will create the system
1
Processes, and use the process as the parent process of the application after the system, and then run
/Etc/rc. d/rc. sysinit
Initialize the system.
/Etc/inittab
Is the first
3
Important program. This program is mainly used to select the startup level and run different programs and commands at different startup levels.
/Etc/rcX. d
Folder. After the preceding content is executed, the system loads the user-specific information.

4.
Initialize User Files

(
1
)
/Etc/rc. d/rc. Local
Is a script file. After initialization, you can load the program to run when the system starts in this folder. Programs automatically started when the system starts can be added to this file, which is equivalent to a batch processing program at startup.

(
2
)
/Etc/profile
File. Read
/Etc/rc. d/rc. Local
The system will set the environment variable, which is the most important
Shell
Configuration file, which is the first File Detected by the system during user login. It mainly includes
Path
,
User
,
LOGNAME
,
Mail
,
Hostname
And so on

(
3
)
/Home/$ username/./bash_profile
File. Read complete
/Etc/profile
After the file, users will read their own unique files,
Root
When used outdoors, all users will read
/Home/$ username/. bash_profile
File and set its own environment variables.

Executive
You can log on to
Linux
Operating System
Unified
.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.