On 12/02/2010 01:08 PM, Jared Rodriguez wrote:
I'm building a bunch of virtual machines and I want to make sure
that the swap
partition comes first on the disk. Sometimes we need to expand
storage on VMs
and this is much harder if the swap partition is after the /
partition. Is
there a way with the partition command to control where on the disk a
partition goes?
We use something like this:
zerombr yes
clearpart --all --initlabel
part /boot --fstype "ext3" --size=100 --asprimary
part /tmp --fstype "ext3" --size=2048 --asprimary
part / --fstype "ext3" --size=1 --grow
%include /tmp/swap.cfg
swap is dynamically generated during the bootstrap process. The
configuration creates the following partitions:
/dev/sda1 /boot
/dev/sda2 /tmp
/dev/sda3 swap
/dev/sda4 extended
/dev/sda5 /
I am not aware of any other way to make anaconda honor the position of
the swap partition.
jrod
We use somewhat similar solution:
part --onpart=sda1 swap
part --onpart=sda2 / --fstype ext4
For that to work in %pre section we run fdisk, which we feed with file
that has all fdisk commands written one per line.
%pre
/usr/bin/wget -nv http://myserver/path/to/file/fdisk.input -O /tmp/fdisk.input
/usr/sbin/fdisk /dev/sda< /tmp/fdisk.input
Leon
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list