Variable persistence between pre and post sections in kickstart

Posted in doh , howto

%pre

The pre-install is not inside a chroot environment, so whatever variables you set or export are only available for use outside of a chroot. And that’s the problem with the post install by default.

%post

The post-install is inside a chroot by default. If you attempt to use variables set in the %pre section, you will find they’re not set. If you add –nochroot to the %post declaration, you can share things between the two sections of your kickstart file.

You can also write out to a file in the %pre and read from it in the %post. Just don’t forget files on the newly installed disk such as /etc/fstab are actually /mnt/sysimage/etc/fstab once you’re outside the chroot.

boot_on_fence_kick

Posted by admica   @   6 August 2010

Related Posts

Like this post? Share it!

Digg Twitter StumbleUpon Delicious Technorati Facebook RSS

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Convert pixel based images to vector graphics files
Next Post
Bash integer counter just like in C »
Powered by Wordpress   |   Lunated designed by ZenVerse