Proposal for --noformat handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



clumens and I were discussing the --noformat option in kickstart files today (sort of came out of bug #652417, but this is a larger proposal) and how we should have a policy in place for people who want to prepare their own filesystems.

First, for those not familiar with the --noformat option, see:
    http://fedoraproject.org/wiki/Anaconda/Kickstart

It is a valid option for part, raid, volgroup, and logvol. It instructs anaconda to not run the mkfs command to initialize the volume. It tells anaconda to assume the volume is ready for use.

The primary use of --noformat is for people using a %pre script to set up complex mount points and then direct anaconda to use then as-is. A common pitfall is people passing --noformat for the / volume definition, which can result in an unusable system.

After discussing the issues for a while, we came up with:

(1) Add a new option to the %pre script definition called --mountpoint=PATH. A pre script defined this way would be treated as a volume preparation script and would executed after other %pre scripts lacking the --mountpoint parameter.

(2) Volume preparation scripts must prepare only a single mount point. On success, they should exit with a status of 0.

(3) Any storage command used for / with the --noformat option would require a '%pre --mountpoint=/' script. If the script is missing or the exit code is non-zero, installation would stop.

Obviously, this doesn't prevent people from creating '%pre --mountpoint=/' scripts that just have "exit 0" as the only line, but that's NOTABUG.

For non-root mount points using the --noformat option, we could have an optional check users could enable to cause anaconda to check the exit code of the %pre script. Our first thought was that anaconda should only enforce the one for /, but users might want it for other mount points. Something like:

    %pre --mountpoint=/home
    ...
    DO STUFF
    ...
    exit 0
    %end

    ...

    part /home --onpart=sda47 --noformat --checkuserinit

Where --checkuserinit tells anaconda to check for a successful return code of the %pre script that sets up that mount point.

Thoughts?  Comments?  Wayland?

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux