qiushao@qiushao-pc:~$ uname -a Linux qiushao-pc 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux qiushao@qiushao-pc:~$
qiushao@qiushao-pc:~/Downloads/kernel$ ls linux-headers-5.4.23-050423_5.4.23-050423.202002281329_all.deb linux-image-unsigned-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb linux-headers-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb linux-modules-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb qiushao@qiushao-pc:~/Downloads/kernel$ qiushao@qiushao-pc:~/Downloads/kernel$ sudo dpkg -i *.deb (Reading database ... 244666 files and directories currently installed.) Preparing to unpack linux-headers-5.4.23-050423_5.4.23-050423.202002281329_all.deb ... Unpacking linux-headers-5.4.23-050423 (5.4.23-050423.202002281329) over (5.4.23-050423.202002281329) ... Preparing to unpack linux-headers-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb ... Unpacking linux-headers-5.4.23-050423-generic (5.4.23-050423.202002281329) over (5.4.23-050423.202002281329) ... Preparing to unpack linux-image-unsigned-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb ... Unpacking linux-image-unsigned-5.4.23-050423-generic (5.4.23-050423.202002281329) over (5.4.23-050423.202002281329) ... Preparing to unpack linux-modules-5.4.23-050423-generic_5.4.23-050423.202002281329_amd64.deb ... Unpacking linux-modules-5.4.23-050423-generic (5.4.23-050423.202002281329) over (5.4.23-050423.202002281329) ... Setting up linux-headers-5.4.23-050423 (5.4.23-050423.202002281329) ... Setting up linux-headers-5.4.23-050423-generic (5.4.23-050423.202002281329) ... Setting up linux-modules-5.4.23-050423-generic (5.4.23-050423.202002281329) ... Setting up linux-image-unsigned-5.4.23-050423-generic (5.4.23-050423.202002281329) ... Processing triggers for linux-image-unsigned-5.4.23-050423-generic (5.4.23-050423.202002281329) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.4.23-050423-generic W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169 I: The initramfs will attempt to resume from /dev/nvme0n1p4 I: (UUID=5d386fca-a168-4aae-9b13-425eae5932ea) I: Set the RESUME variable to override this. /etc/kernel/postinst.d/zz-update-grub: Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.4.23-050423-generic Found initrd image: /boot/initrd.img-5.4.23-050423-generic Found linux image: /boot/vmlinuz-5.3.0-28-generic Found initrd image: /boot/initrd.img-5.3.0-28-generic Found linux image: /boot/vmlinuz-5.0.0-37-generic Found initrd image: /boot/initrd.img-5.0.0-37-generic Found Manjaro Linux (19.0.1) on /dev/nvme0n1p3 Adding boot menu entry for EFI firmware configuration done qiushao@qiushao-pc:~/Downloads/kernel$ qiushao@qiushao-pc:~/Downloads/kernel$ reboot
3. 重启验证
重启后,查看一下内核的版本信息:
1 2 3
qiushao@qiushao-pc:~$ uname -a Linux qiushao-pc 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux qiushao@qiushao-pc:~$
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-697f7639-b38d-4e6c-a994-d36c5542dae5' { recordfail load_video gfxmode $linux_gfx_mode insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root 697f7639-b38d-4e6c-a994-d36c5542dae5 else search --no-floppy --fs-uuid --set=root 697f7639-b38d-4e6c-a994-d36c5542dae5 fi linux /boot/vmlinuz-5.4.23-050423-generic root=UUID=697f7639-b38d-4e6c-a994-d36c5542dae5 ro quiet splash $vt_handoff initrd /boot/initrd.img-5.4.23-050423-generic }
我们看到最后两行配置是内核相关的,其中指定了使用哪个版本的内核来启动系统。关于 grub 的知识,是 Linux 通用的,任何发行版都是一样的。
解决方案很简单,先进入 manjaro 系统先,然后执行这个命令更新 grub 启动信息:
1
sudo update-grub
更新完之后, reboot 重启进入 ubuntu 再看看内核的版本:
1 2 3
qiushao@qiushao-pc:~$ uname -a Linux qiushao-pc 5.4.23-050423-generic #202002281329 SMP Fri Feb 28 18:33:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux qiushao@qiushao-pc:~$