linux重装内核源程序,编译安装内核

检查 ls /boot, /boot/grub2/grub.cfg, /lib/modules

[[email protected] linux-4.20.3]#ls /boot/ //查看是否有新kernel

config-3.10.0-862.el7.x86_64 symvers-3.10.0-862.el7.x86_64.gz

efi System.map

extlinux System.map-3.10.0-862.el7.x86_64

grub System.map-4.20.3-1.0-xinzhoulinux

grub2 vmlinuz

initramfs-0-rescue-18ed42c1c89e4d28870e69320e88d637.img vmlinuz-0-rescue-18ed42c1c89e4d28870e69320e88d637

initramfs-3.10.0-862.el7.x86_64.img vmlinuz-3.10.0-862.el7.x86_64

initramfs-4.20.3-1.0-xinzhoulinux.img vmlinuz-4.20.3-1.0-xinzhoulinux

[[email protected] linux-4.20.3]#vim /boot/grub2/grub.cfg

menuentry ‘CentOS Linux (4.20.3-1.0-xinzhoulinux) 7 (Core)‘ --class centos --class gnu-linux --class gnu --class os --unrestricted $m

enuentry_id_option ‘gnulinux-3.10.0-862.el7.x86_64-advanced-576ed6fe-d3e8-403d-832f-2dc117ba8d2f‘ {

load_video

set gfxpayload=keep

insmod gzio

insmod part_msdos

insmod xfs

set root=‘hd0,msdos1‘

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘

hd0,msdos1‘ 6e6694fc-5a2f-47a1-b96b-509621e5fc1e

else

search --no-floppy --fs-uuid --set=root 6e6694fc-5a2f-47a1-b96b-509621e5fc1e

fi

linux16 /vmlinuz-4.20.3-1.0-xinzhoulinux root=UUID=576ed6fe-d3e8-403d-832f-2dc117ba8d2f ro crashkernel=auto rhgb quiet LANG=e

n_US.UTF-8

initrd16 /initramfs-4.20.3-1.0-xinzhoulinux.img

}

[[email protected] linux-4.20.3]#ls /lib/modules/4.20.3-1.0-xinzhoulinux/kernel/fs/ntfs/ //检查模块是否存在

ntfs.ko

[[email protected] ~]#du -sh /data/linux-4.20.3 //编译后的文件大小11G

11G /data/linux-4.20.3

[[email protected] ~]#uname -r //reboot, 查看到新的内核

4.20.3-1.0-xinzhoulinux

[[email protected] data]#locate ntfs.ko

[[email protected] data]#updatedb // updatedb - update a database for mlocate

[[email protected] data]#locate ntfs.ko //已经支持新的ntfs模块

/data/linux-4.20.3/fs/ntfs/.ntfs.ko.cmd

/data/linux-4.20.3/fs/ntfs/ntfs.ko

/usr/lib/modules/4.20.3-1.0-xinzhoulinux/kernel/fs/ntfs/ntfs.ko

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值