Bug 1987292 - Fedora upgrade fails because of a bug in rpm skript
Summary: Fedora upgrade fails because of a bug in rpm skript
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 34
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1987287 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-29 12:44 UTC by Simo Soini
Modified: 2022-06-07 21:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-07 21:11:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Simo Soini 2021-07-29 12:44:49 UTC
Description of problem:

Fedora 33 to 34 upgrade hangs.

Version-Release number of selected component (if applicable):

grub2-common-2.06-2.fc34.noarch

How reproducible:

Always

Steps to Reproduce:
1. Start Fedora 33 to 34 upgrade
2. Upgrade hangs (for me at 93%)
3.

Actual results:

Broken system by uncompleted rpm transaction

Expected results:

Successful upgrade to Fedora 34

Additional info:
$ rpm -q --scripts grub2-common
posttrans scriptlet (using /bin/sh):
...
cp -a ${EFI_HOME}/grub.cfg ${EFI_HOME}/grub.cfg.rpmsave
cp -a ${EFI_HOME}/grub.cfg ${GRUB_HOME}/
mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg

3rd last line leaves grub.cfg behind, which causes mv on the last line to fail.

Suggested fix:

Use mv -f on the last line.

Comment 1 Robbie Harwood 2021-09-01 14:39:11 UTC
*** Bug 1987287 has been marked as a duplicate of this bug. ***

Comment 2 Robbie Harwood 2021-09-02 19:50:38 UTC
I don't see how that can be the problem:

[root@fedora ~]# /bin/sh
sh-5.1# touch foo bar
sh-5.1# mv foo bar
sh-5.1# ls
bar
sh-5.1# 

Can you provide more information?

Comment 3 Simo Soini 2021-09-02 21:04:38 UTC
alias mv='mv -i'
This is the default.

I do not know much more, but that is where the upgrade broke, and I needed to fix it manually.
The mv command is just my guess to why it broke, since running that script manually (in bash) asked for permission to overwrite.
When given the permission, grub.cfg was replaced successfully.

I tried the upgrade 2 times, and both times it hung on 93%. Both times grub config changes were partial, and I couldn't see the new kernel on grub menu.
Upgrade was run using GUI, not via terminal.

Comment 4 Robbie Harwood 2021-11-18 21:12:45 UTC
> alias mv='mv -i'
> This is the default.

No, it's not.  See #c2.  If that's failing, you've made an alias somewhere that's causing it to break.

Comment 5 Ben Cotton 2022-05-12 15:13:38 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Ben Cotton 2022-06-07 21:11:11 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.