选中“NTFS file system support”,并在新弹出的选项中选中“NTFS write support”,然后按 tab 键选中 save 并按回车保存
直接 OK 保存
保存成功,退出
# 编译[root@localhost linux]# make -j 2# 生成模块[root@localhost linux]# make modules_install# 生成内核[root@localhost linux]# make install# 重启[root@localhost linux]# reboot# 查看 ntfs 模块[root@localhost ~]# modinfo ntfs
filename: /lib/modules/5.7.5/kernel/fs/ntfs/ntfs.ko
license: GPL
version: 2.1.32
description: NTFS 1.2/3.x driver - Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
author: Anton Altaparmakov <anton@tuxera.com>
alias: fs-ntfs
srcversion: 4D306484D5B0E54E4EA7EF4
depends:
retpoline: Y
intree: Y
name: ntfs
vermagic: 5.7.5 SMP mod_unload modversions
# 插入一个 NTFS 分区的硬盘(在 windows 虚拟机创建分区),可以看到是 NTFS 分区[root@localhost ~]# blkid
/dev/sdb1: LABEL="M-gM-3M-;M-gM-;M-^_M-dM-?M-^]M-gM-^UM-^Y" UUID="F6A4F0B2A4F07689" TYPE="ntfs"
/dev/sdb2: UUID="884E7F8A4E7F7034" TYPE="ntfs"
/dev/sda1: UUID="9d738e10-ef5f-4070-9901-5dc4bb08f4a9" TYPE="xfs"
/dev/sda2: UUID="d271b5a3-9e48-488c-ab2a-68960b75475a" TYPE="xfs"
/dev/sda3: UUID="9092aafc-239d-4096-ab05-2d77a0aec194" TYPE="swap"# 挂载分区、查看分区内容[root@localhost ~]# mount /dev/sdb2 /mnt[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 952M 0 952M 0% /dev
tmpfs 979M 0 979M 0% /dev/shm
tmpfs 979M 8.7M 971M 1% /run
tmpfs 979M 0 979M 0% /sys/fs/cgroup
/dev/sda2 50G 17G 34G 33% /
/dev/sda1 1014M 201M 814M 20% /boot
tmpfs 196M 0 196M 0% /run/user/0
/dev/sdb2 60G 11G 50G 18% /mnt
[root@localhost ~]# ls /mnt
bootmgr BOOTNXT Documents and Settings pagefile.sys PerfLogs ProgramData Program Files Program Files (x86) Recovery $Recycle.Bin System Volume Information Users Windows
# 查看内核[root@localhost ~]# uname -r
5.7.5
2、修改默认的启动内核为新编译内核
# 备份 grub.cfg[root@localhost ~]# cp -p /boot/grub2/grub.cfg{,.bak}# 查看默认启动项[root@localhost ~]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-1062.el7.x86_64) 7 (Core)# 修改默认启动项(在/boot/grub2/grub.cfg中查看启动名称,menuentry后面的内容)[root@localhost ~]# grub2-set-default "CentOS Linux (5.7.5) 7 (Core)"[root@localhost ~]# grub2-editenv list
saved_entry=CentOS Linux (5.7.5) 7 (Core)# 生成 grub.cfg 文件[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file...
Found linux image: /boot/vmlinuz-5.7.5
Found initrd image: /boot/initramfs-5.7.5.img
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-9510e6308f1245a19dbe52175fa625bd
Found initrd image: /boot/initramfs-0-rescue-9510e6308f1245a19dbe52175fa625bd.img
Found Windows Recovery Environment (loader) on /dev/sdb1
done# 重启验证(成功)