This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 871104 - Installer allows use of preexisting root filesystem
Installer allows use of preexisting root filesystem
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
AcceptedNTH
: Regression
Depends On:
Blocks: F18Beta-accepted/F18BetaFreezeExcept
  Show dependency treegraph
 
Reported: 2012-10-29 12:01 EDT by David Lehman
Modified: 2012-11-08 04:38 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-08 04:38:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Lehman 2012-10-29 12:01:56 EDT
Description of problem:
Anaconda currently allows users to set as root a filesystem that existed prior to installation, which has been disallowed since F15 (see bug 629311).

Version-Release number of selected component (if applicable):
anaconda-18.21.-1

How reproducible:
Always

Steps to Reproduce:
1. Create a filesystem (ext4 or xfs)
2. Run the installer
3. Set the fs from step 1 as '/' but do not mark for reformat
  
Actual results:
Installer will happily try to install to the preexisting rootfs and will fail miserably if there is actually a previous installation on it.

Expected results:
Installer does not allow this highly dubious operation.

Additional info:
I have a tested patch ready to send out for review.
Comment 1 Paul Franklin (RHlists) 2012-10-31 13:45:57 EDT
For many years I have created an empty filesystem before
I installed a Fedora on it.  Will your patch allow that?

If not, can I ask that you modify your patch to allow it?

Thanks.
Comment 2 Adam Williamson 2012-10-31 14:22:38 EDT
Discussed at 2012-10-31 NTH review meeting: http://meetbot.fedoraproject.org/fedora-qa/2012-10-31/f18beta-blocker-review-6.2012-10-31-16.00.log.txt . Accepted as NTH as this is a safe and clearly desirable change. For the record, the patch is https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-October/001824.html . 

Paul, I don't believe that would be a problem, this bug only intends to duplicate the pre-F18 behaviour.
Comment 3 Kamil Páral 2012-10-31 14:24:42 EDT
Please think about people (like me) who doesn't have /home on a separate partition. There can be many reasons for that, e.g. a small disk (SSD for example). When I want to reinstall the system, I remove all directories except /home and then set the partition as / without reformatting it.

I wasn't using Anaconda back then, but installers from other distributions. The last time I needed to do it with Anaconda, the partitioning shuffling was pretty difficult, because Anaconda insisted on formatting /.

David, can Anaconda guard against bad uses cases (as in your original description) and still allow the one I just described?
Comment 4 Adam Williamson 2012-10-31 21:10:49 EDT
"Please think about people (like me) who doesn't have /home on a separate partition. There can be many reasons for that, e.g. a small disk (SSD for example)."

Funnily enough, we have this great thing called 'LVM', which we use by default, which lets you easily adjust the size of different partitions, making this really not a big problem. You can install with a 10GB / and a 30GB /home or whatever, and adjust the ratios between them online without losing data later on if it turns out you need to.

My personal take is that your use case is a dumb one which we shouldn't support. We can't support _everything_.
Comment 5 Fedora Update System 2012-10-31 22:51:04 EDT
anaconda-18.22-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.22-1.fc18
Comment 6 David Lehman 2012-11-01 09:36:47 EDT
(In reply to comment #1)
> For many years I have created an empty filesystem before
> I installed a Fedora on it.  Will your patch allow that?
> 
> If not, can I ask that you modify your patch to allow it?

My patch will not allow it. This was not allowed in Fedora 17, either.

If you really need non-default arguments passed to mke2fs you can either use kickstart (see the fsprofile option) or use an updates image to modify /etc/mke2fs.conf.

I realize we could support this in theory, but it involves writing a significant chunk of code to support a use-case that we already support in other ways (see above). It just isn't likely to bubble up to the top of anyone's todo list for that reason.
Comment 7 Fedora Update System 2012-11-01 14:26:34 EDT
Package anaconda-18.22-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.22-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17432/anaconda-18.22-1.fc18
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-11-02 00:05:33 EDT
anaconda-18.23-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.23-1.fc18
Comment 9 Fedora Update System 2012-11-02 21:05:00 EDT
anaconda-18.24-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.24-1.fc18
Comment 10 Fedora Update System 2012-11-05 20:40:11 EST
anaconda-18.25-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.25-1.fc18
Comment 11 Fedora Update System 2012-11-06 21:12:06 EST
anaconda-18.26-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.26-1.fc18
Comment 12 Adam Williamson 2012-11-08 04:38:37 EST
18.26 went stable. Closing. (Bodhi closing of bugs when updates go stable is currently broken).

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