Bug 610466

Summary: mkinitrd has no option --force
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Suchý <msuchy>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: atodorov, lkocman, pknirsch
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Running mkinitrd alone does not override an existing initramfs image. When this is attempted, the message stated that the "--force" parameter should be used, but mkinitrd only supported the short version "-f" of this parameter. "--force" was added to mkinitrd as the long version.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 11:53:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2010-07-02 07:41:27 UTC
Description of problem:
I run:

$ mkinitrd /boot/initramfs-2.6.32-37.el6.x86_64.img 2.6.32-37.el6.x86_64

and got this output:

Will not override existing initramfs (/boot/initramfs-2.6.32-37.el6.x86_64.img) without --force

which is fair. So I add option --force on command line and I get:

[msuchy@dri/~/rhn/spacewalk.pub{master}]$ mkinitrd /boot/initramfs-2.6.32-37.el6.x86_64.img 2.6.32-37.el6.x86_64 --forceusage: mkinitrd [--version] [--help] [-v] [-f] [--preload <module>]
       [--image-version] [--with=<module>]
       <initrd-image> <kernel-version>

       (ex: mkinitrd /boot/initramfs-2.6.32-37.el6.x86_64.img 2.6.32-37.el6.x86_64)

If I use -f instead of --force, then it got accepted. So I would expect that in thet warning is not used --forced option (but -f) or that --force option is recognized as alias for -f

Version-Release number of selected component (if applicable):
# rpm -qf `which mkinitrd`
dracut-004-23.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. try to regenerate initrd for you current kernerl
2. follow the warning and use option --force
  
Actual results:
--force is not recognized

Expected results:
--force is recognized or
warning suggest -f instead of --force

Additional info:

Comment 1 RHEL Program Management 2010-07-02 07:43:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 Harald Hoyer 2011-02-16 10:57:16 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Running mkinitrd will not override an existing initramfs image. The error message of mkinitrd states to use the "--force" parameter, but mkinitrd does only support the short version "-f" of this parameter. "--force" was added to mkinitrd as the long version.

Comment 6 Alexander Todorov 2011-02-17 13:17:03 UTC
dracut --force test.img $(uname -r) worked for me with dracut-004-38.el6.noarch.

Comment 7 Harald Hoyer 2011-02-17 13:48:05 UTC
(In reply to comment #6)
> dracut --force test.img $(uname -r) worked for me with
> dracut-004-38.el6.noarch.

This bug is for "mkinitrd --force" .. not "dracut --force"

Comment 8 Alexander Todorov 2011-02-17 14:05:21 UTC
Thanks for the notice. Tested this again:

[root@localhost ~]# mkinitrd test.img $(uname -r)
[root@localhost ~]# mkinitrd test.img $(uname -r)
Will not override existing initramfs (/root/test.img) without --force
[root@localhost ~]# mkinitrd --force test.img $(uname -r)
[root@localhost ~]# echo $?
0
[root@localhost ~]# rpm -qf /sbin/mkinitrd 
dracut-004-39.el6.noarch

Comment 9 Laura Bailey 2011-05-05 06:15:25 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Running mkinitrd will not override an existing initramfs image. The error message of mkinitrd states to use the "--force" parameter, but mkinitrd does only support the short version "-f" of this parameter. "--force" was added to mkinitrd as the long version.+Running mkinitrd alone does not override an existing initramfs image. When this is attempted, the message stated that the "--force" parameter should be used, but mkinitrd only supported the short version "-f" of this parameter. "--force" was added to mkinitrd as the long version.

Comment 10 errata-xmlrpc 2011-05-19 11:53:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0523.html