Bug 1769825 - anaconda tries to fetch file -kickstart instead of @ip-kickstart from nfs server
Summary: anaconda tries to fetch file -kickstart instead of @ip-kickstart from nfs server
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-07 14:57 UTC by Derrien
Modified: 2020-12-15 19:18 UTC (History)
11 users (show)

Fixed In Version: anaconda-32.18-1
Clone Of:
Environment:
Last Closed: 2020-11-24 20:19:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Part of rdsosreport.txt (1.08 MB, text/plain)
2019-11-07 14:57 UTC, Derrien
no flags Details
Patch file for comment #4 (688 bytes, patch)
2020-01-02 23:44 UTC, Edgar Hoch
no flags Details | Diff

Description Derrien 2019-11-07 14:57:59 UTC
Created attachment 1633687 [details]
Part of rdsosreport.txt

Description of problem:

With 'inst.ks=nfs:srv:/linux/config/' in a kickstart installation anaconda tries to fetch -kickstart instead of @ip-kickstart from nfs server :

warn 'anaconda: failed to fetch kickstart from nfs:srv:/linux/config/-kickstart'

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Try to fetch -kickstart

Expected results:
Use @ip-kickstart

Additional info:
Worked with Fedora 30 and previous versions

Comment 1 Derrien 2019-11-15 13:21:16 UTC
I patched initrd :

diff usr/lib/dracut/hooks/initqueue/online/11-fetch-kickstart-net.sh usr/lib/dracut/hooks/initqueue/online/11-fetch-kickstart-net.sh.ORG
47d46
<           new_ip_address=${new_ip_address:-$(ip addr show $netif | awk '/inet / {split($2,ip,"/"); print ip[1];}')}

There is probably cleaner and I don't know if it covers all cases but for us it works :

INFO dracut-initqueue:anaconda: successfully fetched kickstart from nfs:srv:/linux/config/10.0.11.150-kickstart

Comment 2 W Agtail 2019-12-20 19:25:00 UTC
Hello
I also have the same exact issue with F31.
Have also tried rawhide which has the same problem.
Thanks.

Comment 3 Edgar Hoch 2020-01-02 21:14:09 UTC
I have created a pull request that should fix the problem for future releases:
https://github.com/rhinstaller/anaconda/pull/2257

Comment 4 Edgar Hoch 2020-01-02 23:43:51 UTC
To fix the problem for Fedora 31, I think that users (administrators) must modify the file initrd.img manually, because Fedora doesn't release updates to installation media...

I didn't find a complete description how to patch initrd for current Fedora versions, only older (outdated?) hints. So this is the method that works for me. There may be better methods.

- I use image Fedora-Everything-netinst-x86_64-31-1.9.iso because I only need to boot using pxe over network. You can also use the server netinst or dvd iso image.

- Extract (copy) the content of the iso image to a directory. You can use command like "mount -o loop,ro path-to-iso-image path-to-mount" which must be done as root, or 

- For network installation with pxe, we need files in subdirectory os/images/pxeboot/: files vmlinuz and initrd.img .

- With "lsinitrd path-to-initrd.img" you can list the content of the file. "lsinitrd" is provided by package dracut.

- Create a new, empty directory for extracting the content of initrd.img, for example /tmp/initrd-content .
  Extract (copy) the content of initrd.img to this directory. You need to be root, because the file contains special files (char devices in dev/ ).

  # cd /tmp/initrd-content
  # lsinitrd --unpack path-to-initrd.img

- Store the patch in a file, for example /tmp/anaconda-kickstart-nfs-calculate-ip.patch

- Patch file dracut/fetch-kickstart-net.sh:

  # patch -p1 < /tmp/anaconda-kickstart-nfs-calculate-ip.patch

- Create a new file initrd.img. This is not perfect, because the size of the original and the new files differ too much, but it works for me.

  # (cd /tmp/initrd-content; find . -print0 | cpio -c -o --null | xz --check=crc32 --lzma2=dict=1MiB > /tmp/initrd.img-new )

- Use the new initrd.img file instead of the original (use /tmp/initrd.img-new, but with name initrd.img) in the usual places (tftp server, nfs server, direct boot, ...).

Comment 5 Edgar Hoch 2020-01-02 23:44:50 UTC
Created attachment 1649324 [details]
Patch file for comment #4

Comment 6 Edgar Hoch 2020-01-02 23:45:52 UTC
(In reply to Edgar Hoch from comment #3)
> I have created a pull request that should fix the problem for future
> releases:
> https://github.com/rhinstaller/anaconda/pull/2257

I have replaced the pull request by a new one:
https://github.com/rhinstaller/anaconda/pull/2258

Comment 7 Radek Vykydal 2020-01-06 12:23:27 UTC
Thank you for the patch, I am going to look at it soon.

As for the initrd update (comment #4), for PXE installations it should be also possible to use initrd overlay containing just fetch-kickstart-net.sh file (in its respective path) and then use something like this pxe configuration (with initrd.overlay.img overlay image):

label development-rawhide
  menu label development-rawhide
  kernel test/rv/scripted/development-rawhide/vmlinuz
  append initrd=test/rv/scripted/development-rawhide/initrd.img,test/rv/initrd.overlay.img repo=http://download.englab.brq.redhat.com/pub/fedora/development-rawhide/Everything/x86_64/os   ks=http://10.43.136.2/ks/rv/ks.network-service.cfg

Comment 8 Edgar Hoch 2020-01-13 00:00:00 UTC
Resolved in Fedora 32 Rawhide 20200112.n.0 nightly compose

I have used Fedora 32 Rawhide 20200112.n.0 nightly compose for a kickstart installation. Now the kickstart file is found, the problem descibed in this bug report is solved in this version.

Thanks Radek!

Comment 9 Ben Cotton 2020-11-03 15:45:57 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
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
Fedora 'version' of '31'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2020-11-24 20:19:16 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 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. If you experience problems, please add a comment to this
bug.

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

Comment 11 Vladimír Slávik 2020-12-15 19:18:49 UTC
Apparently some kind of fix has been included, see comment 8, and the EOL message is only because the bug was forgotten.


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