%post script for swapfile (was: swapfile instead of swap partition?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 15, 2006, at 11:30 AM, Shabazian, Chip wrote:
Just build the system with no swap disk, then create your swap file in
the %post

On Mar 15, 2006, at 12:21 PM, Philip Rowlands wrote:
On Wed, 15 Mar 2006, Robert Citek wrote:

Is there a way to specify that the kickstart script should create a swapfile instead of a swap partition?

I don't believe anaconda (kickstart) has a way of doing this, but it would certainly be possible in a %post script.

Thanks, Chip and Phil.

I'm not that familiar with putting a script in %post. In a "normal" environment, the script would look something like this:

dd if=/dev/zero of=/swapfile bs=1M size=100
mkswap /swapfile
echo -e "/swapfile\tswap\tswap\tdefaults\t0\t0" >> /etc/fstab

From the docs[1] it looks as though this script will work as-is. If that's not the case, how would I need to modify that script so that it will work in a %post section? Also, what default interpreter is being used to run the script: bash, sh, other? The docs mention that I can change it, but not what the default is, unless I overlooked it.

Again, thanks in advance for any pointers.

[1] http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom- guide/s1-kickstart2-options.html#S2-KICKSTART2-POSTINSTALLCONFIG

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux