Bug 521972

Summary: appliance-creator creates appliances that won't fsck the root filesystem
Product: [Fedora] Fedora Reporter: Daphne Shaw <dshaw>
Component: appliance-toolsAssignee: David Huff <dhuff>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dhuff, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 14:32:59 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 Daphne Shaw 2009-09-08 21:54:18 UTC
Description of problem:

If appliance-creator is used to make an appliance, the root filesystem is mounted read/write from the start, which makes it not fsck even after an unclean restart.

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

appliance-tools-004.4-2.fc11.noarch

Steps to Reproduce:
1.  Make an appliance and boot it.
2.  Touch /forcefsck (easier than forcing crashes to make it fsck for a real reason)
3.  Reboot
  
Actual results:

No fsck

Expected results:

A forced fsck

Additional info:

This seems to be an issue with the parameters that appliance-creator passes to mkinitrd.  It uses rootopts="defaults" rather than rootopts="defaults,ro".

There may be better/cleaner ways to fix this, but this patch worked for me:

--- /usr/lib/python2.6/site-packages/appcreate/appliance.py.orig	2009-09-08 17:18:25.454708315 -0400
+++ /usr/lib/python2.6/site-packages/appcreate/appliance.py	2009-09-08 17:33:11.083350016 -0400
@@ -72,7 +72,7 @@
                     p = p1
                     break
 
-            s +=  "%(device)s  %(mountpoint)s %(fstype)s    defaults,noatime 0 0\n" %  {
+            s +=  "%(device)s  %(mountpoint)s %(fstype)s    defaults,noatime 0 1\n" %  {
                 'device': "/dev/%s%-d" % (p['disk'], p['num']),
                 'mountpoint': p['mountpoint'],
                 'fstype': p['fstype'] }
@@ -91,7 +91,7 @@
         mkinitrd += "PROBE=\"no\"\n"
         mkinitrd += "MODULES=\"ext3 ata_piix sd_mod libata scsi_mod\"\n"
         mkinitrd += "rootfs=\"ext3\"\n"
-        mkinitrd += "rootopts=\"defaults\"\n"
+        mkinitrd += "rootopts=\"defaults,ro\"\n"
         
         logging.debug("Writing mkinitrd config %s/etc/sysconfig/mkinitrd" % self._instroot)
         os.makedirs(self._instroot + "/etc/sysconfig/",mode=644)

Comment 1 Bug Zapper 2010-04-28 10:14:51 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Bug Zapper 2010-06-28 14:32:59 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.