Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1048231

Summary: boot fails using ks option
Product: Red Hat Enterprise Linux 7 Reporter: Michael Young <m.a.young>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: borgan, dracut-maint-list, harald, lkardos, m.a.young
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-19.31.58-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:21:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rdsosreport.txt from boot attempt
none
initrd overlay with possible fix none

Description Michael Young 2014-01-03 13:01:47 UTC
Created attachment 844954 [details]
rdsosreport.txt from boot attempt

I am trying to install rhel7 beta via pxeboot using the ks option to fetch the kickstart file, but the install ends up in the emergency shell. What seems to be happening is that the script /lib/dracut/hooks/initqueue/online/11-fetch-kickstart-net.sh is looking in /tmp/net.ens192.dhcpopts for dhcp options but in my case they are actually in /tmp/dhclient.ens192.dhcpopts .

Comment 2 Brian Lane 2014-02-03 15:35:21 UTC
dracut handles the network setup, it is waiting for the wrong device to become active.

Comment 3 Harald Hoyer 2014-02-03 15:57:59 UTC
/online/11-fetch-kickstart-net.sh: line 27: /tmp/net.ens192.dhcpopts: No such file or directory

....

[    8.526163] localhost systemd[1]: Starting Switch Root...
[    8.528303] localhost systemd[1]: Not switching root: /sysroot does not seem to be an OS tree. /etc/os-release is missing.

Comment 4 Harald Hoyer 2014-02-03 16:07:43 UTC
Comment #1 is correct.

There is no more net.$iface.dhcpopts anymore since

commit e173f0b384f699c2519db879f3f562b1f6676d8d
Author: Will Woods <wwoods>
Date:   Thu Apr 5 13:01:37 2012 -0400

    network: add save_netinfo, fix problems with nfs->NM takeover
    
    For NetworkManager to properly take over a NFS-root system, we need to
    have the interface name(s) in /tmp/net.ifaces and save the dhclient
    lease. This lets the ifcfg module do its magic.
    
    save_netinfo should properly write out /tmp/net.ifaces when needed, and
    copies the dhclient files into place.

Comment 5 Brian Lane 2014-02-03 19:04:19 UTC
Created attachment 858787 [details]
initrd overlay with possible fix

The actual problem here is that anaconda-ifcfg.sh isn't getting run before 11-fetch-kickstart-net, so the file is missing.

Here is a initrd overlay that should fix it, I can't test it completely because of how my dhcp/pxe setup is configured, but it no longer complains about the missing file.

You can apply this by *appending* it to the initrd= line in your pxe cfg file, like this:

initrd=images/pxeboot/initrd.img,images/pxeboot/1048231.img

If there are still problems, please run it with rd.debug and attach the output from journalctl

Comment 6 Michael Young 2014-02-04 14:26:27 UTC
It with that patch it gets a bit further, but fails when it tries to fetch the kickstart file from our dhcp server. In 11-fetch-kickstart-net.sh you have
(lines 24-28)

if [ "$kickstart" = "nfs:auto" ]; then
    # construct kickstart URL from dhcp info
    # server is next_server, or the dhcp server itself if missing
    . /tmp/net.$netif.dhcpopts
    server="${new_dhcp_next_server:-$new_dhcp_server_identifier}"

however my (anonymized) dhclient.ens192.dhcpopts file (10.0.0.1 and 10.0.0.2 are dns/dhcp servers, 10.0.0.3 is the pxe server which also shares /kickstart via nfs) has
new_broadcast_address=10.0.1.63
new_dhcp_lease_time=43200
new_dhcp_message_type=5
new_dhcp_server_identifier=10.0.0.1
new_domain_name=myaddr.com
new_domain_name_servers='10.0.0.2 10.0.0.1'
new_expiry=1391553036
new_ip_address=10.0.1.1
new_network_number=10.0.1.0
new_next_server=10.0.0.3
new_routers=10.0.1.62
new_server_name=rhel7beta.myaddr.com
new_subnet_mask=255.255.255.192

so line 28 is looking for new_dhcp_next_server when the value set is actually new_next_server.

Comment 7 Michael Young 2014-02-04 14:41:19 UTC
If I add the 11-fetch-kickstart-net.sh file to your initrd fix with line 28 replaced by
    server="${new_next_server:-$new_dhcp_server_identifier}"

then the kickstart file is read correctly.

Comment 8 Brian Lane 2014-02-04 17:14:13 UTC
Thanks for tracking that down.

Comment 11 Ľuboš Kardoš 2014-03-19 10:20:08 UTC
Verified on anaconda-19.31.67-1 (RHEL-7.0-20140317.0).

Comment 12 Michael Young 2014-04-23 11:05:55 UTC
I have just tested the RHEL7 RC pxeboot images, and the kickstart file is found correctly when using the ks option.

Comment 13 Ludek Smid 2014-06-13 11:21:18 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.