Giter Site home page Giter Site logo

dereckysany / kernel-installer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmiland/kernel-installer

0.0 0.0 0.0 877 KB

Script to install the Linux kernel from source on Debian-based distributions, for all architectures.

License: MIT License

Shell 100.00%

kernel-installer's Introduction

kernel-installer

Automatic install script for The Linux kernel

Inspired by LinuxKernelBuild

GitHub release licence Bash

Script to install the latest [stable/mainline/longterm] kernel from source on Debian-based distributions, for all architectures.

kernel-installer Image

Dependencies

Will be installed when running script.

wget curl git rsync fakeroot build-essential ncurses-dev xz-utils libssl-dev bc liblz4-tool paxctl libelf-dev flex bison

Download the script:

Quick install with default options:

With Curl:

curl -sSL https://github.com/tmiland/kernel-installer/raw/main/kernel_installer.sh | bash || exit 0

With Wget:

wget -qO - https://github.com/tmiland/kernel-installer/raw/main/kernel_installer.sh | bash || exit 0

For latest release

curl -s https://api.github.com/repos/tmiland/kernel-installer/releases/latest \
| grep "browser_download_url.*sh" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -

For main branch

wget https://github.com/tmiland/kernel-installer/raw/main/kernel_installer.sh

Set execute permission:

chmod +x kernel_installer.sh

For usage, run:

./kernel_installer.sh -h

Help output:

If called without arguments, installs stable kernel using /opt/linux

--help                 |-h          display this help and exit
--kernel               |-k          kernel version of choice
--stable               |-s          stable kernel version 5.18
--mainline             |-m          mainline kernel version 5.18
--longterm             |-l          longterm kernel version 5.15.41
--dir                  |-d          install directory
--kexec                |-x          load new kernel without reboot
--config               |-c          set configuration target
--verbose              |-v          increase verbosity
--get-verified-tarball |-gvt        cryptographically verify kernel tarball
--nproc                |-n          set the number of processing units to use
--enable-debug-info    |-edi        enable debug info
--lowlatency           |-low        convert generic config to lowlatency
--changelog            |-cl         view changelog for kernel version
--update               |-upd        check for script update
--uninstall            |-u          uninstall kernel

To use opt --kernel:

./kernel_installer.sh --kernel 5.17.8

Else use:

./kernel_installer.sh --stable, --mainline or --longterm separately

To use --dir opt:

./kernel_installer.sh --dir /path/to/dir

To load kernel without reboot:

./kernel_installer.sh --kexec

To use --config:

./kernel_installer.sh --config menuconfig

default is olddefconfig

Configuration targets:

config          - Update current config utilising a line-oriented program
nconfig         - Update current config utilising a ncurses menu based program
menuconfig      - Update current config utilising a menu based program
xconfig         - Update current config utilising a QT based front-end
gconfig         - Update current config utilising a GTK based front-end
oldconfig       - Update current config utilising a provided .config as base
localmodconfig  - Update current config disabling modules not loaded
localyesconfig  - Update current config converting local mods to core
silentoldconfig - Same as oldconfig, but quietly, additionally update deps
defconfig       - New config with default from ARCH supplied defconfig
savedefconfig   - Save current config as ./defconfig (minimal config)
allnoconfig     - New config where all options are answered with no
allyesconfig    - New config where all options are accepted with yes
allmodconfig    - New config selecting modules when possible
alldefconfig    - New config with all symbols set to default
randconfig      - New config with random answer to all options
listnewconfig   - List new options
olddefconfig    - Same as silentoldconfig but sets new symbols to their default value
kvmconfig       - Enable additional options for guest kernel support
tinyconfig      - Configure the tiniest possible kernel

To use --get-verified-tarball:

./kernel_installer.sh --get-verified-tarball

Used together:

./kernel_installer.sh --stable --config menuconfig --kexec --dir /path/to/dir --get-verified-tarball

Watch install log:

tail -f ./kernel_installer.log

Note: you will need to run this script as root

If root password is not set, type:

sudo passwd root

Then:

su root

Uninstall kernel

To uninstall previously installed kernel:

./kernel_installer.sh --uninstall --kernel 5.17.7
  • You will be prompted with a yes/no answer

Testing

Tested and working on: Debian 11

Feature request and bug reports

Donations

Buy Me A Coffee

  • PayPal me
  • [BTC] : 33mjmoPxqfXnWNsvy8gvMZrrcG3gEa3YDM

Web Hosting

Sign up for web hosting using this link, and receive $100 in credit over 60 days.

DigitalOcean

Disclaimer

*** Use at own risk ***

License

MIT License Image

MIT License

kernel-installer's People

Contributors

tmiland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.