Crux2.6 installation experience-the first kernel Compilation

Source: Internet
Author: User

Well, you may be here from Baidu one day. That's right. Professor Wu Yimin's operating system kernel class requires you to install a crux2.6 Virtual Machine and compile the kernel on your own. baidu and crux2.6 may not be used in China. many problems are caused by Baidu's failure to get the desired results. Please use Google to search for error prompts. I tried to solve the problem for a long time. write it down as an experience introduction.

Crux Handbook web site http://crux.nu/Main/Handbook2-6#ntoc11

The following are some notes:

1. I am using VMware workstation6.5. It is estimated that 7.0 has not changed much. When creating a new virtual machine, we recommend using the IDE Hard Disk instead of using SCSI. this is mainly because the kernel should be integrated into the hard drive during later compilation. I have not tried it in SCSI, so the following experience is mainly based on IDE.

2. if you do not know what type of hard disk you are using, use fdisk-L to check whether/dev/hda is IDE,/dev/SDA is SCSI, And the size is 2 GB, at least 1.6 GB

3. boot into the disk, fdisk partition, mkfs format is not detailed, do not understand your own Baidu, please note that you 'd better remember the file system format what you are using (ext2, ext3, etc)

4. follow the handbook process (Mount partitions, set swap partitions, etc.), mount and enter setup. Note that apart from the core, add the grub package as well (unless you want to use LILO guidance, grub---is recommended by teacher Wu --),, you can select a simple grub package or all the software packages under this opt directory, and select all opt software and press spaces on that line.

5. after this is done, set setup-chroot to enter bash. modify/etc/fstab,/etc/rc. d/NET,/etc/hosts,/etc/resolv. change the conf file later. It is not urgent now. use lspci | grep ide to view the model of your IDE hard disk, which is useful when selecting a driver later.

6. go to the kernel source code directory and make menuconfig. This step is very important. note: For file systems, if you use ext3, the driver should be integrated into the kernel rather than as a module. The difference is that <*> indicates integration into the kernel in the option brackets, <m> indicates the module. for IDE, in addition to the basic ide drivers that need to be integrated, there is also a driver for a specific hard drive model (device drivers ---> ATA/atapi/MFM/rll support ---> ), be sure to select PCI ide chip support. In addition, in file system, integrate the driver of your file system into the kernel. If ext2 is used, make sure that the brackets before ext2 are <*>

7. Follow the handbook process. We recommend that you use the manual setup mode for grub guidance. Do not use the automatic mode. The handbook also has the fstab configuration.

Add the following two lines:

/Dev/hda1/ext4 defaults 0 1 (according to your file system)

/Dev/hda2 swap defaults 0 0 (based on your swap partition)

8. error message:

VFS: cannot open root device "Dev = hda1" or unknow-block (0, 0)
Please append a correct "root =" Boot Option
Kernel panic-not syncing: VFS: Unable to mount root FS on unknow-block (0, 0)

This is generally because the hard drive is not integrated into the kernel.

9. The last big move is that we cannot integrate all ide drivers. It is just a little slower during compilation .-____-


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.