We would like to use anaconda to generate images which will be used in containers (for example, in Docker). These do not need a kernel. Right now, Anaconda always puts one in place. And really wants to install a bootloader. Currently, we can do this with appliance-creator, but we want to retire that and move to anaconda-based image creation. Note that there are a few packages which require the kernel package -- often, this is to force a specific version, and that could either be dropped for packages which have something like "Requires: kernel > 2.6.30", or replaced with "Conflicts: kernel < 3.5" (which isn't exactly right but accomplishes mostly the same thing without a dependency). In any case, for the minimal images we're making, none of these packages are involved so the set should have dep closure without any changes. I'm not particularly concerned about the mechanic by which this happens. A "container" kickstart command could do it, or a combination of an update to the bootloader command and something else. Whatever you think is best.
So I was asked to add this somewhat similar and related request to this bug as the solution will probably be the same or just require a (minor?) add-on to it. Starting with F21, we plan to split the kernel to allow for smaller footprints (most notably desired in our cloud images). The kernel package will be split into three: - kernel (meta-package that pulls in the other two) - kernel-core (with vmlinuz and only just enough modules to run in virtualized environments) - kernel-drivers (the rest of the modules) Things like kernel-devel, kernel-headers, etc. stay untouched. The split will also affect all platforms, e.g. kernel-PAE will also feature kernel-PAE-core and kernel-PAE-drivers. Now, we need a way to install kernel-core instead of kernel. Either we use the option that is implemented for what mattdm requested above plus adding kernel-core to %packages or some other way is implemented - whatever the anaconda team sees fit. Note that both kernel and kernel-core will provide kernel, in case it's desired (for this use case only, not the above) to ensure a kernel is installed. The kernel split is developed in the following COPR. Note that platforms are not currently being built there.
> Right now, Anaconda always puts one in place. And really wants to install a > bootloader. There's bootloader --location=none already which should skip installing the bootloader onto the disk, though you will still have the package installed and perhaps its config files. Are you looking to avoid that too?
(In reply to Chris Lumens from comment #2) > There's bootloader --location=none already which should skip installing the > bootloader onto the disk, though you will still have the package installed > and perhaps its config files. Are you looking to avoid that too? Yes, definitely. For the container case, as little that isn't required as possible.
For skipping a kernel getting installed, just add "-kernel" to the packages section of your kickstart file. For skipping a bootloader, use "bootloader --disabled".