Compiling the Linux kernel 4.6.3 to support the NTFS file system

Source: Internet
Author: User
Tags install openssl

Compile and install the 4.6.3 kernel and enable it to support the NTFS file system

In the virtual machine environment before compiling the kernel, the virtual machine hard disk can not be less than 7G, the memory needs to be much 2.5G.

It is possible to improve efficiency by adjusting the PC configuration appropriately.

A. Download kernel source package

https://www.kernel.org/

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/83/5F/wKioL1dx4mCweiZ2AAEAMJOoMrM932.png " Title= "1.png" alt= "Wkiol1dx4mcweiz2aaeamjoomrm932.png"/>

Two To see if a virtual machine has a compilation condition

1)

[[email protected]/]# rpm-q makemake-3.82-21.el7.x86_64[[email protected]/]# rpm-q Gccgcc-4.8.5-4.el7.x86_64[[email p Rotected]/]# rpm-q gcc-c++gcc-c++-4.8.5-4.el7.x86_64[[email protected]/]# rpm-q ncurses-devel


Package Ncurses-devel not installed

2) by viewing the discovery Ncurses-devel package is not installed

Installing the Ncurses-devel Package

[[email protected]/] #yum-y install Ncurses-devel


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/5F/wKioL1dx4m6y-cuOAAGTN92-GKQ559.png "title=" 2.png " alt= "Wkiol1dx4m6y-cuoaagtn92-gkq559.png"/>

The meaning of the Yum command parameter

-y no interactivity, default Yes

Three Upload kernel installation package and unzip

Upload the downloaded kernel installation package to the virtual machine

1) upload via RZ command

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/5F/wKioL1dx4neRz9C7AAAWXosO3V4155.png "title=" 3.png " alt= "Wkiol1dx4nerz9c7aaawxoso3v4155.png"/>

2) You can see that the compression package suffix is in XZ format, so we have to use the XZ tool to decompress

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/5F/wKioL1dx4oHj4xCZAAA05ni2aAQ011.png "title=" 4.png " alt= "Wkiol1dx4ohj4xczaaa05ni2aaq011.png"/>

[[email protected]/] #xz-D linux-4.6.3.tar.xz


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/5F/wKioL1dx4orCU-mDAAAKlg_D5vo283.png "title=" 5.png " alt= "Wkiol1dx4orcu-mdaaaklg_d5vo283.png"/>

XZ Meaning of the command parameter

-D Decompression

-K retain the original file, without parameters, the original file will disappear after the successful decompression

3) Check again and find that you need to unzip the. Tar-formatted package again

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/60/wKiom1dx4peibbSUAABDDZPQFwE589.png "title=" 6.png " alt= "Wkiom1dx4peibbsuaabddzpqfwe589.png"/>

[[email protected]/] #tar XVF Linux-4.6.3.tar


The decompression process may take a little longer, but there's no need to worry

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/60/wKiom1dx4qSjCykLAAFC0M9_jI0583.png "title=" 7.png " alt= "Wkiom1dx4qsjcyklaafc0m9_ji0583.png"/>

Meaning of the tar command parameter

-X Decompression

-V displays details, such as details that you do not want to display, without this parameter

-F means using the archive

4) View the extracted kernel installation package

[[email protected]/] #du-sh linux-4.6.3


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/60/wKiom1dx4q7ydzqCAAALXBp1Iy4250.png "title=" 8.png " alt= "Wkiom1dx4q7ydzqcaaalxbp1iy4250.png"/>

Meaning of the du command parameter

-S displays only the total size

-H with K,m,g as a unit for improved readability of information

Four Clean up cached data

you need to do this before you clean up cached data Sync Update Super block information to avoid data loss

[[email protected] /]# free -m                total        used         free      shared  buff/cache    availableMem:           3937          637        1237           10        2062         2959swap:          2047            0         2047[[email protected] /]# cat /proc/sys/vm/drop_caches 0[[email protected ] /]# echo&nbSp;3 >/proc/sys/vm/drop_caches [[email protected] /]# cat /proc/sys/vm/drop_ caches 3[[email protected] /]# free -m               total        used         free      shared  buff/cache    availableMem:           3937          593        3146           10          197        3127


swap:2047 0 2047

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/5F/wKioL1dx4rnjoI2qAACbtDnzCG0759.png "title=" 9.png " alt= "Wkiol1dx4rnjoi2qaacbtdnzcg0759.png"/>

#reboot和init6重启也可以清理缓存, choose according to your preference

Five Configuring kernel compilation Parameters

1) Generate kernel parameters to configure the. config file to support the NTFS file system

[[email protected]/]# Cd/linux-4.6.3/[[email protected] linux-4.6.3]# make Menuconfig

