I like using Fedora, and nowadays recommend it as my distro of choice for non-technical users. However, I've never been able to use it on my main machine, because I find the installation method too limited. I've used a number of odd arrangements for partitions over the years; it seems automated partitioners finally now have good support for LVM, but I've now moved on to a different scheme involving btrfs subvolumes, which nothing I've seen can use. And in any case, layering these with encryption and RAID and other device mappings can be fraught, and often the arrangement produced is suboptimal even when the automated tool purports to support it.

My preference is a method where I arrange partitions and block devices according to my own preferences, manually, then mount everything in the correct places and execute an install procedure that assumes this. Arch and Exherbo both use this method. It seems, technically, that there should be no reason this wouldn't work for an automatically installed distribution; it requires only skipping the step of partitioning entirely.

What are the general options for using this method in distros that are usually automatically installed? I'm most interested in Fedora, but would also like seeing input regarding other common distros such as CentOS, Mint, Ubuntu, &c.

  • Red Hat has used kickstart for some time. Mentioning Exherbo is odd, since it doesn't recommend anything. Feb 21 '16 at 23:29
  • Looking at kickstart, it doesn't seem to do what I want; it still uses an automated system with fundamental limitations compared to simply arranging volumes manually. And Exherbo, though it doesn't recommend anything, outlines on that very page an installation method which matches exactly what I'm looking for.
    – Tom Hunt
    Feb 22 '16 at 16:11

Use kickstart. Fedora makes this easy for you, after a manual installation it leaves in the root directory the file "anaconda-ks.cfg". This is basically your starting poing, from where you can configure everything for your own installation. This is the same process for fedora, centos, and rhel.

On a fedora boot e.g. from a fedora iso you can point to this file. I prefer to place such file on a http server, but as you can see it can be put on any medium. https://www.centos.org/docs/5/html/5.1/Installation_Guide/s1-kickstart2-startinginstall.html


Fedora, like all RHEL flavored distros, uses kickstart "answer" files.

A kickstart might have lines similar to:

bootloader --location=mbr --driveorder=sda --append="exec-shield=1 selinux=1 rhgb rhgb quiet quiet" 
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --none
ignoredisk --drives=sdb
part pv.253002 --onpart=sda2 --noformat  --encrypted

part /boot --fstype=ext4 --onpart=sda1

volgroup vg_main --pesize=32768 --useexisting --noformat pv.253002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_main --useexisting --noformat
logvol swap --name=lv_swap --vgname=vg_main --useexisting --noformat


A full description of kickstart format is available from pykickstart on github

Specifically for your needs:


Defines a BTRFS volume or subvolume. This command is of the form:

btrfs <mntpoint> --data=<level> --metadata=<level> --label=<label> <partitions*>

for volumes and of the form:

btrfs <mntpoint> --subvol --name=<path> <parent>

for subvolumes.


dmraid --name= --dev=


Assembles a software RAID device. This command is of the form:

raid <mntpoint> --level=<level> --device=<mddevice> <partitions*>

And most important - part which has too many options to list here.
Suffice it to say that part or partition is your main tool for defining storage, prior to btrfs.

part raid.01 --size=6000 --ondisk=sda
part raid.02 --size=6000 --ondisk=sdb
part raid.03 --size=6000 --ondisk=sdc

part swap1 --size=512 --ondisk=sda
part swap2 --size=512 --ondisk=sdb
part swap3 --size=512 --ondisk=sdc

part raid.11 --size=6000 --ondisk=sda
part raid.12 --size=6000 --ondisk=sdb
part raid.13 --size=6000 --ondisk=sdc

raid / --level=1 --device=md0 raid.01 raid.02 raid.03
raid /usr --level=5 --device=md1 raid.11 raid.12 raid.13

Make sure to use clearpart --all if you plan to build the partition using anaconda language, and clearpart --none if you supply a pre-existing scheme (either manually built or using %pre as suggested by @mattdm ).

To use your kickstart during installation, add the following during installation: linux ks=nfs:<server>:/<path>
Of course many other options are available for sourcing the file: direct path on the cd/iso , http , bios device etc.


You can use kickstart. However, rather than using the normal partitioning commands, use a %pre section to run parted and other tools to create whatever scheme you want. See the docs on %pre. Or, you can just do this by hand from a live USB boot.

Either way, sure to give clearpart --none, so this isn't wiped out.

Then, use part --usepart to specify existing devices. You can add --noformat if you've handled filesystem creation yourself, too.

(This is documented in the Fedora installation guide.)

If your needs are more specific than the automated tools will give you but aren't particularly exotic, you don't need kickstart — just create your scheme by hand, and then in the installer, manually match up your existing devices as desired.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.