Bug 61771 - /initrd/dev not unmounted when initrd uses devfs
Summary: /initrd/dev not unmounted when initrd uses devfs
Keywords:
Status: CLOSED DUPLICATE of bug 59562
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: initscripts
Version: skipjack-beta1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-24 12:17 UTC by W. Michael Petullo
Modified: 2014-03-17 02:26 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-03-24 12:17:32 UTC
Embargoed:


Attachments (Terms of Use)

Description W. Michael Petullo 2002-03-24 12:17:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.0.2 (X11; Linux i686; U;) Gecko/20011226

Description of problem:
/etc/rc.d/rc.sysinit trys to unmount /initrd.  However, if the initrd uses
devfs, then this unmount fails because devfs is mounted at /initrd/dev.  Since
/initrd/dev can not be mounted until after chroot executes init in the initrd
linuxrc script (following a call to pivot_root), /initrd/dev/must be unmounted
by rc.sysinit.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.  Make an initrd that supports devfs and have its linuxrc mount devfs at /dev.
2.  Linuxrc executes pivot_root and "chroot ... init".
3.  Rc.sysinit tries to unmount /initrd but fails because /initrd/dev is a
mounted devfs.


Actual Results:  Unmount of /initrd by rc.sysinit fails.  Unmounting all
filesystems at system shutdown also fails.



Expected Results:  /initrd and /initrd/dev should have been unmounted as they
are no longer needed.

Additional info:

This patch fixes the bug:

--- rc.sysinit.orig	Sun Mar 24 13:02:24 2002
+++ /etc/rc.d/rc.sysinit	Sun Mar 24 13:03:04 2002
@@ -54,6 +54,9 @@
 
 # Unmount the initrd, if necessary
 if grep -q /initrd /proc/mounts && ! grep -q /initrd/loopfs /proc/mounts ;
then+   if [ -e /initrd/dev/.devfsd ]; then
+      action $"Unmounting initrd devfs: " umount /initrd/dev
+   fi
    action $"Unmounting initrd: " umount /initrd
    /sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
 fi

Comment 1 Bill Nottingham 2002-04-12 20:45:57 UTC

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


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