I have variables set up in the %pre section that look like this:
%pre
VOLGROUP=$(lvdisplay |grep VG | awk '{print $3}' |head -1)
vgchange -a y $VOLGROUP
ROOTVOL=$(lvdisplay |grep root | grep Path | awk '{print $3}')
HOMEVOL=$(lvdisplay |grep home | grep Path | awk '{print $3}')
SWAPVOL=$(lvdisplay |grep swap | grep Path | awk '{print $3}')
%end
Are those variables accessible to Anaconda? So far they seem to be ignored. Here's how I would use them.
logvol /home --fstype="ext4" --noformat --useexisting --name="$LVHOME" --vgname="$VGNAME"
Only the most commonly used commands are available in the pre-installation environment: