Bug 201513 - /etc/rc.d/rc.sysinit should create /proc directory before try to mount onto it
Summary: /etc/rc.d/rc.sysinit should create /proc directory before try to mount onto it
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-06 22:28 UTC by Richard Lloyd
Modified: 2014-03-17 03:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-07 14:13:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard Lloyd 2006-08-06 22:28:32 UTC
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 14:13:25 UTC
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.