[ale] [ALE] Any Kickstart Guru's In the House

Jim Kinney jim.kinney at gmail.com
Tue May 22 22:02:41 EDT 2012


I concur. This makes more sense in the %post section as you are not setting
up IP for install but for run.

The %pre stuff should always run before any system image mounting takes
place. Otherwise you can't do things like calculate absolute partition
sizes based of drive size and generate the partition setup block.

On Tue, May 22, 2012 at 9:40 PM, Derek Carter (aka goozbach) <
goozbach at friocorte.com> wrote:

>
>
> Today I also discovered that doing something like this in a '%pre'
> section is a bad idea, as centos6 waits until all pre scripts are
> finished before moving on to steps such as mounting the system image
> (see the problem there?).
>
> Apparently the better way to do this is to have the above stanza be in
> a first %post script with the --nochroot flag like so:
>
>
> - ----------------------
> %end
> #end of packages
>
> #start of first %post
> %post --nochroot
> #!/usr/bin/bash
> while : ; do
>     logger "sleeping for kickstartfiles mount to be available"
>     sleep 10
>     if [ -d /mnt/sysimage/root ]; then
>         cp -a /tmp/foo /mnt/sysimage/tmp/foo
>         # store the installer args
>         cat /proc/cmdline > /mnt/sysimage/installed-version
>         logger "Copied kickstartfiles to system"
>         break
>     fi
> done &
> %end
> #end of first %post
>
> #start of second post
> %post
> echo "this is run inside the new installation's chroot"
>
> #<snip> remainder of your %post script
>
> %end
> - ------------------------------------
>
> Hope that helps...
>
> - --
> Derek
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJPvD/mAAoJECcWlbcE84qz7jEP/iMgo73Uslmiw2FKmBsPy+Nl
> jZsY6mv6N7mu52Jmd2WQZDvgToz36XpmiP/wUG65soANFDxZi5ZBcNA8v04vLPy3
> O1Kb/yQHxd7IAn6PZreyOj22+YNwBfg8O7v7u5wTArXEzek+O8YbAlWmSKozSwVy
> Q/pC8ZJFiP/q9dKlzTzJw848Q7u9rXjuweE5OzZJMiB3eZX47TpMyGvNHrue3bX/
> MCbB56Ga59Gjwd3uSuCi2wjRdKCwgmpyRc3kcrtiBsGk47vf6KUGUPIeB/HPU+QZ
> rJsyYmT9EVuKIA1aa4woKpwK1+4bhSviknsArmENb0Bd9cKGtk1Kf0XUBTXg2NHk
> IfEQBs2amQicfswxlMWA/ybjxh6YPlAIx5H8O7tBk+45oHoKtWKOdC1PWb7LfZ7M
> zAXscSP8RZWjGrtm/VuQeFjVH0bgsBtmsqmr7OAHdcbni5o/ep19DRsCJCu1Zh4J
> 5+K9Ef+uak88FC74LaKwOcBalwtNMJRvYvjXUmTVQninaNlzxTG1E/jWxK0hpGeU
> 5NqQXy5LEbj5/zzDnz+kDLC4zKGl+5Eu0sMWsCWG6Q921idued8taukv+AKy7EQM
> f3wDCVjcQmh4vzI8MpnzmMOuYh5eEXJRvI7yh51yFnogd4Ne4DBRFHYGMeWgnlYT
> lZF9fAFn1556X8MDugJP
> =VIyT
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
-- 
James P. Kinney III

As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as they
please, and those who survive will be left to contemplate the outcome.
- *2011 Noam Chomsky

http://heretothereideas.blogspot.com/
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120522/b3afd124/attachment.html 


More information about the Ale mailing list