如何添加主线内核 PPA?

5个回答

注意:测试/调试内核版本比您的默认内核版本更高,例如3.3、3.4、3.5等,仅通过deb文件提供,而不是通过此PPA提供。
您可能希望 添加此PPA - 这是内核团队维护的唯一活跃PPA,其中包含每个版本的最新预提议内核。
ppa:kernel-ppa/pre-proposed

谢谢,我其实以为它们是由上面的ppa提供的。是的,我正在寻找最新的3.5内核。 - Paulo Matos
1@PauloJ.Matos :你可以在这里找到最新的3.5版本所需的deb文件:链接 - ish
@PauloJ.Matos 或者你可以通过PPA安装3.5版本。http://ubuntuguide.net/install-kernel-3-5-rc-ubuntu-12-04-precise-using-ppa 我必须承认我不知道哪个是正确的来源 - 这个PPA还是izx评论中的debs。我使用了PPA,只安装了在更新管理器中提到内核的更新条目,然后重新启动并通过Y PPA Manager禁用了PPA,以避免安装PPA(xorg edgers)中的其他任何东西。 - Bucic
1@Bucic:这些deb包来自Ubuntu的内核团队,而你的PPA来自第三方(xorg-edgers)。我会相信前者胜过后者 :) - ish
1@izx 这不像是一个无人知晓的糟糕团体,你懂的 ;) 但我同意。除非你遇到当前内核的问题,否则不建议升级到主线内核,但如果你升级到主线内核,最好是通过 Ubuntu 团队进行 :) - Bucic
15这个PPA似乎已经被放弃了。"软件包数量:0个源代码软件包(0字节)0个二进制软件包(0字节)"。只剩下http://kernel.ubuntu.com/~kernel-ppa/mainline/页面,但是我不想安装未经身份验证的软件包。它不是HTTPS,并且构建过程中没有GPG签名。对我来说行不通。 - gertvdijk
@gertvdijk 你写这篇文章之后可能有所改变,但是kernel.ubuntu.com上的构建文件的校验和文件是经过gpg签名的。虽然这并不完美,但如果你能够破解一个文件的SHA256和SHA1,那么你可能拥有足够的计算能力来中间人攻击SSL连接。只要你足够细心检查,它就是安全的。 - Oli
@Oli 啊,这绝对是新的。之前没有CHECKSUMS / CHECKSUMS.gpg。太棒了 :) - gertvdijk
我建议使用 ppa:canonical-kernel-team/unstable PPA — 它跟踪主线并可能包含 Ubuntu 特定的优化和后移,并且它是一个会自动更新您的安装的 PPA。请注意 "unstable" 标签,尽管对于 Ubuntu 来说,“mainline”已经被认为是不稳定的。 - Guss

据我所知,无法将其添加到/etc/apt/sources.list文件中。 有一个脚本可以完成这项工作 https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater 终端命令:(编辑,更多最新信息现在在上面链接的自述文件中)
cd /tmp
git clone git://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater
bash Ubuntu-Mainline-Kernel-Updater/install

登录后将在60秒内检查更新,您可以随时运行KernelUpdateChecker来检查更新。 使用-h--help获取帮助输出。

ukuu不再是免费和开放的,但mainline仍在维护并且是免费和开放的。https://github.com/bkw777/mainline
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

你可以使用Ukuu(代表“Ubuntu内核更新工具”)这个简单的桌面应用程序帮助你在Ubuntu、Linux Mint和其他基于Ubuntu的发行版上安装新的内核,使用由Canonical发布的“主线”内核。

安装:

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update && sudo apt-get install ukuu

然后从您的应用程序启动器中运行“ukuu”,它将显示所有可供选择的稳定内核。如果您想要不稳定的rc内核,可以在设置中禁用“隐藏不稳定和RC版本”标志。

/*tested code already , 
whipped this right up hope it works for you, it downloads the latest kernel from the daily mainline , 
and checks if its on your sys if not installs it 
tested and working :) simply compile as anything .c with your gcc
download at : [here](http://ubuntuone.com/0mLWYLhGPJlHGFXONz6EcO)
*/
//code below ----------------------
// it doesn’t show the imports so put them as comments to the side for who ever just does 
// copy paste 
#include <stdio.h> //stdio.h
#include <stdlib.h> //stdlib.h
#include <string.h> //string.h

void getpage(void)
{
system("mkdir ./kup;cd ./kup;wget http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/;cat ./index.html|grep -i deb|grep -i linux>>./list;cd ./..");
printf("\n\nwhich archetype would u like to grab \n1: 32 bit\n2: 64bit\n(1/2 1 is default) : ");
char c;
system("uname -i>>./kup/p");
FILE* arch=fopen("./kup/p","r");
c=fgetc(arch);
if(c!='a'){
c=1;}
if(c=='a'){c=2;}
if(c=='2'){
system("cd ./kup;cat ./list|grep -i amd64 >> ./list2;cd ./..");
}
else{
system("cd ./kup;cat ./list|grep -i i386 >> ./list2;cd ./..");
}

system("cd ./kup;cat ./list|grep -i _all >> ./list2;rm -rf ./list;rm -rf ./index.html;cd ./..");

}

