| 
                        副标题[/!--empirenews.page--]
                        技术沙龙 | 8月25日与多位资深技术大咖探讨小程序电商实战
               
Ubuntu 中有许多实用程序可以将 Linux 内核升级到最新的稳定版本。我们之前已经写过关于这些实用程序的文章,例如 Linux  Kernel Utilities (LKU)、 Ubuntu Kernel Upgrade Utility (UKUU) 和 Ubunsys。 
另外还有一些其它实用程序可供使用。我们计划在其它文章中包含这些,例如 ubuntu-mainline-kernel.sh 和从主线内核手动安装的方式。 
今天我们还会教你类似的使用工具 —— UKTools。你可以尝试使用这些实用程序中的任何一个来将 Linux 内核升级至最新版本。 
最新的内核版本附带了安全漏洞修复和一些改进,因此,最好保持最新的内核版本以获得可靠、安全和更好的硬件性能。 
有时候最新的内核版本可能会有一些漏洞,并且会导致系统崩溃,这是你的风险。我建议你不要在生产环境中安装它。 
建议阅读: 
    - Linux 内核实用程序(LKU)- 在 Ubuntu/LinuxMint 中编译,安装和更新最新内核的一组 Shell 脚本
 
    - Ukuu - 在基于 Ubuntu 的系统中安装或升级 Linux 内核的简便方法
 
    - 6 种检查系统上正在运行的 Linux 内核版本的方法
 
 
什么是 UKTools
UKTools 意思是 Ubuntu 内核工具,它包含两个 shell 脚本 ukupgrade 和 ukpurge。 
ukupgrade 意思是 “Ubuntu Kernel Upgrade”,它允许用户将 Linux 内核升级到 Ubuntu/Mint 的最新稳定版本以及基于 kernel.ubuntu.com 的衍生版本。 
ukpurge 意思是 “Ubuntu Kernel Purge”,它允许用户在机器中删除旧的 Linux 内核镜像或头文件,用于 Ubuntu/Mint 和其衍生版本。它将只保留三个内核版本。 
此实用程序没有 GUI,但它看起来非常简单直接,因此,新手可以在没有任何问题的情况下进行升级。 
我正在运行 Ubuntu 17.10,目前的内核版本如下: 
$ uname -aLinux ubuntu 4.13.0-39-generic #44-Ubuntu SMP Thu Apr 5 14:25:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  
运行以下命令来获取系统上已安装内核的列表(Ubuntu 及其衍生产品)。目前我持有 7 个内核。 
$ dpkg --list | grep linux-imageii linux-image-4.13.0-16-generic 4.13.0-16.19 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-17-generic 4.13.0-17.20 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-32-generic 4.13.0-32.35 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-36-generic 4.13.0-36.40 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-37-generic 4.13.0-37.42 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-38-generic 4.13.0-38.43 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-4.13.0-39-generic 4.13.0-39.44 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-16-generic 4.13.0-16.19 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-17-generic 4.13.0-17.20 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-32-generic 4.13.0-32.35 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-36-generic 4.13.0-36.40 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-37-generic 4.13.0-37.42 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-38-generic 4.13.0-38.43 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-extra-4.13.0-39-generic 4.13.0-39.44 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMPii linux-image-generic 4.13.0.39.42 amd64 Generic Linux kernel image
  
如何安装 UKTools
在 Ubuntu 及其衍生产品上,只需运行以下命令来安装 UKTools 即可。 
在你的系统上运行以下命令来克隆 UKTools 仓库: 
$ git clone https://github.com/usbkey9/uktools
  
进入 uktools 目录: 
$ cd uktools
  
