Bug 2210315

Summary: [ISO][Anaconda] dracut does not contain *ping* commands to troubleshoot connectivity issue
Product: Red Hat Enterprise Linux 8 Reporter: Christophe Besson <cbesson>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED MIGRATED QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 8.8CC: arunas.z.vaznevicius, jkonecny, rmetrich, sbarcomb
Target Milestone: rcKeywords: MigratedToJIRA, Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-20 23:25:39 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:

Description Christophe Besson 2023-05-26 14:53:30 UTC
Description of problem:
Contrary to RHEL7 where ping/ping6/arping were available from the Anaconda's initramfs, RHEL8 does not provide them anymore. For some reason, RHEL9 reintroduced arping.

For example, ping was installed by the legacy 40network/module-setup.sh:
inst_multiple -o ping ping6

From my understanding, these tools disappear after their replacement in favor of the NetworkManager inside the initramfs, but they were useful for troubleshooting purposes (ex: pxe + stage2 or ks shared via http, etc...).

Marking it as a regression, as perceived by the customer.
Feel free to move to releng if you consider it's the appropriate component

Version-Release number of selected component (if applicable):
RHEL>=8.3

Additional info:
Suggested workaround is to build a 2nd initrd with the required tools
  note1: here dep libs are already included
  note2: take care to not break /sbin /bin /lib /lib64 symlinks by using pathes prefixed with /usr

the idea is to create a 2nd initramfs, that includes the binaries you need, which will be extracted on top of the first initramfs. Grub2 as well as syslinux (PXE legacy) and iPXE support to load multiple initramfs.
~~~
# mkdir -p /tmp/rootfs/usr/sbin
# cp /usr/sbin/{ping,ping6,arping} /tmp/rootfs/usr/sbin/
# (cd /tmp/rootfs && find . | cpio -oc | gzip) > /tmp/tools.img
~~~

Check if it has been correctly packed with the lsinitrd command:
~~~
# lsinitrd /tmp/tools.img 
Image: /tmp/tools.img: 76K
========================================================================
Version: 

Arguments: 
dracut modules:
========================================================================
drwxr-xr-x   3 root     root            0 May 26 07:07 .
drwxr-xr-x   3 root     root            0 May 26 07:07 usr
drwxr-xr-x   2 root     root            0 May 26 07:07 usr/sbin
-rwxr-xr-x   1 root     root        29432 May 26 07:07 usr/sbin/arping
-rwxr-xr-x   1 root     root        67656 May 26 07:07 usr/sbin/ping
-rwxr-xr-x   1 root     root        67656 May 26 07:07 usr/sbin/ping6
========================================================================
~~~

For syslinux/pxelinux used in BIOS legacy mode, update the kernel cmdline like this:
~~~
    append initrd=initrd.img,tools.img <other args>
~~~

For iPXE, just use a 2nd initrd directive.

For Grub2, it should look like this:
~~~
menuentry 'RHEL 8' --class fedora --class gnu-linux --class gnu --class os {
	linuxefi  vmlinuz <kernel_parameters>
	initrdefi initrd.img tools.img
}
~~~

If you use an ISO directly, you need to create a custom one that will include the "tools.img" you have generated, and modify the bootloader config (in ISO -> EFI/BOOT/grub.cfg) to append this 2nd initrd as explained above. Once done, repack it using mkisofs as described in the following article:

https://access.redhat.com/solutions/60959

Comment 1 Jiri Konecny 2023-06-01 08:32:16 UTC
Hi, we think that Dracut should have this tool by default to improve emergency shell experience. Switching to Dracut to discuss this possibility.

Comment 2 Jan Stodola 2023-06-06 14:12:41 UTC
*** Bug 2212814 has been marked as a duplicate of this bug. ***

Comment 3 RHEL Program Management 2023-09-20 23:24:51 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-20 23:25:39 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.