Linux system startup process and kernel compilation (2)

Source: Internet
Author: User
Tags gtk

Linux system startup process and kernel compilation (2)

1. Kernel design: A single core and micro-core points

Linux is a single core modular design

System Kernel Core path:/boot/vmlinuz-version number

Kernel module Path:/lib/modules/version number/

Linux is divided into kernel space and user space

While user space accesses and monitors the kernel: paths in/proc/and/sys/two pseudo-file systems

2. pseudo file system/proc/sys and/sys/files in some directories are readable or writable

To set kernel parameter values:

2.1. Can take effect immediately, but reboot system setting is invalid

2.1.1.echo Values >/proc/sys/to/somefile


3. Can be permanently active by modifying the/etc/sysctl.conf configuration file

However, the following command will take effect immediately:

Sysctl-p let the kernel reload the/etc/sysctl.conf configuration file

SYSCTL-A: Show all kernel parameters and their values

4. Kernel Module Management:

Lsmod: View

Modprobe Module Name: Loading a module

MODPROBE-R Module Name: Uninstalling a module

Modinfo Module Name: View specific information about the module

Insmod module path name. KO: Loading module

RMMOD Module Name: Uninstalling a module

DEPMOD Module Catalog: Analyzing the dependencies of loading modules

5. Manually compile the kernel:

Install "Development Tools" and "Development Libraries" and "Server Platform development" in advance

5.1: Select or cancel the specified module

Make Gconfig:gnome desktop environment, need to install the Graphics Development Library Group: GNOME Software Development

Main package Confirm Installation: GTK + gtk-devel Libglade2-devel

Make KCONFIG:KDE desktop environment, need to install the Graphics Development Library Group; KDE Software Development

Make Xconfig:gnome Desktop environment use

Main package Confirm installation: QT Qt-devel

Make Menuconfig: Use in a text environment

Main package Confirm installation: Ncusres Ncurse-devel

5.2: Compiling


make modules (optional)

5.3: Copy the compiled module to the specified directory and file or modify the file

Make Modules_install copy module to/lib/modules/directory

Make install copy boot system kernel and image files, etc. (including edit grub.conf file)

5.4. If the compilation error or want to compile two times

To clean up but before cleaning, back up the configuration file if necessary. config:

Make clean deletes most compiled files, but does not delete the. config file

Make mrproper Delete all compiled files, including the. config file

5.5: Make initrd-xxx-xxx.img system image file

MKINITRD initrd file path kernel version number

mkinitrd/boot/initrd-' uname-r '. img ' uname-r '

dracut/boot/initrd-' uname-r '. img ' uname-r ' (redhat6 new tool)

6.screen command:

Screen: Open a new display directly

CTRL + A, D: removing the screen

Screen-ls: Displays the established screen and ID number

Screen-r ID Number: Restores the specified screen

Exit: Exit

This article is from the "Xavier Willow" blog, please be sure to keep this source

Linux system startup process and kernel compilation (2)

Related Article

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: 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.