Kernel Panic following a RHEL 6 to RHEL 7 upgrade with error cp: cannot create hard link
Issue
-
After an upgrade from RHEL 6 to RHEL 7, the system is not able to boot anymore with message:
[ 1.992450] No filesystem could mount root, tried: [ 1.993463] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) -
Earlier during the upgrade process, we can notice multiple errors:
[ 174.407064] upgrade[4951]: warning: %postun(bash-4.1.2-48.el6.x86_64) scriptlet failed, exit status 127 [ 174.409074] upgrade[4951]: Warning: non-fatal %postun scriptlet failure in bash-4.1.2-48.el6 (exit code 0) ... [ 174.839621] upgrade[4951]: upgrade finished. [ 174.840847] upgrade-post[11666]: starting upgrade-post hook [ 174.842297] upgrade-post[11666]: Running postupgrade scripts... [ 174.843957] upgrade[4951]: chroot: failed to run command '/bin/sh': No such file or directory [ 174.845617] upgrade-post[11666]: Running /root/preupgrade/postupgrade.d/00_subscription-manager.sh... [ 174.847482] upgrade[4951]: chroot: failed to run command '/bin/sh': No such file or directory [ 174.849154] upgrade-post[11666]: chroot: failed to run command '/bin/sh': No such file or directory [ 174.850997] upgrade-post[11666]: Running /root/preupgrade/postupgrade.d/clean_rhel6_pkgs/postupgrade_cleanup.sh... -
And the message finished with non-fatal errors. is not true:
[ 174.838257] upgrade[4951]: finished with non-fatal errors. [ 174.839621] upgrade[4951]: upgrade finished. -
But the first error during the upgrade boot is:
Reached target System Upgrade. Starting System Upgrade (pre)... [ 33.310606] upgrade-pre[4909]: starting upgrade-pre hook [ 33.337455] upgrade-pre[4909]: Converting /var/lock to symlink [ 33.351678] upgrade-pre[4909]: Make a copy of `/sysroot/usr/bin'. [ 33.376284] upgrade-pre[4909]: cp: cannot create hard link '/sysroot/usr/bin.usrmove-new/timeout' to '/sysroot/usr/bin/timeout': Operation not permitted [ 33.381909] upgrade-pre[4909]: Something failed. Move back to the original state [ 33.388471] [^[[32m OK ^[[0m] Started System Upgrade (pre).
Environment
- RHEL 6 upgrade
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.