I recently had a bad UPS lead to a sudden crash of several machines. One of them (running FreeBSD) didn't come back up until I replaced the power supply, but it's still not fully back. Both the BIOS and the OS complain about a disk being missing; swapping around power cables and data cables and such has convinced me that the problem is the disk itself. FreeBSD won't fully start up due to a problem mounting something from /etc/fstab:

Mounting local file systems: mount: /fdesc: No such file or directory

If I comment out the fdesc line in fstab, everything seems to come up OK. But... that can't be good, can it? I don't know anything about fdesc besides what I've read in the past few minutes, but it seems like a low-level thing dealing with stuff like stdin and stdout, which seem important to me.

There does exist /dev/fd, which does contain /dev/fd/0, /dev/fd/1, and /dev/fd/2, and brief piping experiments at the command line seem to indicate that stdin, stdout, and stderr are all working OK.

What might be the cause of it being unable to mount /fdesc? And what horrible things will happen if I just continue to run without mounting it? How might I be able to get /fdesc back?

The contents of /etc/fstab, after I commented out the fdesc line:

#Device      Mountpoint  FSType  Options  Dump  Pass#
/dev/ada0p2  /           ufs     rw       1     1
/dev/ada0p3  none        swap    sw       0     0
#/dev/fd     fdesc       fdesc   rw       0     0

Plus a couple Samba mounts which seem to be working fine.

  • It's only needed for things like bash, which need the full /dev/fd behavior to do process substitution. Which release of FreeBSD is this? On 10.0, the fstype is fdescfs and the mount point is /dev/fd. I can check older releases for you. – Mark Plotnick Feb 24 '15 at 17:30
  • Thanks. It's 10.0-RELEASE. After reading your comment, I tried bash, and piping with stdin, stdout, and stderr seem to work OK there too? And there is a /dev/fd. Not sure what you mean by "to do process substitution"? Thanks again. – Bob Vesterman Feb 24 '15 at 17:43
  • There's always a /dev/fd/0, 1, and 2 - the filesystem mounted at /dev handles them. But if you run join -t: <(sort /etc/passwd) <(sort /etc/group) in bash, you'll get an error join: /dev/fd/63: No such file or directory. But if you run mount -t fdescfs fdescfs /dev/fd, then that join command will work. – Mark Plotnick Feb 24 '15 at 17:52
  • Thanks - exactly what you describe happens with the join. But this leads me to wonder why fdesc can't be mounted from fstab, given that I can mount it from the command line. – Bob Vesterman Feb 24 '15 at 18:26
  • I think the proper fstab line is fdescfs /dev/fd fdescfs rw 0 0. It's a mystery to me how your existing fstab line once did work. – Mark Plotnick Feb 24 '15 at 18:32

Your fdesc line in fstab appears be mislocated, it should be

fdesc /dev/fd fdescfs rw 0 0

As the first comment noted, the first colum is device name, which is ignored by fdescfs(5), then the mount point, which should be /dev/fd to make it useful. Also the file system type is fdescfs, not fdesc

See the man page fdescfs(5) for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.