The process of the Linux kernel being loaded

Source: Internet
Author: User

Second, the process of the Linux kernel being loaded

One, the Linux installation encountered the concept of resolution

The kernel must be module Vmlinz (around 5M) do not know the hard disk, originally need to write with the same content in loader, to load unnecessary modules.

Kernel non-essential functions are compiled into modules placed in/lib/modules (143M).

The action now is to load the initial RAM Disk ==INITRD into memory while the loader loads the kernel.

INITRD is generally named/BOOT/INITRD (14M) and its role is to mount the memory of the virtual file system,

Kernel loads drivers such as hard drives based on the virtual file system, mounts the root directory, and finally completes the loading of its function modules.

At this point the kernel is all loaded into memory and resides in memory.

The first process called by the kernel is sbin/init: Finish preparing the software execution environment, including the system hostname, network settings, file system format, RunLevel, and so on. This content is configured by Etc/inittab

The processing flow set by init according to Inittab will be:

1. First obtain the relevant level of runlevel, that is, obituary execution level (for the test machine, for example, number 5th);

2. Using/etc/rc.d/rc.sysinit for system initialization

3. Since RunLevel is 5, only "L5:5:WAIT:/ETC/RC.D/RC 5" is carried out, other rows are skipped

4. Set up [Ctrl]+[alt]+[del] This group of key combination function

5. Set the PF, PR two mechanism of the continuous electric system;

6. Start the Mingetty six terminals (tty1 ~ tty6)

7. Finally start the graphics interface with/etc/x11/perfdm-nodaemon!

The second step of using/etc/rc.d/rc.sysinit for system initialization is:

1. Get the network environment not host type:

Read the network configuration file/etc/sysconfig/network, get the host name and the default gateway (gateways) and other network ring

Border.

2. Test and mount the memory device/proc and USB device/sys:

In addition to the Mount memory device/proc remainders, it will also be active to detect whether the system has a USB device, if any, the main load

USB drive program, shipowner hideaway try to mount the USB file system.

3. Decide whether to start SELinux:

In the 17th chapter we talked about the SELinux at this time import line some detection, shipowner hideaway detect whether it is necessary to help all the files re-compiled

Write the standard SELinux type (auto Relabel).

4. Start the system random number generator

The random number generator can help the inferior system import the function of some cryptographic calculus, where it is necessary to start two random number generators.

5. Set the terminal (console) Glyph:

6. Display the Welcome screen (text banner) during boot-up.

7. Set system time (clock) time zone settings: Read in the/etc/sysconfig/clock setting value

8. Detection of Plug and Play (PnP) Parameters ou the interface is not tested:

Start Import line IDE/SCSI/network/sound effects based on core detection results at boot time (/proc/sys/kernel/modprobe)

and other interface ou detection, and the use of the core module to load the import line PnP device parameter testing.

9. Loading of user-defined modules

The user can add a custom module to the/etc/sysconfig/modules/*.modules, which is then loaded into the system

Of

10. Load the relevant settings for the core:

The system will be the main to read the/etc/sysctl.conf this file setting value, so that the core function as we want to look.

11. Set hostname uninitialized power management module (ACPI)

12. Initialize the software disk array: mainly through the/etc/mdadm.conf to set up the good.

13. Initializing the file system functions of LVM

14. Check disk File system with fsck: Import line filesystem check

15. Conversion of import line disk quota quota (not necessary):

16. Re-mount the system disk in rewritable mode interactive:

17. Start the quota function: So we don't need custom Quotaon.

18. Start the system virtual random number generator (pseudo-random):

19. Clear the temporary files during the boot process:

20. Load the boot-related information into the/VAR/LOG/DMESG file.

A few simple settings after the first boot

Terminal start shortcut key Ctrl+alt +t

Set Root password

Su-root

sudo passwd root

Allow Root Login

Gksu/usr/sbin/gdmsetup

Set source

sudo gedit/etc/apt/sources.list

sudo apt-get update (only updates the package list and does not update the software)

Ctrl+alt +f1 each login terminal

Ctrl+d = = Exit

    • This article is from: Linux Learning Network

The process of the Linux kernel being loaded

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.