Detailed analysis of the Linux kernel compilation process in the VMware environment

Source: Internet
Author: User
Article title: detailed explanation of the Linux kernel compilation process in VMware environment. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Finally, we can use the newly compiled kernel debugging driver in vmware. although we often use linux in vmware, we have never compiled the kernel in it, so I don't know that there are so many channels. The process of compiling the kernel is not mentioned. in addition to the general compilation process, each release may also have its own compilation commands, such as the debian I used. The following lists the steps I have attempted during the compilation process.

1. the sourcecode 2.6.18 is upgraded from kernel.org. after compilation and installation, start with the new kernel and see the following annoying error:

VFS: Cannot open root device "sda" or unknow-block (0, 0)

Please append a correct "root =" boot option

Kernel panic: VFS: Unable to mount root fs on unknown-block (0, 0)

This is not the first time that the system was in close contact. for example, a long time ago, dd was used to copy the system to another hard disk, and the new hard disk was used to start the system, this is because the hard disk is not connected to the IDE interface corresponding to the original hard disk, but this is definitely not the reason why it follows me here, of course, I think it will not fall down here because I have been as thick as brass, so I didn't think much about it (I am ashamed). then I will use the restart method most commonly used by everyone, it was a temporary negligence. However, after dozens of seconds, it suddenly appeared in front of my eyes. without it, I had to google.

2. according to the results of google, there are quite a few people in the same path (with the same path). the varied process exposes roughly no two solutions. The kernel configuration options are mainly

Device Drivers --> SCSI device support --> SCSI low-level drivers --> BusLogic SCSI support

It is mainly because vmware needs it when using scsi, and there is a file system. I use ext3, because it is said that they are not directly compiled into the kernel, causing the startup to still fail, give yourself a reason to be lazy, so I will not try again. I will directly built-in them, and then execute

Make-kpkg? Revision = 1.0 kernel-image

Compile and use dpkg to install and restart. what's frustrating is that the above cute errors have appeared again.

3. check the kernel configuration options again. I think all the related options have been selected. I should not find the root file system. do you want to try initrd? Although I have compiled several modules into the kernel, do I still need to create initrd? Right and try again, so re-compile the kernel

Make-kpkg? Revision = 1.0 kernel-image? Initrd

After installing and restarting, I opened the panic, but there was still a bit of cloudification. Oh, these things on linux seem to be mostly like this. I took the time to study 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.