Kickstart ignoring --label option under %pre script

James Laska jlaska at redhat.com
Mon Jun 1 16:41:45 UTC 2009


On Mon, 2009-06-01 at 17:36 +0530, Linux Geek wrote:
> Hello,
> 
> This is my first query. Please correct me if I din't follow complete
> process.
> 
> I am trying to setup label for partitions using kickstart under RHEL5.
> When I use the --label option outside the %pre option it works fine,
> however the same option don't work under %pre section. Below the 2
> configs I am using :
> 
> 1. Outside %pre
> 
> clearpart --all --drives=hda
> part /boot --fstype ext3 --size=100 --ondisk=hda --label=MYLABEL
> 
> 
> 2. Under the %pre section :
> %pre
> (
> set $(list-harddrives)
> 
> let numdrives=$#/2
> disk1=$1
> 
> size1=$2
> disk2=$3
> size2=$4
> 
> if [ "$numdrives" -eq 1 ]; then
>     cat << EOF >> /tmp/partinfo
> part / --fstype ext3 --size=2048 --grow --ondisk=$disk1 --asprimary
> 
> part /boot --fstype ext3 --size=1024 --ondisk=$disk1 --asprimary --label=MYLABEL
> 
> EOF
> )

The pain with %pre and %post scripts often is the ENV they run in or
syntax issues that aren't obvious.  You can always try running your %pre
script by hand from tty2 (press <ctrl><alt>F2) of a manual install for
correctness.  I would recommend double checking your %pre script above
for proper bash syntax.  Everything looks good, but make sure you are
closing out your 'if' stmt.  That could cause the script to fail to run
to completion.

Also, I assume you have it, but be sure to %include /tmp/partinfo in
your kickstart file.

Thanks,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20090601/7c185483/attachment.sig>


More information about the Kickstart-list mailing list