Graphical interface Configuration kernel parameters

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/5F/wKioL1dx4sfiPoPJAAAMy_Z7yYQ222.png "title=" 10.png "alt=" Wkiol1dx4sfipopjaaamy_z7yyq222.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/5F/wKioL1dx4tCQN4mbAABDGzA6T7M250.png "title=" 11.png "alt=" Wkiol1dx4tcqn4mbaabdgza6t7m250.png "/>

In this note the resolution size, the resolution size is incorrect, it is possible to start the failure

Use "/" to view NTFS parameter locations

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/60/wKioL1dx4zqyydfSAADW48ehIzQ193.png "title=" 12.png "alt=" Wkiol1dx4zqyydfsaadw48ehizq193.png "/>

After moving to the file systems option, enter next

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/83/60/wKioL1dx40vB3IMLAAEA73UJLXQ330.png "title=" 13.png "alt=" Wkiol1dx40vb3imlaaea73ujlxq330.png "/>

After moving to the dos/fat/nt filesystems option, enter next

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/83/60/wKioL1dx41nB3pK_AAHrXYXTB58499.png "title=" 14.png "alt=" Wkiol1dx41nb3pk_aahrxyxtb58499.png "/>

When you move to the NTFS file system support option, the NTFS write suppport option appears by pressing a space, pressing the SPACEBAR to display the * number in the front box, and then exiting (exit) after saving (save) the configuration file.

#tab键切换

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/83/61/wKiom1dx42zRw7JlAAEUpZ2beqM105.png "title=" 15.png "alt=" wkiom1dx42zrw7jlaaeupz2beqm105.png "/> 650" this.width=650; "Src=" http://s2.51cto.com/wyfs02/M02/ 83/61/wkiom1dx44pzagwiaaav0sl61e4160.png "title=" 16.png "alt=" Wkiom1dx44pzagwiaaav0sl61e4160.png "/>

2) Verify that the NTFS file system is supported

[Email protected] linux-4.6.3]# vim. config


Use ":/ntfs" to find the NTFS keyword

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/83/60/wKioL1dx45WBbXn1AAALRdvsris809.png "title=" 17.png "alt=" Wkiol1dx45wbbxn1aaalrdvsris809.png "/>

3) Follow the steps to see if the system comes with a kernel that can support the NTFS file system

[Email protected] linux-4.6.3]# vim/boot/config-3.10.0-327.el7.x86_64


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/83/60/wKioL1dx48fQ6AgGAAAZbwhrI80883.png "title=" 18.png "alt=" Wkiol1dx48fq6aggaaazbwhri80883.png "/>

You can see that the NTFS line is not set

4) Enable the system's own kernel to support the NTFS file system (This step does not explain in detail)

[Email protected] linux-4.6.3]# cp/boot/config-3.10.0-327.el7.x86_64. config CP: Do you want to overwrite ". config"? Y[[email protected] linux-4.6.3]# make Menuconfig[[email protected] linux-4.6.3]# vim. config


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/83/60/wKioL1dx49-CQBeoAAAK3QbsmBI289.png "title=" 19.png "alt=" Wkiol1dx49-cqbeoaaak3qbsmbi289.png "/>

As can be seen, the system comes with a kernel that already supports the NTFS file system

Six Compiling the kernel

1) Install the Openssl-devel development package before compiling the kernel

[Email protected] linux-4.6.3]# yum-y install Openssl-devel


2) Start compiling kernel

[[email protected] linux-4.6.3]# make bzimage-j 4 && make modules-j 4 && make Modules_install &&A mp Make install


Meaning of the above-mentioned commands

Make Bzimage-j 4//Build kernel

Make modules-j 4//Generate a new kernel driver module

Make Modules_install//install the compiled kernel and module

Make install//install the newly compiled system kernel

-j 4//with 4 thread installation, default single thread

&&//Represents the connector, and executes when the previous command finishes

3) It can be seen that the compilation is now successful

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/61/wKiom1dx4--AED5iAAEKvUIWH_M343.png "title=" 20.png "alt=" Wkiom1dx4--aed5iaaekvuiwh_m343.png "/>

4) Next, restart the view, select 4.6.3, enter the system

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/83/61/wKiom1dx5CCTAH4AAAA2uRBPyXI665.png "title=" 21.png "alt=" Wkiom1dx5cctah4aaaa2urbpyxi665.png "/>

5) View Kernel version

[Email protected] ~]# uname-r


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/83/60/wKioL1dx5CrBm6mpAAAKycsRNgw748.png "title=" 22.png "alt=" Wkiol1dx5crbm6mpaaakycsrngw748.png "/>

As can be seen, the kernel 4.6.3 compiled and installed successfully!


changes to the kernel default boot order can be referenced by: http://hugyou.blog.51cto.com/11674506/1793094


^_^ o~ efforts!

^_^ o~ efforts!

^_^ o~ efforts!


This article is from the "hugyou" blog, make sure to keep this source http://hugyou.blog.51cto.com/11674506/1793539

Compiling the Linux kernel 4.6.3 to support the NTFS file system

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.