Bug 177781

Summary: mkinitrd init script leaves /loopfs mounted read-write
Product: [Fedora] Fedora Reporter: Ed Swierk <eswierk>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.20-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-03 23:07:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ed Swierk 2006-01-13 22:00:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051201 Fedora/1.5-1.1.fc4.nr Firefox/1.5

Description of problem:
I am booting Fedora from a root filesystem image file that is stored in an ext3 filesystem on /dev/hda1.  mkinitrd generates an init script that handles all the loopback magic just fine.

The only problem is that the init script leaves the filesystem containing the root image mounted read-write on /loopfs.  When I try to mount the same filesystem after the system finishes booting, fsck has to do a journal recovery because the filesystem is dirty.

/proc/mounts shows the filesystem still mounted as /loopfs.  However, when I try umount /dev/hda1, I get "not mounted".


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


How reproducible:
Always

Steps to Reproduce:
Run mkinitrd with / configured as /dev/loop0, and the loopFs stored on an ext3 (or any writable) filesystem.  /etc/fstab looks like this:

/dev/loop0     /         ext3    defaults  1 1
# LOOP0: /dev/hda1 ext3 /boot/rootfs
/dev/hda1      /disk     ext3    defaults  1 1


Expected Results:  The init script should mount the loopfs read-only, since the only thing it needs to do is read the root filesystem image file.


Additional info: