LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-20-2016, 07:32 AM   #1
leniviy
Member
 
Registered: Jul 2009
Distribution: Archlinux
Posts: 69

Rep: Reputation: 4
How to re-generate rescue kernel image for current kernel?


Hi.

Initially after installing Centos 7 1511 I had 2 entries in grub:

Code:
CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-0175d9b02fad463da9f6044b7ae92091) 7 (Core)
After updating to kernel 3.10.0-327.18.2 additional hostonly entry appeared, but rescue image still boots the previous kernel version 3.10.0-327. Even after uninstalling kernel-3.10.0-327.el7.x86_64 the old rescue image is still there.

Who creates the rescue image? A kernel post-install script or anaconda?

How to fix this? Should I manually run dracut with "--no-hostonly -a 'rescue'" arguments?

Who should create /boot/vmlinuz-0-rescue* ?

Last edited by leniviy; 05-20-2016 at 07:36 AM.
 
Old 05-21-2016, 12:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,484

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
A rudimentary search sent me to look at /usr/lib/dracut/dracut.conf.d/02-rescue.conf (on Fedora in my case).
Code:
dracut_rescue_image="yes"
Looks like it should do the job - but doesn't. My rescue entry is from December 2013 - might have been broken for a while.

Edit: I might add, in all the years I've used Fedora (and occasionally RHEL/CentOS) I've never even thought of using this kernel.

Last edited by syg00; 05-21-2016 at 01:00 AM.
 
Old 05-21-2016, 02:52 AM   #3
leniviy
Member
 
Registered: Jul 2009
Distribution: Archlinux
Posts: 69

Original Poster
Rep: Reputation: 4
I think I found it:

Code:
rm -f /boot/vmlinuz-0-rescue-* /boot/initramfs-0-rescue-*.img
/etc/kernel/postinst.d/51-dracut-rescue-postinst.sh $(uname -r) /boot/vmlinuz-$(uname -r)
This script does not overwrite existing rescue image, this is why it's never updated.
 
1 members found this post helpful.
Old 05-21-2016, 03:56 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,484

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
So you only get one per install - maybe ok for Servers, but as in my case, version updates leave it horribly out of date.
I guess they don't want to risk replacing it each kernel update in case you need to use the immediate prior one for a recovery. Like I said, not much chance of that IMHO.
 
Old 06-18-2016, 04:39 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,484

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
And just to clean this up, yes the next kernel update did re-generate the rescue one it had been deleted.
 
  


Reply

Tags
dracut


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel image corrupted : Wrong Image Format for bootm command ERROR: can't get kernel blink182 Linux - Embedded & Single-board computer 0 05-13-2011 04:11 AM
how to make boot able image from the current kernel elili Linux - Kernel 0 02-16-2011 12:35 PM
How to generate a .config file based on the current or initial installtion/kernel khaos83 Linux - General 11 01-22-2008 10:53 AM
Using a kernel image from -current? shadin Slackware 4 07-30-2006 08:53 PM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 08:53 AM

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

All times are GMT -5. The time now is 04:35 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration