• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

mtompkins/linux-kernel-utilities: Utilities to compile and / or update linux ker ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mtompkins/linux-kernel-utilities

开源软件地址(OpenSource Url):

https://github.com/mtompkins/linux-kernel-utilities

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

External Build Status Issue Count Linux Logo

Linux Kernel Utilities


Descriptions

Compile a kernel from source: compile_linux_kernel.sh

For use with Debian and derivatives (e.g. Ubuntu, LinuxMint, etc.)

Bash script that will scrape http://www.kernel.org for available kernels and present the user with a GUI for manually selecting options. This script will also check the downloaded archive against the PGP signature file.

Note: The user MUST save a configuration from the GUI even if defaults are used.
The configuration routine will pull the current machine's configuration in to the utility as a base.


Download precompiled Ubuntu kernel: update_ubuntu_kernel.sh

Bash script that will scrape https://kernel.ubuntu.com for available precompiled kernels and present the user with a menu for selection. It is set to currently filter for kernels at v5. Both generic and lowlatency choices are provided.

This is intended explicitly for Ubuntu and derivatives like LinuxMint.


Remove all inactive kernels: remove_old_kernels.sh

Bash script that will purge ALL inactive kernels.

This may not be prudent for some as this will leave no default / backup safety kernel. The only kernel that will remain is the currently loaded version. It is highly recommended that a reboot be performed before executing this script.


Installation

Download and enable scripts wtih git

git clone https://github.com/mtompkins/linux-kernel-utilities.git
cd linux-kernel-utilities
chmod 750 *.sh

Usage

Compilation

To compile a kernel with manual version selection

./compile_linux_kernel.sh

To compile the latest kernel available

./compile_linux_kernel.sh --latest

To compile a kernel from a local archive file

./compile_linux_kernel.sh --archive=linux-4.5.2.tar.xz

To compile the latest kernel automagically using a profile

./compile_linux_kernel.sh --profile=zeus

Precompiled Ubuntu (and derivatives)

To download and install a precompiled Ubuntu kernel from kernel.ubuntu.com

./update_ubuntu_kernel.sh

To download and install the latest precompiled Ubuntu kernel from kernel.ubuntu.com

./update_ubuntu_kernel.sh --latest

Removal of inactive kernels

To remove ALL inactive kernels (i.e. all kernels other than the currently loaded instance)

./remove_old_kernels.sh

Notes

Do not run the scripts with sudo. They will prompt for elevated privileges if necessary.

The script will detect remote usage and execute QT or NCURSES accordingly.

Some older kernels (e.g. 3.x) require earlier versions of QT. If you are building v3.x kernels you should manually install QT4 before compiling. The script is set to install QT5 if missing.

Kernel Source Preservation

When installing a compiled kernel, links are created to the kernel source so that DKMS will function correctly. Therefore, you should take care not to delete the Build_xxxx folders after installation. If you compile a newer release and remove an older kernel using dpkg -r, it is then safe to delete the entire directory of the removed kernel version.

CI & Unit Testing

Internal: Gitlab & Gitlab CI
External: Github & Travis CI
BATS

TIPS

  • You can set RC_FILTER to control whether Release Candidates are offered as a choice.
  • Enlarge your terminal window before executing the scripts to make sure proper formatting of available choices.
  • Multicore thread compiling is set automatically to twice the amount of detected cores.
  • Consider temporarily increasing grub menu timeouts and / or unhiding in case the new kernel is problematic.

CRISIS - cannot boot properly after new kernel is installed

  • If all else fails and a new kernel prevents you from booting you can:
    • Boot to a linux based LiveCD (e.g. GParted on a USB)

    • Open Terminal

    • Mount the partition: sudo mount /dev/sdXY /mnt
      where sdXY is likely your sda1

    • Mount some special partitions:
      sudo mount --bind /dev /mnt/dev
      sudo mount --bind /proc /mnt/proc
      sudo mount --bind /sys /mnt/sys

    • Chroot into /mnt:
      sudo chroot /mnt

    • Remove the kernel packages you just installed
      dpkg -r yourRecentKernels

    • They must be removed in a non-dependency order, so just take your time.

    • dpkg --list | grep "ii[[:space:]][[:space:]]linux-[f,h,i,l]"
      will help list your installs




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PureSwift/BluetoothLinux: Pure Swift Linux Bluetooth Stack发布时间:2022-08-15
下一篇:
maxcom/lorsource: Linux.org.ru website engine发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap