[Exchange and share] deepinV23安装linux 6.1.0 内核
Tofloor
poster avatar
昨夜的星辰
deepin
2022-12-21 06:46
Author

LINUX 6.1.0终于结束RC,闲来无事又安装了一遍

https://bbs.deepin.org/post/237619

主要是参考这个帖子

1、当然还是去kernel.org去下载内核源文件


[tarball]

2、下载源文件的时候顺便装下编译需要的软件,zlibc这个源里是没有的,到这里(中科大源)下载手动安装,其它的组件用下面命令安装

$ sudo apt install libncurses5-dev openssl libssl-dev build-essential openssl pkg-config libc6-dev bison libidn11-dev libidn11 minizip flex libelf-dev

3、默认下载位置应该是主目录的 ***下载 ***文件夹

在下载文件夹右键>在终端中打开,打开终端,此时应该是类似下面的状态

pandong@pan-deepin:~/Downloads$

$ tar -xavf linux-6.1.tar.xz -C . && cd linux-6.1/ && make mrproper && sudo su

#注意,第一个命令最后有一个 [ . ],代表解压到当前文件夹

$ cd linux-6.1/ && make mrproper #进入解压后的目录,净化(原因不知,照做)

$ sudo su #切换到root,此时应该是类似下面的状态,注意@后面的位置

root@pan-deepin:/home/pandong/Downloads/linux-6.1#

4、复制config文件,并进入内核配置,进入图形后参考

# cp /boot/config-5.15.45-amd64-desktop ./.config && make menuconfig

左右方向键,选择 Load,回车,回车,选择EXIT,回车,回车

#请自行修改内核版本号,我是5.15.45内核,输入的时候,只要输入前几个字母,TAB一下,会自动补全的,操作下就明白了

#简单无脑回车就行了

5、编译内核和模块,安装模块,打包驱动到initrd.img文件中,复制编译好的内核文件到/boot,最后一条命令不知道是啥,看样子有点像是内核初始化的内存地址

# make bzImage -j16 && make modules -j16 && make INSTALL_MOD_STRIP=1 modules_install && mkinitramfs /lib/modules/6.1.0-amd64-desktop/ -o /boot/initrd.img-6.1.0-amd64-desktop && cp arch/x86/boot/bzImage /boot/vmlinuz-6.1.0-amd64-desktop && cp System.map /boot/System.map-6.1.0-amd64-desktop

注意,请根据电脑CPU性能改变两个 -j16最后面的两个数字,16是16线程,可以4或者8等,数字大编译的快些,但不要超过CPU最大线程数,现在新CPU一般都有个12-16线程

6、更改一下grub.cfg的文件权限(可能不要也行,没试过),更新grub启动项

# chmod 777 /boot/grub/grub.cfg && update-grub2 && exit

恭喜,如果不出意外,这个时候重启进入系统后就可以看到是6.1.0的内核了

Reply Favorite View the author
All Replies
1 / 2
To page
安洛
deepin
2022-12-21 17:36
#1

不应该更改grub.cfg的文件权限。root用户应该有这个文件的修改权限的。

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-21 17:39
#2

秀儿,也可以直接从仓库中安装了:

sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

Reply View the author
MeowVing
deepin
2022-12-21 17:51
#3
babyfengfjx

秀儿,也可以直接从仓库中安装了:

sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

哇~这个是只是V23的源里有,还是20和23都有confused

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-21 17:51
#4
MeowVing

哇~这个是只是V23的源里有,还是20和23都有confused

都有的,不过这个只是个尝鲜版本,可能会有很多问题😄

Reply View the author
bluesky_
deepin
2022-12-21 18:30
#5

可以去试试xanmod的内核

Reply View the author
kzou
deepin
2022-12-21 22:20
#6
babyfengfjx

都有的,不过这个只是个尝鲜版本,可能会有很多问题😄

我在V20.8,看了下,没有6.1的内核啊

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-21 22:43
#7
kzou

我在V20.8,看了下,没有6.1的内核啊

sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 
Reply View the author
TSAC
deepin
2022-12-22 03:52
#8

尝鲜内核问题之一:rtl网卡无法使用。

编译安装了 https://gitee.com/lab37/aircrack_8812au

但控制中心还是看不到该网卡的无线连接😂

Reply View the author
MeowVing
deepin
2022-12-22 18:05
#9
babyfengfjx
sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

昨天试了一下这个命令,给我装了两个4.19的内核joy 还没法用

(20.8,未加入内测)

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-22 18:57
#10
MeowVing

昨天试了一下这个命令,给我装了两个4.19的内核joy 还没法用

(20.8,未加入内测)

😂 那就直接把后面的*补全,因为这个内核可能隔三差五的会更新版本(可以先search一下看看找不着的到):

sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

image.png

Reply View the author
MeowVing
deepin
2022-12-22 21:48
#11
babyfengfjx

😂 那就直接把后面的*补全,因为这个内核可能隔三差五的会更新版本(可以先search一下看看找不着的到):

sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

image.png

我明白了,要加内测joy

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-22 21:50
#12
MeowVing

我明白了,要加内测joy

加一个嘛~

Reply View the author
爱开发
deepin
2022-12-22 22:23
#13

并没有啊。。

deepin# apt install linux-image-6.1.0 linux-headers-6.1.0  


正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成       
E: 无法定位软件包 linux-image-6.1.0
E: 无法按照 glob ‘linux-image-6.1.0’ 找到任何软件包
E: 无法定位软件包 linux-headers-6.1.0
E: 无法按照 glob ‘linux-headers-6.1.0’ 找到任何软件包

目前正在按楼主的方式,安装 6.1.1。

官网下载太慢了,去阿里镜像那边下载:https://mirrors.aliyun.com/linux-kernel/v6.x/

Reply View the author
Amber
deepin
2022-12-23 02:40
#14
babyfengfjx

加一个嘛~

我为了下这个内核加内测了,请问一般内测不会出什么大的副作用吧(其实小问题我也能接受,因为不是生产力电脑,只要不一更新就把系统搞不开机就好)

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-12-23 17:39
#15
Amber

我为了下这个内核加内测了,请问一般内测不会出什么大的副作用吧(其实小问题我也能接受,因为不是生产力电脑,只要不一更新就把系统搞不开机就好)

  • 不会有太大副作用,最多是你说的不开机,哈哈~
  • 玩笑话,内测也是比较稳定的,只是会有一些小毛病,一般是不会影响日常使用的。
Reply View the author
Amber
deepin
2022-12-23 17:47
#16
babyfengfjx
  • 不会有太大副作用,最多是你说的不开机,哈哈~
  • 玩笑话,内测也是比较稳定的,只是会有一些小毛病,一般是不会影响日常使用的。

那我就放心啦!kissing_heart

Reply View the author
昨夜的星辰
deepin
2022-12-23 20:15
#17
babyfengfjx

秀儿,也可以直接从仓库中安装了:

sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

授人以鱼不如授人以渔

这样以后随便装哪个版本😄

Reply View the author
快乐飞翔
deepin
2023-01-13 05:34
#18
babyfengfjx

秀儿,也可以直接从仓库中安装了:

sudo apt update &&  sudo apt install linux-image-6.1.0 linux-headers-6.1.0 

能请教下吗?我是uos,直接执行提示无法定位软件包 linux-image-6.1.0,能告知软件源吗?

Reply View the author
babyfengfjx
Super Moderator
CQA
2023-01-13 17:23
#19
快乐飞翔

能请教下吗?我是uos,直接执行提示无法定位软件包 linux-image-6.1.0,能告知软件源吗?

UOS仓库没有该内核包,deepin也需要加内测源才行。

Reply View the author
快乐飞翔
deepin
2023-01-13 18:51
#20
babyfengfjx

UOS仓库没有该内核包,deepin也需要加内测源才行。

内测源要怎么加?我自己编译成功,但虚拟机无法使用,只能通过这种方式升级了。

Reply View the author
1 / 2
To page