[leapp] system failed to boot at reboot stage, error "Command ['/bin/sed', '-i', 's/^DEFAULTKERNEL=kernel$/DEFAULTKERNEL=kernel-core/g', '/etc/sysconfig/kernel'] failed with exit code 2.' is seen

Solution Verified - Updated -

Issue

  • Below traceback is observed during IPU reboot phase:
Nov 08 07:18:09 localhost upgrade[577]: ==> Processing phase `Preparation`
Nov 08 07:18:09 localhost upgrade[577]: ====> * remove_boot_files
Nov 08 07:18:09 localhost upgrade[577]:         Remove Leapp provided initramfs from boot partition.
Nov 08 07:18:09 localhost upgrade[577]: ====> * bind_update
Nov 08 07:18:09 localhost upgrade[577]:         Actor parsing facts found in configuration and modifying configuration.
Nov 08 07:18:09 localhost upgrade[577]: ====> * update_etc_sysconfig_kernel
Nov 08 07:18:09 localhost upgrade[577]:         Update /etc/sysconfig/kernel file.
Nov 08 07:18:09 localhost upgrade[1275]: Process Process-224:
Nov 08 07:18:09 localhost upgrade[1275]: Traceback (most recent call last):
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Nov 08 07:18:09 localhost upgrade[1275]:     self.run()
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
Nov 08 07:18:09 localhost upgrade[1275]:     self._target(*self._args, **self._kwargs)
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
Nov 08 07:18:09 localhost upgrade[1275]:     actor_instance.run(*args, **kwargs)
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
Nov 08 07:18:09 localhost upgrade[1275]:     self.process(*args)
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/updateetcsysconfigkernel/actor.py", line 20, in process
Nov 08 07:18:09 localhost upgrade[1275]:     updateetcsysconfigkernel.update_kernel_config('/etc/sysconfig/kernel')
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/updateetcsysconfigkernel/libraries/updateetcsysconfigkernel.py", line 9, in update_kernel_config
Nov 08 07:18:09 localhost upgrade[1275]:     path])
Nov 08 07:18:09 localhost upgrade[1275]:   File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 188, in run
Nov 08 07:18:09 localhost upgrade[1275]:     result=result
Nov 08 07:18:09 localhost upgrade[1275]: CalledProcessError: Command ['/bin/sed', '-i', 's/^DEFAULTKERNEL=kernel$/DEFAULTKERNEL=kernel-core/g', '/etc/sysconfig/kernel'] failed with exit code 2.
Nov 08 07:18:10 localhost upgrade[577]: ============================================================================================================
Nov 08 07:18:10 localhost upgrade[577]: Actor update_etc_sysconfig_kernel unexpectedly terminated with exit code: 1 - Please check the above details
Nov 08 07:18:10 localhost upgrade[577]: ============================================================================================================

Environment

  • Red Hat Enterprise Linux 7.9
  • Red Hat Enterprise Linux 8
  • leapp-0.15.1-1.el7_9.noarch

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content