AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1142488
Accepted
Guerlando OCs
Guerlando OCs
Asked: 2019-05-12 12:49:02 +0800 CST2019-05-12 12:49:02 +0800 CST 2019-05-12 12:49:02 +0800 CST

如何安全下载新内核?

  • 772

我想为我的 ubuntu 测试一个新内核。我想要最新的稳定内核。我怎样才能安全地做到这一点?也就是说,没有http下载。

updates kernel
  • 2 2 个回答
  • 892 Views

2 个回答

  • Voted
  1. Budget Tech
    2019-05-15T18:48:10+08:002019-05-15T18:48:10+08:00

    您可以在https://kernel.ubuntu.com/~kernel-ppa/mainline/下载最新版本的内核就绪形式的 Ubuntu

    然后使用

    sudo dpkg --install *.deb

    安装它

    • 7
  2. Best Answer
    WinEunuuchs2Unix
    2019-05-20T09:10:07+08:002019-05-20T09:10:07+08:00

    介绍

    问题的关键是如何安全地做到这一点。我将这个答案分为四个部分:

    • 如何找到最新的主线稳定 Ubuntu 内核
    • 如何下载内核和校验和文件
    • 如何验证校验和
    • 如何安装新内核

    如何找到最新的主线稳定 Ubuntu 内核

    转到https://kernel.ubuntu.com/~kernel-ppa/mainline并单击两次修改日期。第一次按日期升序排序,第二次降序排序。您最新的内核将位于顶部:

    主线内核 1.png

    我对4.14.120哪个是五年的 LTS(长期支持)内核感兴趣。我将单击它并转到下一部分:


    如何下载内核和校验和文件

    主线内核2.png

    我选择了通用包进行下载:

    linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
    linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    

    进一步向下滚动,您将找到CHECKSUM保证发布的内容是您实际收到的文件的文件:

    CHECKSUMS       2019-05-16 21:34    9.0K     
    CHECKSUMS.gpg   2019-05-16 21:34    473     
    

    单击两个校验和以下载它们并进入下一部分。


    如何验证校验和

    下载校验和链接后,请按照以下说明操作:

    验证主线构建二进制文件

    为了允许验证发布的构建是由主线构建系统生成的,对各个文件进行校验和,并将结果作为 CHECKSUMS 发布在同一目录中。该文件又由主线构建器使用下面的 GPG 密钥签名,该密钥可以从 Ubuntu 密钥服务器获得:

    pub 2048R/17C622B0 2008-05-01 密钥指纹 = 60AA 7B6F 3043 4AE6 8E56 9963 E50C 6A09 17C6 22B0 uid 内核 PPA

    可以通过运行以下命令来完成验证:

    Import the above public key to your keyring (if you haven't already done that):
    
    $ gpg --keyserver hkps://pgp.mit.edu --recv-key "60AA7B6F30434AE68E569963E50C6A0917C622B0"
    
    Download the CHECKSUMS and CHECKSUMS.gpg files from the build directory and verify if the CHECKSUMS is signed with the above key:
    
    $ gpg --verify CHECKSUMS.gpg CHECKSUMS
    gpg: Signature made .... using RSA key ID 17C622B0
    gpg: Good signature from "Kernel PPA <[email protected]>"
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    
    Verify the checksums of downloaded deb files:
    
    $ shasum -c CHECKSUMS 2>&1 | grep 'OK$'
    
    You should get a line ending with "OK" for each of downloaded deb file and each type of checksums that are given in the CHECKSUMS file.
    

    我编辑了CHECKSUMS文件并删除了不相关的内核(ARM、S390、低延迟、Power PC 和 32 位),只留下上面下载的文件的校验和:

    # Checksums for v4.14.120, check with the command below:
    #     shasum -c CHECKSUMS
    #
    # Checksums-Sha1:
    b26b07d9ae2dcf25648dab3fe2374f6a2df219d1  COMMIT
    44d09220f11394adb7067a79ce1693ed8e6e149e  linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
    4cea2a7041ddf2655426f9fc4a57c39d0b6e02b8  linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    24ae91d3d812ef2fec4527f5d2acd5d089c27cb1  linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    194fbaae734d33ba26ec1bb631f59b1c01740a3d  linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    
    #
    # Checksums-Sha256:
    c253adc68879d07caffca5037ca997d7d2c7b74e87073093566c33e7a6a517e8  COMMIT
    bf32ef3ee0b410f9264f1b6dd2349c5753ba73d02b5977d49010120ac6f1e7aa  linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
    4f769f431f99cadb4c564d0da4c6231a2c593307c10c520f81b74834a6149b28  linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    b18a6163ec0a42a598795cb181dcde86d0c59e9b9b117a1b9e5d7186e967b59a  linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    8aa8790171b9e948f2d5b0ce8c54a81d2b2bfb9d33ead499d865f841497fcabc  linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
    

    注意:由于某种原因,CHECKSUMS文件打开而不是下载。我不得不将文本复制并粘贴到手动创建的文件CHECKSUMS中。


    如何安装新内核

    假设校验和验证通过更改到您的下载目录并安装:

    cd ~/Downloads        # Go to our downloads directory
    sudo dpkg -i *.deb    # Install all four kernel .deb files downloaded
    rm -f *.deb           # Clean up so we don't accidentally install next time around
    reboot                # reboot to grub and select new kernel on Advanced Options
    

    注意不要键入#那些用于解释目的的注释,机器会忽略它们。

    • 6

相关问题

  • 使用 apt-get upgrade 时如何强制安装内核更新?

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • iPod Touch (iPhone) 的固件更新?

  • 如何让 Ubuntu 减少检查更新的频率?对于 11.04 及更高版本对于赶时间的人!通过 Ubuntu 软件中心

  • 如何启用自动更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve