search
HomeComputer TutorialsComputer KnowledgeModify Linux kernel startup sequence

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
This article is reproduced at:每日运维. If there is any infringement, please contact admin@php.cn delete
Top 5 Solutions to Valorant Connection Error Windows 10/11 - MiniToolTop 5 Solutions to Valorant Connection Error Windows 10/11 - MiniToolMay 13, 2025 am 12:54 AM

Valorant has encountered a connection error when gaming? What will you do when that happens on PC? Take it easy. Every problem has a fix. Valorant is also no exception. In this article on php.cn Website, I bet you must find satisfying solutions.

How to Remove PUA:Win32/FlashHelper on Windows 10/11?How to Remove PUA:Win32/FlashHelper on Windows 10/11?May 13, 2025 am 12:53 AM

What to do if you see a message saying that PUA:Win32/FlashHelper was located on your PC? Do you know what it is? This is a potentially unwanted software and might threaten your data and system. Once your computer is infected by it, follow this guide

Fix Some Common Chrome Connection Errors while Browsing a Website - MiniToolFix Some Common Chrome Connection Errors while Browsing a Website - MiniToolMay 13, 2025 am 12:51 AM

In this post, php.cn Software lists some common Chrome connection errors you might encounter when browsing a webpage and introduces some easy methods to solve these issues. You can find the error you encounter and use the corresponding solutions to h

What Are Cookies on the Internet? Are Cookies Bad? - MiniToolWhat Are Cookies on the Internet? Are Cookies Bad? - MiniToolMay 13, 2025 am 12:50 AM

Cookies may not sound new to you because you encounter them almost every day when you browse web pages. But do you know what exactly cookies are? This guide on php.cn Website will show you detailed information about them.

How to Print Photos/Documents from iPhone to HP Printer in 3 Ways - MiniToolHow to Print Photos/Documents from iPhone to HP Printer in 3 Ways - MiniToolMay 13, 2025 am 12:49 AM

If you want to print photos from iPhone, what should you do? The operation is not difficult as long as you follow three ways in this post. php.cn will show you a detailed guide on how to print from iPhone to HP printer. Now, let’s go to see them.

How To Make The Xbox Download Faster: Tips & Methods - MiniToolHow To Make The Xbox Download Faster: Tips & Methods - MiniToolMay 13, 2025 am 12:48 AM

Xbox is very popular among people since it offers a large variety of games. Users can download the games they like and then start to play them directly. However, one of the common problems related to Xbox is the slow download speed. Users want to fin

Can't Turn on Developer Mode in Windows 11? Fix It via 4 Ways! - MiniToolCan't Turn on Developer Mode in Windows 11? Fix It via 4 Ways! - MiniToolMay 13, 2025 am 12:47 AM

If you are a developer, you may enable Developer Mode in Settings to do some tests. However, if you can’t turn on Developer Mode in Windows 11, what should you do? Take it easy and you can find some effective ways from this post written by php.cn Sol

Windows 10 KB5011543 Is Released with Search Highlights Feature - MiniToolWindows 10 KB5011543 Is Released with Search Highlights Feature - MiniToolMay 13, 2025 am 12:46 AM

Microsoft has released a new cumulative update for Windows 10 and it is Windows 10 KB5011543. This update contains some new features like Search highlights and some fixes. You can read this php.cn post to get some related information. Besides, you ca

See all articles

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment