Check /var/lib/cobbler/snippets look for partition_select* here is one
on my box that just uses disks
%include /tmp/partinfo
%pre
# Determine how many drives we have
set \$(list-harddrives)
let numd=\$#/2
d1=\$1
d2=\$3
# Determine architecture-specific partitioning needs
EFI_PART=""
PPC_PREP_PART=""
BOOT_PART=""
case \$(uname -m) in
ia64)
EFI_PART="part /boot/efi --fstype vfat --size 200 --recommended"
;;
ppc*)
PPC_PREP_PART="part None --fstype 'PPC PReP Boot' --size 8"
BOOT_PART="part /boot --fstype ext3 --size 200 --recommended"
;;
*)
BOOT_PART="part /boot --fstype ext3 --size 200 --recommended"
;;
esac
cat << EOF > /tmp/partinfo
\$EFI_PART
\$PPC_PREP_PART
\$BOOT_PART
part / --fstype ext3 --size=1024 --grow --ondisk=\$d1 --asprimary
part swap --recommended --ondisk=\$d1 --asprimary
EOF
you could copy that to partition_select_new and change
$SNIPPET('partition_select') $SNIPPET('partition_select_new') in the ks
file (located in /var/lib/cobbler/kickstarts)
On 12/24/2011 5:09 PM, Frank wrote:
Merry Christmas to you All:
Someone on this list helped me over a year ago to set up Cobbler ...
now version 2.0.11.
I do have the following question:
As it is set up now, Cobbler installs CentOS 5 or 6 on servers using
LVM, Cluster Logical Volume Manager (see here:
http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/).
That has created lots of problems for me when e.g. I try to replace
one of two disks in a server (loosing data of one of the disks). It is
really complicated. It would therefore be VERY helpful if one of you
could be so very kind to post a full sample "partition_select" snippet
for a server with two disks with a standard setup -- not LVM.
Here is how then now looks presently in my Cobbler install:
(1)
/var/lib/cobbler/snippets/partition_select
---------
%include /tmp/partinfo
%pre
# Determine how many drives we have
set \$(list-harddrives)
let numd=\$#/2
d1=\$1
d2=\$3
#set $vgname = "VolGroup00"
#set $vgbackupname = "VolGroup01"
if [ ! -z \$d1 ]
then
cat << EOF > /tmp/partinfo
part /boot --fstype ext4 --size=140 --ondisk=\$d1
part pv.1 --size=1024 --grow --ondisk=\$d1
part pv.2 --size=1024 --grow --ondisk=\$d2
volgroup $vgname pv.1
volgroup $vgbackupname pv.2
logvol /tmp --fstype ext4 --name=tmp --vgname=$vgname --size=4096
logvol swap --fstype swap --name=swap --vgname=$vgname --size=1024
--grow --maxsize=4096
logvol /usr --fstype ext4 --name=usr --vgname=$vgname --size=18432
logvol / --fstype ext4 --name=root --vgname=$vgname --size=20480 --grow
logvol /backup --fstype ext4 --name=backup --vgname=$vgbackupname
--size=20480 --grow
EOF
else
cat << EOF > /tmp/partinfo
part /boot --fstype ext4 --size=140 --ondisk=\$d1
part pv.1 --size=1024 --grow --ondisk=\$d1
volgroup $vgname pv.1
logvol /tmp --fstype ext4 --name=tmp --vgname=$vgname --size=4096
logvol swap --fstype swap --name=swap --vgname=$vgname --size=1024
--grow --maxsize=4096
logvol /usr --fstype ext4 --name=usr --vgname=$vgname --size=18432
logvol / --fstype ext4 --name=root --vgname=$vgname --size=20480 --grow
EOF
fi
---------
And the kickstarts file for CentOS 6 looks like this:
(2)
/var/lib/cobbler/kickstarts/centos6.ks
---------
url --url=$tree
lang en_US.UTF-8
keyboard us
reboot
skipx
text
network --device eth0 --bootproto dhcp
rootpw --iscrypted $default_password_crypted
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone Europe/Berlin
zerombr
bootloader --location=mbr --append="rhgb quiet"
clearpart --all --initlabel
$SNIPPET('partition_select6')
%pre
$kickstart_start
$SNIPPET('log_ks_pre')
$SNIPPET('pre_install_network_config')
$SNIPPET('pre_anamon')
%packages --nobase
coreutils
yum
rpm
e2fsprogs
lvm2
sysstat
ntp
openssh-server
openssh-clients
wget
authconfig
sudo
man
man-pages
nano
rdate
%post
$SNIPPET('post_install_network_config')
$SNIPPET('post_install_kernel_options')
$SNIPPET('post_anamon')
$SNIPPET('log_ks_post')
$SNIPPET('cobbler_register')
$kickstart_done
----------
THANK YOU !
Frank
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler