Linux Basics-Attachment 1 Linux system startup process

Source: Internet
Author: User

Attachment 1 Linux system startup process

The initial stage
When we turn on the computer, the computer automatically reads the stored program from the BIOS of the motherboard (Basic input/output System). This procedure usually knows some hardware directly connected to the motherboard (hard disk, network interface, keyboard, serial port, and port). Most of the BIOS now allows you to start your computer by selecting one from a floppy disk, CD-ROM, or hard disk.
Next, the computer will read the starting bytes from the storage device of your choice (for example, CD-ROM is bytes, if we start from the CD-ROM). This bytes is called the Master Boot record MBR (Master boot recording). The MBR tells the computer to load the boot loader (boot loader) from one of the devices ' partitions (partition). Boot Loader stores information about the operating system (OS), such as the name of the operating system, the location of the operating system kernel (kernel), and so on. The usual boot loader are grub and Lilo.
The boot loader will then help us load the kernel. Kernel is actually a program to operate the computer, it is the kernel of the computer operating system, the main task is to manage the computer's hardware resources, as a software and hardware interface. Any operation on the operating system is communicated to the hardware via kernel. Windows and Linux each have their own kernel. The narrow-sense operating system refers to the kernel, generalized operating system including kernel and kernel above the various applications.
(Linus Torvalds is not so much the father of Linux as the father of Linux kernel.) He is still responsible for the development and maintenance of Linux kernel. As for Ubuntu, Red Hat, which is based on the same kernel, includes a more complete version of the operating system for different applications and interfaces. )
In fact, we can install boot loader on multiple partitions, each boot loader corresponds to a different operating system, and select the boot loader we want to boot when we read the MBR. This is the principle of multiple operating systems.
Summary: BIOS, MBR, boot loader, kernel
Kernel
If we load a Linux kernel,linux kernel start working. Kernel first reserves the memory space it needs to run, and then detects the computer hardware through the driver (driver). This allows the operating system to know what hardware is available. The kernel will then start an init process. It is a 1th process in a Linux system (Linux does not have a process number No. 0). In this, kernel completed the computer start-up phase of the work, the handover to Init to manage.
Summary: Init process kernel
Init process
(depending on the boot loader option, Linux can now enter single user mode.) In this mode, the initial script has not been executed and we can detect and fix possible errors on the computer.
Init then runs a series of initial scripts (startup scripts), which are common shell scripts in Linux. These scripts perform the following functions:
Set the computer name, time zone, detect the file system, mount the hard disk, empty the temporary files, set up the network ...
When these initial scripts, the operating system is fully ready, just, no one can log in!!! Init will give you a login dialog, or a graphical login interface.

Enter the user name (e.g. Vamei) and password, done!
In the following procedure, you will operate the computer as a user Vamei. In addition, depending on your settings when you create a user, Linux will also put you in a group, such as a stupid group, or a Vamei group.
So you will be a user Vamei and a member of the Vamei group. (Note that group Vamei and user Vamei only have the same name, so you can call Dell, as well as Dell's boss.) You can also be a user Vamei, as well as a member of the stupid Group)
Summarize
BIOS, MBR, boot loader, kernel, init process, login
User, Group

Linux Basics-Attachment 1 Linux system startup process

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.