运行 Makefile 以生成必要的文件。此外,这将自动安装最新的可用内核。只需重新启动系统即可使用最新的内核。 
$ sudo make[sudo] password for daygeek:Creating the directories if neccessaryLinking profile.d file for reboot messageLinking files to global sbin directoryUbuntu Kernel Upgrade - by Mustafa Hasturk------------------------------------------This script is based on the work of Mustafa Hasturk and was reworked byCaio Oliveira and modified and fixed by Christoph Kepler-  
 Current Development and Maintenance by Christoph Kepler-  
 Do you want the Stable Release (if not sure, press y)? (y/n): yDo you want the Generic kernel? (y/n): yDo you want to autoremove old kernel? (y/n): yno crontab for rootDo you want to update the kernel automatically? (y/n): ySetup complete. Update the kernel right now? (y/n): yReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required: linux-headers-4.13.0-16 linux-headers-4.13.0-16-generic linux-headers-4.13.0-17 linux-headers-4.13.0-17-generic linux-headers-4.13.0-32 linux-headers-4.13.0-32-generic linux-headers-4.13.0-36 linux-headers-4.13.0-36-generic linux-headers-4.13.0-37 linux-headers-4.13.0-37-generic linux-image-4.13.0-16-generic linux-image-4.13.0-17-generic linux-image-4.13.0-32-generic linux-image-4.13.0-36-generic linux-image-4.13.0-37-generic linux-image-extra-4.13.0-16-generic linux-image-extra-4.13.0-17-generic linux-image-extra-4.13.0-32-generic linux-image-extra-4.13.0-36-generic linux-image-extra-4.13.0-37-genericUse 'sudo apt autoremove' to remove them.The following additional packages will be installed: lynx-commonThe following NEW packages will be installed: lynx lynx-common0 upgraded, 2 newly installed, 0 to remove and 71 not upgraded.Need to get 1,498 kB of archives.After this operation, 5,418 kB of additional disk space will be used.Get:1 http://in.archive.ubuntu.com/ubuntu artful/universe amd64 lynx-common all 2.8.9dev16-1 [873 kB]Get:2 http://in.archive.ubuntu.com/ubuntu artful/universe amd64 lynx amd64 2.8.9dev16-1 [625 kB]Fetched 1,498 kB in 12s (120 kB/s)Selecting previously unselected package lynx-common.(Reading database ... 441037 files and directories currently installed.)Preparing to unpack .../lynx-common_2.8.9dev16-1_all.deb ...Unpacking lynx-common (2.8.9dev16-1) ...Selecting previously unselected package lynx.Preparing to unpack .../lynx_2.8.9dev16-1_amd64.deb ...Unpacking lynx (2.8.9dev16-1) ...Processing triggers for mime-support (3.60ubuntu1) ...Processing triggers for doc-base (0.10.7) ...Processing 1 added doc-base file...Processing triggers for man-db (2.7.6.1-2) ...Setting up lynx-common (2.8.9dev16-1) ...Setting up lynx (2.8.9dev16-1) ...update-alternatives: using /usr/bin/lynx to provide /usr/bin/www-browser (www-browser) in auto mode-  
 Cleaning old downloads in /tmp-  
 Downloading the kernel's components...Checksum for linux-headers-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb succeedChecksum for linux-image-unsigned-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb succeedChecksum for linux-modules-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb succeed-  
 Downloading the shared kernel header...Checksum for linux-headers-4.16.7-041607_4.16.7-041607.201805021131_all.deb succeed-  
 Installing Kernel and Headers...Selecting previously unselected package linux-headers-4.16.7-041607.(Reading database ... 441141 files and directories currently installed.)Preparing to unpack .../linux-headers-4.16.7-041607_4.16.7-041607.201805021131_all.deb ...Unpacking linux-headers-4.16.7-041607 (4.16.7-041607.201805021131) ...Selecting previously unselected package linux-headers-4.16.7-041607-generic.Preparing to unpack .../linux-headers-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb ...Unpacking linux-headers-4.16.7-041607-generic (4.16.7-041607.201805021131) ...Selecting previously unselected package linux-image-unsigned-4.16.7-041607-generic.Preparing to unpack .../linux-image-unsigned-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb ...Unpacking linux-image-unsigned-4.16.7-041607-generic (4.16.7-041607.201805021131) ...Selecting previously unselected package linux-modules-4.16.7-041607-generic.Preparing to unpack .../linux-modules-4.16.7-041607-generic_4.16.7-041607.201805021131_amd64.deb ...Unpacking linux-modules-4.16.7-041607-generic (4.16.7-041607.201805021131) ...Setting up linux-headers-4.16.7-041607 (4.16.7-041607.201805021131) ...dpkg: dependency problems prevent configuration of linux-headers-4.16.7-041607-generic: linux-headers-4.16.7-041607-generic depends on libssl1.1 (>= 1.1.0); however: Package libssl1.1 is not installed.-  
 Setting up linux-modules-4.16.7-041607-generic (4.16.7-041607.201805021131) ...Setting up linux-image-unsigned-4.16.7-041607-generic (4.16.7-041607.201805021131) ...I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.13.0-39-genericI: /initrd.img.old is now a symlink to boot/initrd.img-4.13.0-39-genericI: /vmlinuz is now a symlink to boot/vmlinuz-4.16.7-041607-genericI: /initrd.img is now a symlink to boot/initrd.img-4.16.7-041607-genericProcessing triggers for linux-image-unsigned-4.16.7-041607-generic (4.16.7-041607.201805021131) .../etc/kernel/postinst.d/initramfs-tools:update-initramfs: Generating /boot/initrd.img-4.16.7-041607-generic/etc/kernel/postinst.d/zz-update-grub:Generating grub configuration file ...Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.Found linux image: /boot/vmlinuz-4.16.7-041607-genericFound initrd image: /boot/initrd.img-4.16.7-041607-genericFound linux image: /boot/vmlinuz-4.13.0-39-genericFound initrd image: /boot/initrd.img-4.13.0-39-genericFound linux image: /boot/vmlinuz-4.13.0-38-genericFound initrd image: /boot/initrd.img-4.13.0-38-genericFound linux image: /boot/vmlinuz-4.13.0-37-genericFound initrd image: /boot/initrd.img-4.13.0-37-genericFound linux image: /boot/vmlinuz-4.13.0-36-genericFound initrd image: /boot/initrd.img-4.13.0-36-genericFound linux image: /boot/vmlinuz-4.13.0-32-genericFound initrd image: /boot/initrd.img-4.13.0-32-genericFound linux image: /boot/vmlinuz-4.13.0-17-genericFound initrd image: /boot/initrd.img-4.13.0-17-genericFound linux image: /boot/vmlinuz-4.13.0-16-genericFound initrd image: /boot/initrd.img-4.13.0-16-genericFound memtest86+ image: /boot/memtest86+.elfFound memtest86+ image: /boot/memtest86+.bindone-  
 Thanks for using this script! Hope it helped.Give it a star: https://github.com/MarauderXtreme/uktools
  
                        (编辑:泰州站长网) 
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! 
                     |