Nuclear compilation

zhaozj2021-02-16  166

Nuclear compilation

details as follows:

1. Download the kernel file such as: Linux-2.4.18-3.tar.gz copy to / usr / src directory and decompressed.

# CD / USR / SRC

# TAR ZVXF Linux-2.4.18-3.tar.gz

2, enter the decompression directory. (/UsR/src/linux-2.4.18-3, depending on the name)

# cd /usr/src/linux-2.4.18-3

# Make MrProper

# Make Xconfig

3, select, set yourself, set your personalized kernel. I finish "save and exit"

4, compile.

# Make Dep

# make clean

# Make Bzimage (i is capitalized)

5, compilation module.

# Make Modules

# Make Modules_Install

# depmod -a

6, compile completion, start replacement files.

# cd / boot

# rm system.map

# RM VMLinuz

# mv /usr/src/linux-2.4.18-3/system.map system.map

# mv /usr/src/linux-2.4.18-3/Arch/i386/boot/bzimage VMLinux

7. Modify the boot settings.

GRUB is /boot/grub/grub.conf file lilo is /etc/lilo.conf file

You can use commands

# mkinitrd /boot/initrd-2.4.18-3.img 2.4.18-3 to generate an initrd file.

Use GRUB to give examples. (Red section)

# Grub.conf generated by Anaconda

#

# Note That You Do Not Have to Run Grub After Making Changes To this file

# NOTICE: You Have A / Boot Partition. This Means That

# All kernel and ionrd paths are relative to / boot /, eg.

# root (HD0, 7)

# kernel / vmlinuz-version Ro root = / dev / hda10

# initrd /initrd-version.img

# Boot = / dev / hda

DEFAULT = 1

TIMEOUT = 5

SplashImage = (HD0, 7) /grub/splash.xpm.gz

Title Red Hat Linux (2.4.18-3)

Root (HD0, 7)

Kernel /Vmlinuz-2.4.18-3 Ro root = / dev / hda10

Initrd /initrd-2.4.18-3.img

Title Win XP

Rootnoverify (HD0, 0)

ChainLoader 1

Restart the computer and finish.

Additional information:

The kernel is compiled after the following positions.

1. Bzimage file /usr/src/linux-2.4.18-3/Arch/i386/boot catalog

2. Plug-mounted module /usr/src/linux-2.4.18-3/Arch/i386/lib directory

3. Installed module file /LIB/Modules/2.4.18-3 directory

转载请注明原文地址:https://www.9cbs.com/read-8030.html

New Post(0)