Remove /home from 'autopart_options' variable in kickstart


This is Foreman 1.22.0.
The default kickstart partition table creates:


sda 8:0 0 59.6G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 58.6G 0 part
├─centos_MYSERVER-root 253:0 0 36.7G 0 lvm /
├─centos_MYSERVER-swap 253:1 0 4G 0 lvm [SWAP]
└─centos_MYSERVER-home 253:2 0 17.9G 0 lvm /home

I need to find where is the ‘autopart_options’ variable defined to remove the /home.
I know I can use ‘lvremove’ to remove /home after the logical volumes are created, but I would like to avoid that option.



I assume you’re talking about a line in the template that looks like this:

autopart <%= host_param('autopart_options') %>

As you can see from the function call to “host_param”, this queries if the host has a parameter call “autopart_options” and if so, pasts that there.
You can set this on a per-host level under “host parameters”, on hostgroup level under “hostgroup parameters” and even setting it as a global parameter should work.
According to the RHEL7 Kickstart Documentation you want --nohome in there.


1 Like

@areyus answer is correct, but I want to add one level he forget. I typically set such parameters for an operatingsystem as I want to have such basic settings being the same for all systems with the same operatingsystem. Best example in my use case would be the puppet version and source via enable-puppetlabs-puppet5-repo.

1 Like


I do not have any variable defined in any of the places you mention. I am using the default partition template and some how, some where the ‘autopart_options’ has a default value assigned. I need to find where is ‘autopart_options’ set. What file holds the default value? I read the /tmp/anaconda* file after the installation and I see ‘autopart --type=lvm’ nothing else. This ‘–type=lvm’ is the ‘autopart_options’ value and it has /root, swap, /home defined as well, because that is the disk layout after finished. I need to know where are those “loggroup” & “logvol” commands to eliminate the /home.



In my case I am not using puppet. I am using all defaults. I am using ansilbe roles.



I think you misunderstand the concept of autopart.
Autopart is an installer command the causes the installer to guess what would probably be a good partitioning scheme for your disk. Pleas see the link I posted (Search for autopart).
Actually, I do not know where “–type=lvm” comes from, that might as well be a Foreman default as a Kickstart/Anaconda default. As I mentioned, you have to set these yourselfs. The place to do so is usually under “Parameters” (at least with Puppet and I think it should be the same without). There should be a section “(Host/Hostgroup/Whatever) Parameters” where you can add new ones via a button.
As @Dirk mentioned, for the autopart options it might be best to do it on the Operating System level.