{"id":294377,"date":"2024-11-15T20:05:25","date_gmt":"2024-11-15T12:05:25","guid":{"rendered":"https:\/\/lrxjmw.cn\/rhzfwqsaztdb.html"},"modified":"2024-11-15T20:05:25","modified_gmt":"2024-11-15T12:05:25","slug":"rhzfwqsaztdb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhzfwqsaztdb.html","title":{"rendered":"\u5982\u4f55\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684 Linux Kernel \u5e76\u907f\u514d\u7cfb\u7edf\u4e0d\u7a33\u5b9a"},"content":{"rendered":"

\u5e8f\u8a00<\/p>\n

\u8fd1\u6765\u987b\u8981\u5bf9\u670d\u52a1\u5668\u7684Linux<\/a>\u5185\u6838\u7248\u672c\u8fdb\u884c\u8c03\u6574\u4ee5\u5b89\u88c5\u7279\u5b9a\u8f6f\u4ef6\uff0c\u65e0\u5948\u7684\u662f\u8be5\u8f6f\u4ef6\u652f\u6301\u7684Kernel\u7248\u672c\u662f\u7279\u5b9a\u7684\uff0c\u5047\u5982\u624b\u52a8\u66f4\u65b0LinuxKernel\uff0c\u7248\u672c\u90fd\u4f1a\u8d85\u8fc7\u5176\u652f\u6301\u8303\u56f4linux kernel\u7248\u672c<\/strong>\uff0c\u88ab\u8feb\u53ea\u5f97\u6309\u7167\u5176\u652f\u6301\u8303\u56f4\u5b89\u88c5LinuxKernel\u3002<\/p>\n

LinuxKernel\u5f71\u54cd\u5f88\u5927\uff0c\u964d\u7ea7\u5f88\u53ef\u80fd\u5bfc\u81f4\u7cfb\u7edf\u4e0d\u7a33\u5b9a\uff0c\u6709\u80fd\u529b\u7684\u670b\u53cb\u6700\u597d\u53bb\u9524\u8f6f\u4ef6\u63d0\u4f9b\u65b9\u3002<\/p>\n

\u672c\u6587\u4e2d\u5982\u4e0d\u63d0\u9192\uff0c\u90fd\u662f\u4ee5root\u8eab\u5206\u8fdb\u884c\u64cd\u4f5c\uff0c\u7701\u53bb\u6bcf\u6b21sudo\u7684\u5de5\u4f5c\u4e86\u3002\u53ef\u4ee5\u901a\u8fc7sudosu\u83b7\u5f97root\u8eab\u5206\u3002<\/p>\n

\u6b63\u6587\u68c0\u6d4b\u5df2\u5b89\u88c5\u5185\u6838<\/p>\n

\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5185\u6838\u7248\u672c\uff1a<\/p>\n

\n

dpkg --get-selections |grep linux-image<\/code><\/pre>\n<\/p>\n

\u82e5\u679c\u51fa\u73b0\u6709\u7684\u5185\u6838\u65c1\u8fb9\u662fdeinstall,\u610f\u601d\u662f<\/p>\n

thepackageisselectedforde-installationorremoval(i.e.wewanttoremoveallfiles,exceptconfigurationfiles).<\/p>\n

\u7248\u672ct0_linux kernel\u7248\u672c_\u7248\u672c\u82f1\u6587<\/p>\n

--apt-dpkg--get-selectionsshowspackagesmarked\"deinstall\"-AskUbuntu<\/p>\n

\u67e5\u770bGRUB\u542f\u52a8\u9879\u4e2d\u5185\u6838\u7248\u672c\uff1a<\/p>\n

\n

grep 'menuentry |submenu ' \/boot\/grub\/grub.cfg | cut -f2 -d \"'\"<\/code><\/pre>\n<\/p>\n

\u5b89\u88c5\u65e7\u5185\u6838\u5931\u8d25\u5c1d\u8bd51<\/p>\n

\u53c2\u8003\u4e86<\/p>\n

apt-HowdoIinstallanoldkernel?-AskUbuntu<\/p>\n

\u6b65\u5165\u8be5\u94fe\u63a5~kernel-ppa\/mainline\/<\/p>\n

\u7136\u800c\u9057\u61be\u7684\u662f\uff0c\u6211\u8981\u5b89\u88c5\u76845.4.0-84\u5e76\u6ca1\u6709\u627e\u5230\uff0c\u8fd9\u513f\u67095.4.80,5.4.85,5.4.0\u4e2d\u867d\u7136\u4e5f\u6ca1\u6709-84\uff0c\u4e5f\u53ef\u80fd\u662f\u6211\u4e0d\u4e86\u89e3\u76f8\u5173\u7684\u547d\u540d\u4e60\u60ef\uff0c\u5728\u6b64\u7f62\u624b\u3002<\/p>\n

\u5c1d\u8bd52\uff08\u6210\u529f\uff09<\/p>\n

\u53c8\u627e\u5230\u4e86\u4e00\u4e2a\u6bd4\u8f83\u8001\u7684\u94fe\u63a5\uff0c\u66f4\u7b80\u5355\uff0c\u5c31\u662fubuntu\u7684aptinstall\u5373\u53ef\u3002<\/p>\n

InstallandBootanOlderKernelinUbuntu<\/p>\n

\u4e4b\u540e\u8fd8\u5076\u7136\u542c\u5230\u4e86\u8fd9\u4e2a\u94fe\u63a5\uff0c\u5176\u5b9e\u662f\u7528\u524d\u9762\u7684\u65b9\u5f0f\u51fa\u4e86\u95ee\u9898\uff0c\u7f51\u8def\u84dd\u7259\u9002\u914d\u5668\u90fd\u65e0\u4e86\u3002<\/p>\n

drivers-Installedolderkernelin20.04butwireless,bluetoothandethernetadaptersaremissing-AskUbuntu<\/p>\n

\u7248\u672ct0_linux kernel\u7248\u672c_\u7248\u672c\u82f1\u6587<\/p>\n

\u7efc\u5408\u4e24\u4e2a\u8054\u63a5\uff0c\u5b89\u88c5\u547d\u4ee4<\/a>\u4e3a<\/p>\n

\n

apt install linux-image-5.4.0-84-generic linux-headers-5.4.0-84-generic linux-modules-extra-5.4.0-84-generic\n<\/code><\/pre>\n<\/p>\n

\u5b89\u88c5\u5f88\u987a\u5229\uff0c\u6ca1\u6709\u62a5\u9519\u3002\u4e0b\u4e00\u6b65\u662f\u8bbe\u7f6eGrub\u7684\u542f\u52a8\u9879\u3002<\/p>\n

\u9996\u5148\u67e5\u770bEntry\uff1a<\/p>\n

\n

grep submenu \/boot\/grub\/grub.cfg<\/code><\/pre>\n<\/p>\n

\n

grep gnulinux \/boot\/grub\/grub.cfg<\/code><\/pre>\n<\/p>\n

\u7248\u672ct0_\u7248\u672c\u82f1\u6587_linux kernel\u7248\u672c<\/p>\n

linux kernel\u7248\u672c_\u7248\u672ct0_\u7248\u672c\u82f1\u6587<\/p>\n

\u6211\u7684\u73af\u5883\u4e0b\u8f93\u51fa\u7684\u5185\u5bb9\u5982\u56fe\u6240\u793a\u3002<\/p>\n

\u4e4b\u540e\u6309\u7167\u8f93\u51fa\uff0c\u66f4\u6539`\/etc\/default\/grub`\uff0c\u4e2d\u7684\u9ed8\u8ba4\u542f\u52a8\u9879\u3002<\/p>\n

\n

vim \/etc\/default\/grub<\/code><\/pre>\n<\/p>\n

\u66f4\u6539\u540e\u7684GRUB_DEFAULT\u5927\u7ea6\u7c7b\u4f3c\u4e0b\u8fb9\u8fd9\u6837\u3002<\/p>\n

\n

GRUB_DEFAULT=\"gnulinux-advanced-dc2515a0-8714-42c7-825a-ec047c6cfd6e>gnulinux-5.4.0-58-generic-advanced-dc2515a0-8714-42c7-825a-ec047c6cfd6e\"<\/code><\/pre>\n<\/p>\n

\u8fd9\u513f\u8fd8\u53ef\u4ee5\u66f4\u6539\u4e00\u4e0bGRUB_TIMEOUT\uff0c\u7531\u4e8e\u6211\u7684\u73af\u5883\u662f\u670d\u52a1\u5668\uff0c\u91cd\u542f\u987b\u8981\u8bb8\u4e45\uff0c\u6240\u4ee5\u5c31\u542f\u52a8kernel\u9009\u62e9\u540c\u65f6\u8bbe\u7f6e\u7b49\u5f85\u65f6\u95f4\u957f\u4e00\u4e9b\u4ee5\u514d\u4e0d\u7559\u795e\u9519\u8fc7\u4e86\u9009\u62e9\u3002\u5177\u4f53\u5c31\u662f\u628aSTYLE\u4ecehidden\u6539\u6210menu\uff0c\u65f6\u95f4\u9ed8\u8ba4\u5e94\u5f53\u662f0\uff0c-1\u7684\u8bdd\u662f\u7b49\u5f85\u9009\u62e9linux\u64cd\u4f5c\u7cfb\u7edf\u597d\u5417\uff0c\u5176\u4ed6\u6570\u5b57\u5c31\u662f\u79d2\u6570\u4e86\u3002<\/p>\n

\n

GRUB_TIMEOUT_STYLE=menu\nGRUB_TIMEOUT=30\n

\u7248\u672ct0_linux kernel\u7248\u672c_\u7248\u672c\u82f1\u6587<\/p>\n<\/code><\/pre>\n<\/p>\n

\u4e4b\u540e\u6267\u884c\u547d\u4ee4<\/p>\n

\n

update-grub<\/code><\/pre>\n<\/p>\n

\u7248\u672ct0_\u7248\u672c\u82f1\u6587_linux kernel\u7248\u672c<\/p>\n

\u4e4b\u540e\u5c31\u8981\u91cd\u542f\u673a\u5668\u4e86\u3002\u91cd\u542f\u673a\u5668\u540e\uff0c\u5185\u6838\u65e9\u5df2\u964d\u7ea7\u5230\u4e86\u6307\u5b9a\u7248\u672c\u3002\u8fd9\u513f\u6709\u4e00\u4e2a\u987b\u8981\u6ce8\u610f\u7684\u70b9\uff0cGRUB\u6587\u4ef6\u4e2d\uff0cDEFAULT\u524d\u9762\u7684\u5185\u5bb9\u7531\u4e8e\u662f\u4e24\u5c42linux kernel\u7248\u672c<\/strong>\uff0c\u6240\u4ee5\u8981\u6ce8\u610f\u8054\u63a5\u4e24\u5c42\u7684>\uff0c\u524d\u540e\u4e0d\u80fd\u6709\u7a7a\u683clinux\u516c\u793e\uff0c\u5426\u5219\u5c31\u624b\u52a8\u8fdb\u4e86\u7b2c\u4e8c\u5c42\u7684\u7b2c\u4e00\u4e2a\u542f\u52a8\u9009\u9879\u4e86\u3002<\/p>\n

\u91cd\u542f\u6210\u529f\u540e\uff0c\u7528MobaXterm\u8fdb\u884cSSH\u8054\u63a5\u53ef\u4ee5\u770b\u89c1\u91cc\u9762\u7684\u63d0\u793a\u8bed\u3002\u964d\u7ea7\u6210\u529f\u3002\u6216\u5219\u7528uname-a\u9a8c\u8bc1\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5f71\u54cd\u5f88\u5927\uff0c\u964d\u7ea7\u5f88\u53ef\u80fd\u9020\u6210\u7cfb\u7edf\u4e0d\u7a33\u5b9a\uff0c\u6709\u80fd\u529b\u7684\u540c\u5b66\u6700\u597d\u53bb\u9524\u8f6f\u4ef6\u63d0\u4f9b\u65b9\u3002\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5185\u6838\u7248\u672c\uff1a\uff0c\u56e0\u4e3a\u6211\u7684\u73af\u5883\u662f\u670d\u52a1\u5668\uff0c\u91cd\u542f\u9700\u8981\u5f88\u4e45\uff0c\u6240\u4ee5\u5c31\u542f\u52a8kernel\u9009\u62e9\u540c\u65f6\u8bbe\u7f6e\u7b49\u5f85\u65f6\u95f4\u957f\u4e00\u4e9b\u4ee5\u514d\u4e0d\u5c0f\u5fc3\u9519\u8fc7\u4e86\u9009\u62e9\u3002\u91cd\u542f\u673a\u5668\u540e\uff0c\u5185\u6838\u5df2\u7ecf\u964d\u7ea7\u5230\u4e86\u6307\u5b9a\u7248\u672c\u3002\uff0c\u524d\u540e\u4e0d\u80fd\u6709\u7a7a\u683c\uff0c\u5426\u5219\u5c31\u81ea\u52a8\u8fdb\u4e86\u7b2c\u4e8c\u5c42\u7684\u7b2c\u4e00\u4e2a\u542f\u52a8\u9009\u9879\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":294378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[2972,2971,1436,1888],"class_list":["post-294377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-zm-3","tag-sz-7","tag-wb","tag-fh"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=294377"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294377\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/294378"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=294377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=294377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=294377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}