A Environment
Virtual machines: VMware Workstation6.5
Operating system: CRUX2.2
Compile kernel: linux-2.6.18
File transfer: ISO image mount
Two Body
1. Installing CRUX2.2
1.1 Download CRUX2.2 ISO image: Http://crux.nu/Main/Download
1.2 Create a virtual machine for the linux2.6x kernel and set the hard disk to the IDE format
1.3 Creating partitions, formatting, loading partitions
create Partition Fdisk/dev/had
Command explanation: n creation; a set startup disk; t specifies the partition type; p lists the current hard disk partition; d deletes a partition; W saves the exit.
formatting partitions
1 mkfs.ext3/dev/hda12 Mkfs.ext3/dev/hda3
Loading partitions
1 mount/dev/hda3/mnt2 mkdir/mnt/boot3 mount/dev/hda1/mnt/boot
Swap space
1 mkswap/dev/hda22 swapon/dev/hda2
1.4 Installing the source code
Run command Setup, Grub#0.95-4 is selected by default in select package to install, followed by bootloader using Grub launcher.
1.5 Switch root directory, command: cd/mnt/usr/src/linux-2.6.15.6/
1.6 Mounting related directories
1.7 Modifying the file system configuration file/etc/fstab
Command: Vim/etc/fstab
Modify the situation as follows.
1.8 Configuring Kernel Options
1 cd/mnt/usr/src/linux-2.6. 15.6 2 make Menuconfig
In Device Drivers---> ATA/ATAPI/MFM/RLL support---> select all the IDE-related options to compile into the kernel (in order to provide supported IDE hard drive).
In file Systems---> Select all the options for EXT3 (format the hard drive into ext3 format, integrate the drive into the kernel), as specified in.
1.9 Compiling the kernel
1 Make 2 cp arch/i386/boot/bzimage/boot/vmlinuz3 CP System.map/boot/system.map
1.10 Installing bootloader
Configuring GRUB
1 cp/usr/share/grub/i386-pc* / /boot/grub/2vim/boot/grub/menu.lst
The configuration of the corresponding Menu.lst is as follows.
Installing GRUB
1 Grub 2 grub> root (hd0,0)3 grub> setup (hd0) 4 grub> quit
1.11 Reboot Restart
CRUX2.2 Installation Success
2. Mount the ISO image of the linux-2.6.18 kernel
2.1 Get linux-2.6.18 Source: https://www.kernel.org/pub/linux/kernel/v2.6/
2.2 Editing linux-2.6.18.tar.gz as an ISO image
2.3 mount an ISO image, such as.
3. Save the kernel compressed file to the/USR/SRC directory and unzip the
1 CP linux-2.6. tar.gz/usr/src2 cd/usr/src3 tar–zxvf linux-2.6. tar.gz–c/usr/src.
4. Configure Kernel Options
4.1 Entering the/usr/src/linux-2.6.18 directory
4.2 Make Menuconfig specific steps with 1.8
5. Make compile kernel step with 1.9
6. Configure/boot/grub/menu.lst to change title to Linux (2.6.18). Reinstall Grub, step with 1.10
7. Reboot restart
Linux-2.6.18 Kernel compilation succeeded.
RELATED links:
The Linux fdisk command uses: http://blog.chinaunix.net/uid-23929712-id-2650378.html
Grub Concept: Http://baike.baidu.com/view/225343.htm?fr=aladdin
CRUX2.2 Installation and bootloader configuration: http://blog.csdn.net/billpig/article/details/6036303
CRUX2.6 Installation Experience: http://blog.csdn.net/gaara_fan/article/details/5894311
Linux2.6.18 Kernel Compilation