LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-10-2022, 10:20 AM   #16
Hanisch
LQ Newbie
 
Registered: Mar 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by shruggy View Post
On CentOS, you reconfigure GRUB with grubby.
Sorry, I can't find the argument of 'grubby' to delete the TOP entry in my Boot-menu.
Quote:
$ sudo grubby --info=DEFAULT
index=1
kernel="/boot/vmlinuz-4.18.0-348.7.1.el8_5.x86_64"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet $tuned_params"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/boot/initramfs-4.18.0-348.7.1.el8_5.x86_64.img $tuned_initrd"
title="CentOS Linux (4.18.0-348.7.1.el8_5.x86_64) 8"
id="36d9ad1131d34dfebb057d028dc16a7a-4.18.0-348.7.1.el8_5.x86_64"
Quote:
$ sudo grubby --info=ALL
index=0
kernel="/boot/vmlinuz-4.18.0-358.el8.x86_64"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet $tuned_params"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/boot/initramfs-4.18.0-358.el8.x86_64.img $tuned_initrd"
title="CentOS Stream (4.18.0-358.el8.x86_64) 8"
id="36d9ad1131d34dfebb057d028dc16a7a-4.18.0-358.el8.x86_64"
index=1
kernel="/boot/vmlinuz-4.18.0-348.7.1.el8_5.x86_64"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet $tuned_params"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/boot/initramfs-4.18.0-348.7.1.el8_5.x86_64.img $tuned_initrd"
title="CentOS Linux (4.18.0-348.7.1.el8_5.x86_64) 8"
id="36d9ad1131d34dfebb057d028dc16a7a-4.18.0-348.7.1.el8_5.x86_64"
index=2
kernel="/boot/vmlinuz-4.18.0-240.15.1.el8_3.x86_64"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet $tuned_params"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/boot/initramfs-4.18.0-240.15.1.el8_3.x86_64.img $tuned_initrd"
title="CentOS Linux (4.18.0-240.15.1.el8_3.x86_64) 8"
id="36d9ad1131d34dfebb057d028dc16a7a-4.18.0-240.15.1.el8_3.x86_64"
index=3
kernel="/vmlinuz-0-rescue-36d9ad1131d34dfebb057d028dc16a7a"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/initramfs-0-rescue-36d9ad1131d34dfebb057d028dc16a7a.img"
title="CentOS Linux (0-rescue-36d9ad1131d34dfebb057d028dc16a7a) 8 (Core)"
id="36d9ad1131d34dfebb057d028dc16a7a-0-rescue"
I will the index=1 make to index=0.

with regards
Ch. Hanisch
 
Old 02-10-2022, 12:02 PM   #17
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Code:
sudo grubby --remove-kernel=/boot/vmlinuz-4.18.0-358.el8.x86_64
 
1 members found this post helpful.
Old 02-10-2022, 12:53 PM   #18
Hanisch
LQ Newbie
 
Registered: Mar 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Code:
sudo grubby --remove-kernel=/boot/vmlinuz-4.18.0-358.el8.x86_64
Quote:
$ sudo grubby --remove-kernel=/boot/vmlinuz-4.18.0-358.el8.x86_64
The param /boot/vmlinuz-4.18.0-358.el8.x86_64 is incorrect
/boot/vmlinuz-4.18.0-358.el8.x86_64 is already deleted manuelly.

with regards
Ch. Hanisch
 
Old 02-10-2022, 12:58 PM   #19
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
You shouldn't have deleted it manually. Now, you probably have to manually delete the corresponding file from /boot/loader/entries/. This is what grubby would do for you automatically if you followed the proper procedure.
 
Old 02-10-2022, 01:01 PM   #20
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
it requires some [more] creativity from now. Either you try to restore the mentioned file (by reinstalling it) and rerun that grubby command again or try to understand how can you configure your grub without grubby.
 
1 members found this post helpful.
Old 02-10-2022, 01:04 PM   #21
Hanisch
LQ Newbie
 
Registered: Mar 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
Hello,
after
Quote:
$ sudo grubby --remove-kernel=/boot/vmlinuz-4.18.0-358.el8.x86_64
the grub BOOT-Menu is reconfigured and now has my DEFAULT-Kernel index=0.
Quote:
$ sudo grubby --info=DEFAULT
index=0
kernel="/boot/vmlinuz-4.18.0-348.7.1.el8_5.x86_64"
args="ro crashkernel=auto resume=UUID=0cffd2aa-a2ca-4ec5-aba0-07fc7fbd1a7b rhgb quiet $tuned_params"
root="UUID=557a3bf0-15eb-429c-8faa-227cd382bfd9"
initrd="/boot/initramfs-4.18.0-348.7.1.el8_5.x86_64.img $tuned_initrd"
title="CentOS Linux (4.18.0-348.7.1.el8_5.x86_64) 8"
id="36d9ad1131d34dfebb057d028dc16a7a-4.18.0-348.7.1.el8_5.x86_64"
All is good now - thank you very much!

But it is necessary manual deleting all /boot/*-4.18.0-358.*


with regards
Ch. Hanisch

Last edited by Hanisch; 02-10-2022 at 02:50 PM.
 
Old 02-11-2022, 12:13 AM   #22
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
you do not need to delete it at all. And don't forget, that will be [probably] reinstalled next time you update your system. That means that will be the default kernel again. And also it will be overwritten when the next version is installed.
 
Old 02-11-2022, 04:05 AM   #23
Hanisch
LQ Newbie
 
Registered: Mar 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
you do not need to delete it at all. And don't forget, that will be [probably] reinstalled next time you update your system. That means that will be the default kernel again. And also it will be overwritten when the next version is installed.
No, I have set to hinder the reapplication of the kernel-installation:
Quote:
# cat /etc/yum.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
exclude=kernel*
The newest kernel is take out of service for me.

with regards
Ch. Hanisch

Last edited by Hanisch; 02-11-2022 at 04:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get first day of last month and last day of last month in bash xowl Linux - Software 18 02-09-2017 09:49 AM
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-02-2009 11:56 PM
i can't delete last version secretboy Linux - Software 4 11-17-2004 02:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration