Build linux[kernel updates and data from scratch]

Source: Internet
Author: User

After understanding the content of the LFS, the kernel update is a glance http://www.cnblogs.com/2018/p/3979305.html http://www.cnblogs.com/2018/p/3981399.html

However, some of the information is not LFS, the following is a summary of the relevant information

Kernel update

Http://jingyan.baidu.com/article/08b6a591f187ff14a809228a.html

1, kernel version display command Uname-r (uname view operating system Information, r option to view kernel version)

2. Upgrade steps

L Download Kernel source package linux-2.6.38.8.tar.bz2

L root directory to build a directory Cd/mkdir linux-2.6.38.8

L Copy the source code into the directory CP linux-2.6.38.8.tar.bz2 linux-2.6.38.8/linux-2.6.38.8/

L UNZIP the source package tar xjvf linux-2.6.38.8.tar.bz2

L Enter the extracted directory CD linux-2.6.38.8

L Execute make menuconfig configuration kernel and save, pay attention to CPU selection

L Execute kernel make command

L compile kernel module make modules

Installing the kernel module make Modules_install

L Install kernel make install

L Restart Computer reboot

3. Upgrade Script Install_new_core

#! /bin/sh

CD/

mkdir linux-2.6.38.8

CP linux-2.6.38.8.tar.bz2 linux-2.6.38.8

CD linux-2.6.38.8

Tar xjvf linux-2.6.38.8.tar.bz2

CD linux-2.6.38.8

Make Menuconfig

Make

Make modules

Make Modules_install

Make install

Reboot

Finally create Initrd file: Mkinitramfs-o/boot/initrd.img-linux-3.2.12

4. Modify script permissions and execute script chmod u+x install_new_core./install_new_core

http://blog.csdn.net/jinble03/article/details/7070982

Some Linux versions automatically generate initd.img and modify bootstrapper files after make install grub.cfg, but ubuntu10.04 doesn't, so we have to do it ourselves.

The first is to generate initrd.img.

Mkinitramfs 2.6.38.8-o/boot/initrd.img-2.6.38.8

If you are prompted not to have Mkinitramfs installed, apt-get install Mkinitramfs

Then modify the bootstrapper file Grub.cfg

Update-grub2

. Preparatory work
Switch to administrator permissions, sudo–i Enter the user password to enter root permissions
Apt-get Install build-essential kernel-package libncurses5-dev libqt3-headers
Build-essential (Basic Programming library (GCC, make, etc.)
Kernel-package (some configuration files and tools that generate kernel-image in the Debian system)
Libncurses5-dev (Meke Menuconfig to invoke)

Libqt3-headers (make Xconfig to invoke)

Make install, the system automatically updates the startup item, you can cat/boot/grub/grub.cfg to see. The previous startup item cannot be deleted, and if the compilation kernel is unsuccessful, the previous startup item is missing and your system is kneeling.

LinuxKernel update

http://www.zhukun.net/archives/6172

Linux kernel RAMDisk (INITRD) mechanism

http://blog.csdn.net/ruixj/article/details/3772752

In the earlyLinuxsystem, only floppy disks or hard disks are generally used asLinuxroot file system, so it is easy to integrate drivers for these devices into the kernel. However, the root file system may now be stored on a variety of storage devices, includingSCSI, SATA, Udisk and so on. It is therefore inconvenient to compile all of these device drivers into the kernel. In theLinuxin the introduction of the kernel module auto-loading mechanism, we see the useUDEVDYou can implement automatic loading of kernel modules, so we want the device drivers for the root filesystem to also be loaded automatically. But there is a contradiction here,UDEVDis an executable file that is impossible to execute before the root filesystem is mountedUDEVD, but ifUDEVDwithout booting, it is not possible to automatically load the root based on the driver of the system device and also cannot/ Devthe corresponding device node is established under the directory. In order to solve this contradiction, there was ainitrd (boot loader initialized RAM disk). INITRDis a small, compressed root directory that contains the driver modules, executables, and startup scripts that must be in the startup phase. Including the above mentionedUDEVD, when the system starts,Booloadwill putINITRDThe file is read into memory and then theINITRDstart address to tell the kernel. The kernel will decompress during OperationINITRD, and then putINITRDmount the root directory, and then execute the/INITRCscript that you can run in this scriptINITRDin theUDEVD, let it automatically load the device driver and/ Devset up the necessary device nodes in the directory. In theUDEVDafter the disk driver is loaded automatically, you canMountReal root directory, and switch to this root directory.

VMLINUZ,INITRD and System.map

http://blog.csdn.net/powersaven/article/details/4107544

USB Stick Install Linux system

Http://www.cnblogs.com/geekard/archive/2012/05/06/2486464.html

LiveCD

A CD that can be directly booted to a usable Linux system

http://blog.csdn.net/taochenchang/article/details/7622762

Http://www.ibm.com/developerworks/cn/linux/l-fedora-livecd/index.html

GRUB2

Http://linux-wiki.cn/wiki/Grub2%E9%85%8D%E7%BD%AE

Build linux[kernel updates and data from scratch]

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.