How do I execute a command before kickstart parses ks.cfg?
Posted
by Crazy Chenz
on Server Fault
See other posts from Server Fault
or by Crazy Chenz
Published on 2010-01-12T15:06:41Z
Indexed on
2010/03/22
4:01 UTC
Read the original article
Hit count: 487
How do I execute a command before kickstart parses ks.cfg?
My specific problem is that I want to install redhat into a tmpfs by telling kickstart:
part / --fstype ext3 --size 1000 --maxsize 4000 --ondisk loop1
I've tried doing:
%pre
#!/bin/sh
mkdir /tmp-root
mount -t tmpfs tmpfs /tmp-root
dd if=/dev/zero of=/tmp-root/tmp-root.img bs=4096 count=1000000
losetup /dev/loop1 /tmp-root/tmp-root.img
but that is not done early enough. Ugh!
Update: I'm beginning to think it has nothing to do with being done early enough. I believe it has to do with anaconda and kudzu not thinking that a loopback device is a valid device. I'm not a python guy, so the idea of hacking up the kickstart code sucks!
-Vinnie
© Server Fault or respective owner