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 623545 - mount.tmpfs emits 'id: command not found' error messages at boot time
mount.tmpfs emits 'id: command not found' error messages at boot time
Status: CLOSED DUPLICATE of bug 620924
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-08-12 01:53 EDT by Bruce Jerrick
Modified: 2010-08-12 09:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-12 09:18:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bruce Jerrick 2010-08-12 01:53:15 EDT
Description of problem:
/sbin/mount.tmpfs will emit error messages at boot time, and fails to turn
off restricted mode, if two conditions are met:
    1. A tmpfs filesystem is used (listed in /etc/fstab).
    2. /usr is a separate filesystem, mounted after a tmpfs filesystem.
The problem is simply that /sbin/mount.tmpfs uses 'id', which is in
/usr/bin/id, and hence not yet available.

Version-Release number of selected component (if applicable):
(The error message is emitted by /sbin/mount.tmpfs, but the easy fix is
to coreutils; see "Additional info" below.)

How reproducible:

Steps to Reproduce:
  A tmpfs filesystem in /etc/fstab, e.g.:
      tmpfs  /tmp  tmpfs  defaults  0 0
  A separate /usr filesystem, listed after tmpfs in /etc/fstab .
Then boot (single-user will do).

Actual results:
On the system console (also in /var/log/boot.log):
  Mounting local filesystems:  /sbin/mount.tmpfs: line 22: id: command not found
  /sbin/mount.tmpfs: line 23: id: command not found
  /sbin/mount.tmpfs: line 25: [: -eq: unary operator expected

Expected results:
No error messages after "Mounting local filesystems".

Additional info:
Two possibilities to fix:
1. Change the location of 'id' from /usr/bin/id to /bin/id, in the coreutils
2. Make all the 'id' code in /sbin/mount.tmpfs be conditional on
   'type -t id >/dev/null', and if that fails, assume it's boot time, and
   set restricted=0 .  (No, I don't like it either.)
Comment 1 Bruce Jerrick 2010-08-12 01:56:46 EDT
It looks like the use of 'id' was introduced with rhbz 616393 .
Comment 2 Ondrej Vasik 2010-08-12 04:26:08 EDT
well... there are several binaries in coreutils which were moved from /usr/bin to /bin ... most recent one was readlink. Solution with keeping symlink in /usr/bin and moving binary into /bin is safe enough, however I don't want to polute /bin with more binaries. Anyway, id doesn't depend on anything from /usr/lib, so it is safe to move it.

Karel, as you are the maintainer of /sbin/mount.tmpfs ... which possibility do you prefer?
Comment 3 Karel Zak 2010-08-12 09:11:46 EDT
oh... I don't need id(1) at all (see bug #620924). The bash provides all necessary information in $UID and $EUID. From my point of view you can close this issue.
Comment 4 Ondrej Vasik 2010-08-12 09:18:48 EDT
Ok, thanks ... closing duplicate...

*** This bug has been marked as a duplicate of bug 620924 ***

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