Re: Kickstart ignoring --label option under %pre script

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

 



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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[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