int install(void){
printf("\nnow getting ready to check the current kernel install the newest kernel if newer\npress anybtton to continue or q to quit\n");
char c;
c='\n';
if(c=='q'){return 0;}else{
system("dir ./kup>>./kup/test");
char *t=malloc(sizeof(char)*256);
t[0]='d';
t[1]='p';
t[2]='k';
t[3]='g';
t[4]=' ';
t[5]='-';
t[6]='l';
t[7]='|';
t[8]='g';
t[9]='r';
t[10]='e';
t[11]='p';
t[12]=' ';
t[13]='-';
t[14]='i';
t[15]=' ';
int tn=16;
FILE* f2 = fopen("./kup/test","r");
char c;
c=fgetc(f2);
while(c!='_'){
t[tn]=c;
tn++;
c=fgetc(f2);
}

t[tn]='>';
tn++;
t[tn]='>';
tn++;
t[tn]='.';
tn++;
t[tn]='/';
tn++;
t[tn]='k';
tn++;
t[tn]='u';
tn++;
t[tn]='p';
tn++;
t[tn]='/';
tn++;
t[tn]='a';
system(t);
FILE *f3 =fopen("./kup/a","r");

char check;
check = fgetc(f3);
printf("\"%c\"",check);
if(check !='i'){
printf("\nthere is a newer version , press enter key to update\n");
system("sudo dpkg -i ./kup/*deb;rm -rf ./kup;sudo update-grub;");
return 0;
}else{printf("\nyour system is up to date\n\n exiting \n");}
system("rm -rf ./kup");
return 0;
}
}

void download(char* url)
{
char *com=malloc(sizeof(char)*256);
com[0]='c';
com[1]='d';
com[2]=' ';
com[3]='k';
com[4]='u';
com[5]='p';
com[6]=';';
com[7]='w';
com[8]='g';
com[9]='e';
com[10]='t';
com[11]=' ';
int i=12;
int l =1;
while(l==1)
{
com[i]=url[i-12];
if(com[i]=='b'&&com[i-1]=='e'&&com[i-2]=='d'&&com[i-3]=='.'){
l=0;
}
i++;
}
system("rm -rf ./kup/list2;");
system(com);

}

void getkernel(void){
char links[3][256];
//start writing//
links[0][0]='k';
links[0][1]='e';
links[0][2]='r';
links[0][3]='n';
links[0][4]='e';
links[0][5]='l';
links[0][6]='.';
links[0][7]='u';
links[0][8]='b';
links[0][9]='u';
links[0][10]='n';
links[0][11]='t';
links[0][12]='u';
links[0][13]='.';
links[0][14]='c';
links[0][15]='o';
links[0][16]='m';
links[0][17]='/';
links[0][18]='~';
links[0][19]='k';
links[0][20]='e';
links[0][21]='r';
links[0][22]='n';
links[0][23]='e';
links[0][24]='l';
links[0][25]='-';
links[0][26]='p';
links[0][27]='p';
links[0][28]='a';
links[0][29]='/';
links[0][30]='m';
links[0][31]='a';
links[0][32]='i';
links[0][33]='n';
links[0][34]='l';
links[0][35]='i';
links[0][36]='n';
links[0][37]='e';
links[0][38]='/';
links[0][39]='d';
links[0][40]='a';
links[0][41]='i';
links[0][42]='l';
links[0][43]='y';
links[0][44]='/';
links[0][45]='c';
links[0][46]='u';
links[0][47]='r';
links[0][48]='r';
links[0][49]='e';
links[0][50]='n';
links[0][51]='t';
links[0][52]='/';
//done writing//
char c[5];
int l=1;
FILE* file = fopen("./kup/list2","r");
c[0]=fgetc(file);
while(c[0]!=EOF && l ==1)
{
int u=0;
if(c[0]=='h'){
c[1]=fgetc(file);
if(c[1]=='r'){
c[2]=fgetc(file);
if(c[2]=='e'){
c[3]=fgetc(file);
if(c[3]=='f'){
c[4]=fgetc(file);
c[4]=fgetc(file);
int i=53;
c[4]=fgetc(file);
while(c[4]!='\"'){
links[u][i]=c[4];
i++;
c[4]=fgetc(file);
}

download(links[0]);
u++;
if(u==3){
c[0]=EOF;
l=0;
}
}
}
}
}
c[0]=fgetc(file);
}

}

int main(void)
{
getpage();
getkernel();
install();
}

它会检查当前的每日构建版本,如果你的Ubuntu内核主线版本没有更新,则会更新为已经清理过的版本。无需用户输入,它会自动检测你当前内核的架构(32位或64位)。请点击此链接:http://ubuntuone.com/0mLWYLhGPJlHGFXONz6EcO - user183601
好的,我在我的Ubuntu One上发布了一个链接,并在这里更改了代码并添加了<br>标签。 - user183601
谢谢,正如您所看到的,我是这个网站的新手,已经提供了答案和代码,并正在添加。 - user183601
更新:在链接中将其更改为使用uname -v而不是uname -r来检查与此最新更新中的其他更新是否升级了其他更新,所以现在它会:))在那部分修复了它:)并且如果您正在运行Ubuntu 13.04 32位版本,我认为它可能是兼容的,请从以下网址获取二进制文件: http://ubuntuone.com/3cwJte3KtfNNnGcrMcnl6B - user183601
11为什么这是一个调用system(3)的C程序,而不是一个shell脚本呢?O_o - liyang
@liyang 为了最大程度地提高可读性?我其实也在想同样的问题,我对找到这个答案感到困惑。 - xolox