Home Computer Tutorials Computer Knowledge Modify Linux kernel startup sequence

Modify Linux kernel startup sequence

Feb 23, 2024 pm 10:22 PM
grub Kernel pneumatic

Modify Linux kernel startup sequence

Linux changes the kernel startup sequence

1. Modify the kernel startup sequence of RHEL6/CentOS6

Check the /etc/grub.conf file to determine the system kernel status. According to the document, there are two kernel versions in the system, namely 2.6.32-573.18.1.el6.x86_64 and 2.6.32-431.23.3.el6.x86_64. Kernel versions are listed from top to bottom.

In the grub.conf file, you can decide which kernel version to use when the system starts by adjusting the default parameters. The default value is 0, which means the system will boot the latest kernel version. A value of 0 corresponds to the first kernel version listed in the grub.conf file, and so on. By changing the default value, you can easily switch the kernel version used when the system starts, ensuring that the system can start and run normally. This setting is very useful for system maintenance and troubleshooting, allowing the flexibility to adjust the kernel version as needed to meet the needs of the system. It should be noted that when modifying the grub.conf file

2. Modify the kernel startup sequence of RHEL7/CentOS7

1. Execute the following command to check how many cores there are in the system.

/boot/grub2/grub.cfg #(non-UEFI configurations) Note: Non-UEFI mode execution

/boot/efi/EFI/redhat/grub.cfg #(UEFI configurations)Note: UEFI mode execution

cat /boot/grub2/grub.cfg |grep menuentry

cat /boot/efi/EFI/redhat/grub.cfg |grep menuentry

2. Refer to the following command to configure booting from the default kernel. The kernel name is replaced based on the actual name found within the system. grub2-set-default 0

grub2-set-default “CentOS Linux (3.10.0-123.9.3.el7.x86_64) 7 (Core)”

grub2-set-default ‘Red Hat Enterprise Linux Server (3.10.0-1160.el7.x86_64) 7.9 (Maipo)’

3. Execute the following command to confirm that the configuration is successful.

grub2-editenv list

3. Modify the kernel startup sequence of centos8

1. View the default kernel

grubby –default-kernel

2. View all cores

grubby –info=ALL

3. Modify the default startup kernel

grubby –set-default /boot/vmlinuz-4.18.0-80.11.2.el8_0.x86_64

4. Ubuntu changes the kernel startup sequence

1. Check the startup sequence of the current kernel

cat /boot/grub/grub.cfg |grep menuentry

2. Modify grub file

Assuming that you want to modify the kernel startup to 3.13.0-166, modify the file /etc/default/grub

$
sudo vim /etc/default/grub

GRUB_DEFAULT=0 ##Modify to

GRUB_DEFAULT=”Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-31-generic”

3. Update the modified grub

update-grub

The above is the detailed content of Modify Linux kernel startup sequence. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to install the Linux kernel on Ubuntu 22.04 Detailed tutorial! How to install the Linux kernel on Ubuntu 22.04 Detailed tutorial! Mar 01, 2024 pm 10:34 PM

To install the Linux kernel on Ubuntu22.04, you can follow the following steps: Update the system: First, make sure your Ubuntu system is the latest, execute the following command to update the system package: sudoaptupdatesudoaptupgrade Download the kernel file: Visit the official Linux kernel website () to download Required kernel version. Select a stable version and download the source code file (with .tar.gz or .tar.xz extension), for example: wget Unzip the file: Use the following command to unzip the downloaded kernel source code file: tar-xflinux-5.14.tar. xz install build dependencies: Install the tools and dependencies required to build the kernel. Execute

Explore Debian system installation and handling the Grub boot loader Explore Debian system installation and handling the Grub boot loader Feb 12, 2024 pm 08:06 PM

