[CentOS] Update to Centos 5 anaconda kickstart %post bug?

Richard Karhuse rkarhuse at gmail.com
Fri Jan 9 01:49:32 UTC 2009


On Thu, Jan 8, 2009 at 6:14 PM, Warren, Eucke <EWarren at wms.com> wrote:
>
> I am restricted to 5.1 as approved by legal.  5.2 is not approved so 5.3
> isn't an option either.  Once I can sort out whether something
> "official" will fix this I can then determine how to pursue this
> internally.  A workaround fix does not address that the kickstart-built
> system will still contain this bug as it will be built from RPM's that
> are not fixed.
>
> Eucke

OK -- I might be missing something here ... <my apologies, if so!>

You're running your own kickstart file, yes/no?  And, running into
this issue.  Since you can control the ks.cfg, why not put into the
%pre section something that copies the section of the CD that
you need in the %post section to the RAM disk??  E.g.:

    mkdir /tmp/source
    CDR=/mnt/cdrom; [ ! -d "$CDR" ] && mkdir -p "$CDR"
    DEV="/dev/$(sed -ne 's/.*trying to mount CD device //p' /tmp/anaconda.log)"

    if      [ -b "$DEV"     ] ; then
    	:
      elif [ -b /dev/cdrom ] ; then
	DEV=/dev/cdrom
      elif [ -b /dev/scd0 ]  ; then
	DEV=/dev/scd0
      elif [ -b /dev/hdd ]   ; then
	DEV=/dev/hdd
      elif [ -b /dev/hdc ]   ; then
	DEV=/dev/hdc
      elif [ -b /dev/hdb ]   ; then
	DEV=/dev/hdb
       elif [ -b /dev/hda ]   ; then
	DEV=/dev/hda
    else
	DEV=/tmp/cdrom
    fi

    mount -r -t iso9660 "$DEV" "$CDR" && \
       cp -rp $CDR/...    /tmp/source/....

might give you some ideas ...

Remember ... you may be in a chroor'd env in the %post
section, so you may need to have a non-chroot'd %post
that copies the /tmp/source above to your built filesystems
(e.g., /mnt/sysimage/tmp).

I hope that helps ..


   -rak-


More information about the CentOS mailing list