Bug 201513 - /etc/rc.d/rc.sysinit should create /proc directory before try to mount onto it
/etc/rc.d/rc.sysinit should create /proc directory before try to mount onto it
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-06 18:28 EDT by Richard Lloyd
Modified: 2014-03-16 23:01 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-07 10:13:25 EDT
Type: ---
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 Richard Lloyd 2006-08-06 18:28:32 EDT
Description of problem:
If the /proc directory is missing, the boot sequence doesn't try to create it
before attempting to mount the proc filesystem onto it.

Version-Release number of selected component (if applicable):
Any version (FC4, FC5 and CentOS 4 all exhibit this problem)

How reproducible:
Always

Steps to Reproduce:
1. Install a Red Hat-based distro (e.g. FC5, FC6T1, RHEL4, CentOS etc) onto a
spare partition on your hard drive.
2. Mount that partition in your "original" OS and delete the /proc directory in
that freshly installed distro.
3. Reboot and select the freshly installed OS to be booted via GRUB.

Actual results:
A mount error message is displayed when trying to mount /proc (because of the
missing directory) and then the OS hangs a little further down in the boot
sequence (in the bit where it initialises storage).

Expected results:
The boot sequence should detect the missing /proc directory and try to recreate
it (and maybe display a warning/info message that it's done so) before trying to
mount /proc onto it.

Additional info:
Yes, it's unlikely anyone would delete the proc directory, particularly on the
currently running system (are you even allowed to...I've never dared trying!),
but it's clear that early creation of the missing /proc dir is needed. A quick
look at the initscripts code suggests that /etc/rc.d/rc.sysinit could do with
some love - it currently reads:

# Mount /proc and /sys (done here so volume labels can work with fsck)
mount -n -t proc /proc /proc

Can I suggest that at least a mkdir is placed before the mount command - e.g.:

# Mount /proc and /sys (done here so volume labels can work with fsck)
mkdir -p -m 555 /proc
mount -n -t proc /proc /proc

Yes, that's probably the one-liner no-brainer fix, but you can get fancier with
tests for the directory and warning messages if you want...
Comment 1 Bill Nottingham 2006-08-07 10:13:25 EDT
The root filesystem is read-only, so that won't work at that point.

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