Red Hat Bugzilla – Bug 814850
/dev/fd/ symlink missing
Last modified: 2017-12-06 08:02:45 EST
Description of problem:
The /dev/fd --> /proc/self/fd symbolic link does not exist inside the initrd used by Anaconda as of RHEL 6.2. This may cause problems for Bash scripts that use redirected input. This is an easy fix, without any obvious risks. It would help people using bash script in pre/post during kickstart installation.
Version-Release number of selected component (if applicable):
How reproducible: 100% reproducible.
Steps to Reproduce:
1. Switch to tty2
2. less < <(cat /tmp/anaconda.log)
# Here is some imaginary code
# less < <(cat /tmp/anaconda.log)
bash: /dev/fd/62: No such file or directory
In the above example the input would be redirected if bash could access /dev/fd/[n]
Here is the bash documentation that deals with redirection, you will see that /dev/fd/[n] is documented there. Without a /dev/fd/ (symlink to /proc/self/fd/ bash will have problems for post & pre scripts.
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Setting devel_ack-. Don't really want to make any install image changes in RHEL-6 and no customer has raised the issue. You can workaround the problem with the information I posted in the Technical Notes field.
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.
Kickstart installations that run shell scripts using redirected input may experience execution problems due to a missing /dev/fd directory. You may workaround this problem by adding a %pre script at the top of your kickstart file that does this:
ln -sf /proc/self/fd /dev/fd
*** Bug 1009596 has been marked as a duplicate of this bug. ***
Hit this too: [bug 1009596] (marked as dupe already).
Based on the frustration from the silent error (I couldn't imagine it
will be something like this) leading to unexpected results, reopening
I agree with OP that
> This is an easy fix, without any obvious risks
and not getting this
> Don't really want to make any install image changes
If default interpreter (or explicit bash as there are some subtleties)
expects some properties of the environment so as to work correctly,
they should rather be satisfied.
Also to be noted that technical note got nowhere else as per my search,
so it's literally impossible to learn about this limitation in advance.
I suppose there may be more, so perhaps worth proper documentation [*]
if fixing this bug is not possible.
states the other limitation, file locking is not supported for NFS mounts
(ignoring the fact that perhaps vital piece of information is delivered
as a "note").
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.
The official life cycle policy can be reviewed here:
This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: