标签:epo pre meta file data config def opera number
有时因为系统内核的bug 我们必须要安装新版本的kernel 来解决问题,有几种方法
使用包的方式比较方便,同时一些依赖的问题可以自动帮助我们处理
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
可以通过修改文件
/etc/yum.repos.d/elrepo.repo 参考如下
[elrepo-kernel]
name=ELRepo.org Community Enterprise Linux Kernel Repository - el7
baseurl=http://elrepo.org/linux/kernel/el7/$basearch/
http://mirrors.coreix.net/elrepo/kernel/el7/$basearch/
http://mirror.rackspace.com/elrepo/kernel/el7/$basearch/
http://repos.lax-noc.com/elrepo/kernel/el7/$basearch/
http://mirror.ventraip.net.au/elrepo/kernel/el7/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-kernel.el7
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0
或者
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum clean dbcache
yum makecache
yum install -y kernel-lt or yum install -y kernel-ml
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed ‘s, release .*$,,g‘ /etc/system-release)"
GRUB_DEFAULT=0
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto noibrs idle=halt net.ifnames=0 console=tty0 console=ttyS0,115200n8"
GRUB_DISABLE_RECOVERY="true"
grub2-mkconfig -o /boot/grub2/grub.cfg
效果
grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file
Found linux image: /boot/vmlinuz-5.1.5-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-5.1.5-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-4.4.180-2.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.4.180-2.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-957.5.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.5.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-957.1.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.1.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-20181212155109274552296824485474
Found initrd image: /boot/initramfs-0-rescue-20181212155109274552296824485474.img
done
reboot
uname -a
Linux iZ2zeg7uro1snhd9wqmp2oZ 5.1.5-1.el7.elrepo.x86_64 #1 SMP Sat May 25 16:10:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
https://elrepo.org/tiki/kernel-lt
标签:epo pre meta file data config def opera number
原文地址:https://www.cnblogs.com/rongfengliang/p/10930097.html