The Debian system is a popular Linux distribution that has won the favor of many users for its stability and high degree of customizability. For users who are new to Linux systems, they may encounter some problems when installing the Debian system. One of the common problems is that the Grub boot loader appears when the system is restarted after installation. This article will discuss the installation process of the Debian system and how to deal with the Grub boot loader problem. Debian system installation steps 1. Download the ISO image file of the Debian system, which can be obtained from the official website or other reliable sources. 2. Write the ISO image file to a U disk or CD to make a boot disk. 3. Insert the prepared boot disk into the computer

Modify Linux kernel startup sequence Modify Linux kernel startup sequence Feb 23, 2024 pm 10:22 PM

Modify the kernel startup sequence of Linux 1. Modify the kernel startup sequence of RHEL6/CentOS6. Check the /etc/grub.conf file to determine the system kernel situation. According to the document, there are two kernel versions in the system, namely 2.6.32-573.18.1.el6.x86_64 and 2.6.32-431.23.3.el6.x86_64. Kernel versions are listed from top to bottom. In the grub.conf file, you can decide which kernel version to use when the system starts by adjusting the default parameters. The default value is 0, which means the system will boot the latest kernel version. A value of 0 corresponds to the first content listed in the grub.conf file.

How to enter grub boot interface in Ubuntu 18.04? How to enter grub boot interface in Ubuntu 18.04? Jan 10, 2024 pm 10:41 PM

After the installation of ubuntu18.04 is completed, it is found that it directly enters the desktop and there is no grub boot menu. We need to adjust the grub menu and modify the corresponding files ourselves, and then update the boot menu. How to do this? Let’s take a look at the detailed tutorial below. 1. First we enter the ubuntu desktop. 2. Right-click on the desktop - open terminal. 3. Enter sudogedit/etc/default/grub in the terminal to open the configuration file. 4. Delete or comment out grub_timeout_style=hidden, and change grub_cmdline_linux_default to text. 5. Modification completed

Is the Android system based on the Linux kernel? Is the Android system based on the Linux kernel? Mar 14, 2024 pm 03:12 PM

Is the Android system based on the Linux kernel? Android system, as one of the most widely used mobile operating systems in the world, has always been said to be developed based on the Linux kernel. However, what is the real situation? Let’s explore this issue. First, let's understand the Linux kernel. The Linux kernel, as an open source operating system kernel, was first released by Linus Torvalds in 1991. It provides a good foundation for many operating systems, including And

Linux kernel main function analysis and analysis Linux kernel main function analysis and analysis Mar 14, 2024 am 11:27 AM

Linux kernel main function analysis and analysis The Linux kernel is a large and complex system, in which the main function plays a vital role. It is the entry point of the entire system and is responsible for initializing various subsystems, drivers and kernel modules. Finally start the entire operating system. This article will analyze and analyze the main function of the Linux kernel, and demonstrate its key functions and execution flow through specific code examples. In the Linux kernel, the entry point of the main function is start_k in the init/main.c file.

Explore the programming languages ​​used under the hood of the Linux kernel Explore the programming languages ​​used under the hood of the Linux kernel Mar 20, 2024 am 08:06 AM

Title: Exploring the programming language used at the bottom of the Linux kernel. As an open source, stable and reliable operating system kernel, the Linux kernel has a wide range of applications in the computer field. To have an in-depth understanding of the Linux kernel, you have to involve the programming language used at the bottom. In fact, the Linux kernel is mainly written in C language, which is an efficient, flexible and easy-to-maintain programming language that is very suitable for operating system development. This article will explore the bottom of the Linux kernel from a detailed perspective

Detailed explanation of Linux kernel source code storage location Detailed explanation of Linux kernel source code storage location Mar 14, 2024 pm 06:12 PM

Detailed explanation of the storage location of Linux kernel source code. Linux kernel source code is the core part of the Linux operating system. It contains the implementation code for various functions of the operating system. To understand where the Linux kernel source code is stored, we first need to understand the organizational structure of the Linux kernel. Linux kernel source code is usually stored in the /usr/src/linux or /usr/src/linux- directory. In this directory, there are many

See all articles