Modules required for quick compilation for your Linux

Source: Internet
Author: User
Article title: The module required for quick compilation for your Linux. 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.
Author: Liu Junmin
  
The traditional method for compiling the kernel module is cumbersome and time-consuming. This article will show us a new method for quickly compiling the required kernel module.
When you have installed the Linux system and started it, congratulations! If the WinNT/2000 system is installed on your hard disk, you may encounter problems when trying to access another NTFS partition. Because the Linux system you are using does not have a compiled module that supports the NTFS file system. What should I do? Maybe you will run make menuconfig, re-customize all the modules you need, and then run make modeules; make modeules_install to install. This is not only tedious, time-consuming, but may also cause problems. Or because it is tricky to compile the kernel, too many choices make you feel helpless, and you have no good way at all. This article provides you with a simple method, you can easily compile the module (NTFS. o) that you need to support the ntfs system ). For example, I hope it will help you compile other modules.
  
The system I used when writing this article is Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22 on an i686. From a newly installed system, we compile a file system module that we want to support NTFS.
  
1. find the. config file required to compile the kernel.
The/usr/src/linux/configs directory contains several configurations used to compile the kernel. Select the desired configuration, copy it to the/usr/src/linux directory, and change it to. config.
Cp/usr/src/linux/configs/kernel-2.2.16-i686.config/usr/src/linux/. config
  
2. modify the. config file, remove unnecessary modules, and add the desired modules.
Open. config, there are many XXXX = m items, these are to be compiled as module items, because we do not want to compile these modules, so we need to remove all XXXX = m items. Add the module we want and change # CONFIG_NTFS_FS is not set to CONFIG_NTFS_FS = m. of course, you can use various tools to do this.
  
3. Compile the NTFS module.
Run the make modules command in the/usr/src/linux directory to compile the NTFS module.
  
4. install the NTFS module.
The ntfs. o obtained after compilation is under the/usr/src/linux/fs/ntfs directory and manually copied to the correct directory.
Cp/usr/src/linux/fs/ntfs. o/lib/modules/2.2.16-22/fs/
Note: do not run the command make modules_install. Otherwise, it will cause serious consequences. it will delete all modules in your system and only install the compiled modules (ntfs. o ).
  
5. load the NTFS module.
Run the command depmod; modprobe ntfs and try to access your NTFS file system. wish you success!
  
Some modules depend on your system kernel, so the methods provided in this article are not applicable. Some modules are dependent on other modules. If you are not familiar with these dependencies, we recommend that you remove unnecessary module options in step 2 and add the desired modules through make menuconfig.
  
I used this method to compile a module that supports the NTFS file system for three minutes. what about you?
  
  
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.