We have a very simple snippet that helps cobbler partition our servers
during a kickstart. This was working with no issues for 4.8 and 5.4 till we
recently starting moving our systems to 5.7. Now we get the same error with
every kickstart. Any advice or suggestions for better options are more
than welcome. I am stuck.
Thanks
Ed
I see the following printed to the screen during a kickstart
File "/usr/lib/python2.4/site-packages/pykickstart/parser.py", line 1128,
in readKickstart fh = open(file)
IOError: [Errno 2] No such file or directory: '/tmp/partitions' install
existed abnormally [1/1]
Below is the snippet
%include /tmp/partitions
%pre
LIST=/tmp/drives
cmd="list-harddrives"
$cmd > $LIST
cchk=`awk '/^cciss/ {print $1}' $LIST|head -1`
schk=`awk '/^sda/ {print $1}' $LIST|head -1`
if [ -z "$schk" -a -z "$cchk" ]; then
echo "No HP or SAN attached disks found; exiting."
exit 1
fi
if [ -n "$cchk" ]; then
REST="$cchk"
else
REST="$schk"
fi
if [ -n "$schk" ]; then
BOOT="$schk"
else
BOOT="$cchk"
fi
#export BOOT REST
cat << EOP > /tmp/partitions
bootloader --location=mbr
clearpart --all --initlabel
part / --fstype=ext3 --size=6144 --ondisk=$BOOT
part /opt --fstype=ext3 --size=1 --grow --ondisk=$REST
part /var --fstype=ext3 --size=2048 --ondisk=$BOOT
part /tmp --fstype=ext3 --size=1024 --ondisk=$REST
part swap --size=2048 --ondisk=$REST
EOP
Show replies by date
From: cobbler-bounces(a)lists.fedorahosted.org
[mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of Edward Bailey
Sent: Tuesday, December 13, 2011 10:05 AM
To: cobbler(a)lists.fedorahosted.org
Subject: issue with cobbler snippet not working since we started using OEL and RHEL 5.7
We have a very simple snippet that helps cobbler partition our servers during a kickstart.
This was working with no issues for 4.8 and 5.4 till we recently starting moving our
systems to 5.7. Now we get the same error with every kickstart. Any advice or suggestions
for better options are more than welcome. I am stuck.
Thanks
Ed
I see the following printed to the screen during a kickstart
File "/usr/lib/python2.4/site-packages/pykickstart/parser.py", line 1128, in
readKickstart fh = open(file)
IOError: [Errno 2] No such file or directory: '/tmp/partitions' install existed
abnormally [1/1]
Below is the snippet
%include /tmp/partitions
%pre
LIST=/tmp/drives
cmd="list-harddrives"
$cmd > $LIST
cchk=`awk '/^cciss/ {print $1}' $LIST|head -1`
schk=`awk '/^sda/ {print $1}' $LIST|head -1`
if [ -z "$schk" -a -z "$cchk" ]; then
echo "No HP or SAN attached disks found; exiting."
exit 1
fi
if [ -n "$cchk" ]; then
REST="$cchk"
else
REST="$schk"
fi
if [ -n "$schk" ]; then
BOOT="$schk"
else
BOOT="$cchk"
fi
#export BOOT REST
cat << EOP > /tmp/partitions
bootloader --location=mbr
clearpart --all --initlabel
part / --fstype=ext3 --size=6144 --ondisk=$BOOT
part /opt --fstype=ext3 --size=1 --grow --ondisk=$REST
part /var --fstype=ext3 --size=2048 --ondisk=$BOOT
part /tmp --fstype=ext3 --size=1024 --ondisk=$REST
part swap --size=2048 --ondisk=$REST
EOP
Add this to the top of your %pre, then look at the /tmp/ks-pre.log file:
exec 1>/tmp/ks-pre.log 2>&1
*******************************************************
This message (including any files transmitted with it) may contain confidential and/or
proprietary information, is the property of Interactive Data Corporation and/or its
subsidiaries, and is directed only to the addressee(s). If you are not the designated
recipient or have reason to believe you received this message in error, please delete this
message from your system and notify the sender immediately. An unintended recipient's
disclosure, copying, distribution, or use of this message or any attachments is prohibited
and may be unlawful.
*******************************************************