ubuntu20.04 更改内核
前言
更换内核是因为Realsense sdk 2.0的内核驱动包(librealsense2-dkms)
支持Ubuntu LTS kernels 4.4, 4.8, 4.10, 4.13, 4.15, 4.18*, 5.0*, 5.3* and 5.4.
这个从网站下载的原因是直接install安装后没有网卡驱动。
更换详细步骤
-
查看内核版本
uname -r
-
去网站查看你像更新的内核版本并下载
https://kernel.ubuntu.com/~kernel-ppa/mainline/
打开之后如下图所示:
找到5.4的地方:
点击:
上图显示很多不同的版本,请打开终端输入进行查看选择版本:
cat /proc/version
由于版主为amd64所以下载如下内容:
利用如下代码依次安装:
sudo dpkg -i linux-headers-5.4.0-050400.201911242031_all.deb sudo dpkg -i linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb sudo dpkg -i linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb sudo dpkg -i linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
-
修改配置文件
sudo gedit /etc/default/grub
配置文件内容修改为(注释掉
GRUB_TIMEOUT_STYLE=hidden
将GRUB_TIMEOUT=0
改为GRUB_TIMEOUT=10
):# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 #GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
-
更新 grub
#输入指令 sudo update-grub
-
重启
sudo reboot
-
grub 界面选择 Advanced options(这里没有截图用的别人的图如侵望告知)
-
再选择自己想要的版本进入即可