How to build Linux kernel on VMware

Source: Internet
Author: User
There are a lot of articles about the Linux kernel build on VMware on the network of the Linux kernel build method on vmware. The main problem is that the kernel cannot be started normally after buildc is successful. this is a bug of vmware and there is no good solution yet. The key to the following kernel build and successful running is the Linux kernel build method on VMware. There are many articles about the Linux kernel build on vmware. The main problem is that the kernel cannot be started normally after buildc is successful, this is a bug in vmware and there is no good solution. The key to successfully running the following kernel build is that VMware uses the ide hard disk. Environment configuration VMware6: 6.01 build-55017 Hard driver: ide rhls 5 Kernel version: 2.6.18.8 Build procedures 1. download the Kernel ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.8.tar.bz2 2. unzip # cd/usr/src/# tar-jxvf linux-2.6.18.8.tar.bz2 # ln-s linux-2.6.18.8 linux # cd linux 3. configuration # make mrproper (this command ensures that the source code directory is not correct. o file. if it is a new decompressed kernel, this step is optional.) # make menuconfig (kernel configuration options) the following configuration recommendations are selected: because simulated SCSI hard disks and AMD PCnet32 NICs are used in vmware, "SCSI disk support", "BusLogin SCSI support", and "AMD PCnet32 PCI support" are required, it is best to compile it into the kernel instead of the kernel module [U1]. [U1] "Device Drivers ---> SCSI device support" set as * firstly Device Drivers ---> SCSI device support ---> <*> SCSI disk support Device Drivers ---> SCSI device support ---> SCSI low-level drivers ---> <*> BusLogic SCSI support Device Drivers ---> Networking support ---> Ethernet (10 or 100 Mbit) ---> <*> If AMD PCnet32 PCI support is compiled as a module, initrd is required; otherwise, "VFS: unable to mounting root fs" appears during startup ". package mkinitrd depends on The device-mapper package and the device-mapper package depend on lvm2. Therefore, you need to download the mkinitrd, device-mapper, and lvm2 packages at the same time. EXT3 must also be compiled into the kernel, but cannot be compiled into the module File system ---> (the following nine options are about ext2 and ext3 File system configuration, all selected) second extended fs support Ext2 extended attributes Ext2 POSIX Access Control Lists Ext2 Security Labels Ext3 journalling file system support Ext3 extended attributes Ext3 POSIX Access Control Lists Ext3 Security Labels JBB (ext3) debugging support 4. start compiling in the/usr/src/linux-2.6.18.8 directory and execute the following command to compile. It takes some time to compile the program. please wait for a cup of tea! # Make dep (create the dependent file required for compilation. Note: If the kernel has never been compiled, skip this step.) # make clean (clear the target file compiled by the kernel. Note: If the kernel has never been compiled, skip this step.) # make bzImage (case sensitive. This step truly compiles the kernel. after the kernel is compiled successfully, an image file bzImage of the new kernel will be generated in the/usr/src/linux/arch/i386/boot directory. If you use make zImage to compile a large kernel, the system will prompt you to use the make bzImage command to compile it. Therefore, I will use make bzImage to compile it directly. # Make modules (compile and load the module) # make modules_install (install and load the module) after the installation is successful, the system will generate a 2.6.18.8 subdirectory under the/lib/modules Directory, it stores all the loaded modules of the new kernel. # Make install (new kernel installation) 5. OK. you can restart it with the command reboot. after the restart, select the 2.6.18.8 kernel version.
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.