Linux kernel compilation and system cut (sysctl kernel module Management screen generation INITRD

Source: Internet
Author: User

Linux Components :

Core/boot/vmlinuz-version

Kernel module:/lib/modules/version

Kernel design:

Single Core

Modular design

Micro-core

Load Module Command :

Insmod

Modprobe


Pseudo File System:

/proc

/proc/sys: Many of the files in this directory are readable and writable

/sys

Some files can be written


To set kernel parameter values:

1. Echo VALUE >/proc/sys/to/somefile (restart will fail)

2, sysctl-w Kernel.hostname= "hostname" (restart will expire)

3,/etc/sysctl.conf (permanent), but use the sysctl-p command to make it effective immediately

SYSCTL-A: Show all system parameter values

Kernel module Management

Lsmod: Viewing system modules

Modprobe mod_name: Loading module

Modprobe-r mod_name: Uninstalling a module

Modinfo mod_name: View specific information about the module

Insmod/path/to/modules_file: Load Module

Rmmod mod_name: Removing modules

Depmod/path/to/modiles_dir: Generating a dependency on a module


Functions in the kernel, in addition to the core functions, at compile time, most of the features have three options:

1. Do not use this function

2. Compile into kernel module

3. Compile into kernel


How to manually compile the kernel:

Make Gconfig:gnome desktop environment use (need to install the Graphics Development Library Environment Group: GNOME Software development)

Make KCONFIG:KDE desktop environment (need to install graphical development Library environment)

Make Menuconfig

Make Modules_install

Make install

Two compile-time cleanup, and if necessary, back up the configuration file. config:

Make clean: Cleans up previously compiled binary modules

Make Mrproper: Clean up the remaining work of the compilation, including the. config


Screen command:

Screen-ls: Display the established screen

Screen: Open a new display directly

Screen-r ID: Restore a screen

Ctrl+a,d: Removing a screen

Generate INITRD or Initramfs

rhel5\6:mkinitrd,mkinitrd/boot/initrd-' uname-r ' uname-r '

MKINITRD initrd file path kernel version number

Rhel6:dracut

Linux kernel compilation and system cut (sysctl kernel module Management screen generation INITRD

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