Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 814850 - /dev/fd/ symlink missing
/dev/fd/ symlink missing
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.2
Unspecified Linux
unspecified Severity low
: rc
: ---
Assigned To: Anaconda Maintenance Team
Release Test Team
Clayton Spicer
: Reopened
: 1009596 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-20 16:14 EDT by Jon Disnard
Modified: 2017-12-06 08:02 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Missing `/dev/fd` directory affecting Kickstart installations Kickstart installations that run shell scripts using redirected input might experience execution problems due to a missing `/dev/fd` directory. To work around this problem, add the following `%pre` script at the start of your Kickstart file: %pre ln -sf /proc/self/fd /dev/fd %end
Story Points: ---
Clone Of:
: 1009639 (view as bug list)
Environment:
Last Closed: 2017-12-06 08:02:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Disnard 2012-04-20 16:14:17 EDT
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)
3.

 
Actual results:

# Here is some imaginary code
# less < <(cat /tmp/anaconda.log)
bash: /dev/fd/62: No such file or directory


Expected results:
In the above example the input would be redirected if bash could access /dev/fd/[n]


Additional info:

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. 

http://www.gnu.org/software/bash/manual/html_node/Redirections.html
Comment 2 RHEL Product and Program Management 2012-05-03 01:42:08 EDT
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.
Comment 3 David Cantrell 2012-07-05 11:37:15 EDT
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.
Comment 4 David Cantrell 2012-07-05 11:37:15 EDT
    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.
    
    New Contents:
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:

%pre
ln -sf /proc/self/fd /dev/fd
%end
Comment 5 Jan Pokorný 2013-09-18 14:38:49 EDT
*** Bug 1009596 has been marked as a duplicate of this bug. ***
Comment 6 Jan Pokorný 2013-09-18 14:54:09 EDT
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
the bug.


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.

[*] e.g.,
http://docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/s1-kickstart2-postinstallconfig.html#s2-kickstart2-post-examples
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").
Comment 7 Jan Kurik 2017-12-06 08:02:45 EST
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:

http://redhat.com/rhel/lifecycle

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:

https://access.redhat.com/

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