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: | dracut | Assignee: | dracut-maint-list |
| Status: | NEW --- | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.8 | CC: | arunas.z.vaznevicius, jkonecny, rmetrich, sbarcomb |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| 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: | 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: | |||
Hi, we think that Dracut should have this tool by default to improve emergency shell experience. Switching to Dracut to discuss this possibility. *** Bug 2212814 has been marked as a duplicate of this bug. *** |
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