RHEL5 kickstart needs to mount cdrom in postinst

Shabazian, Chip Chip.Shabazian at bankofamerica.com
Wed May 9 07:14:47 UTC 2007


I'm not sure how much you need available from the cdrom in the %post,
but I used a workaround in the past when I wanted to get information
from %pre to %post which might help.

What I did was create a ramdrive in %pre and copy what I needed to it.
As long as you umount the ram drive, you can then mount it in %post and
access everything.

As long as what you need in your %post is small enough to fit on a ram
drive, you can use this as a workaround.

Chip

-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of Martin Steinmann
Sent: Tuesday, May 08, 2007 8:06 AM
To: Discussion list about Kickstart
Subject: RE: RHEL5 kickstart needs to mount cdrom in postinst


> -----Original Message-----
> From: kickstart-list-bounces at redhat.com [mailto:kickstart-list- 
> bounces at redhat.com] On Behalf Of John Summerfield
> Sent: Monday, May 07, 2007 5:07 PM
> To: Discussion list about Kickstart
> Subject: Re: RHEL5 kickstart needs to mount cdrom in postinst
> 
> Martin Steinmann wrote:
> > On RHEL4 and FC5 we have the following code in the post install
section
> of the ks.cfg file. It mounts the CD the system just installed from
and
> copies the CD's content to a recovery partition on HD. In order to be
able
> to mount the cdrom, we had to run start_udev.
> >
> > On RHEL5 this no longer seems to work. The ks.cfg post install
section
> executes, but the /recovery/linux directory remains empty. It looks
like
> as if it was not able to mount the cdrom.
> >
> > Does anyone have an idea what could cause this different behavior?
> >
> > #...Make copy of installation CD to the "/recovery" partition 
> > /sbin/start_udev mkdir /recovery/linux mkdir /tempdir mount 
> > /dev/cdrom /tempdir cp -a /tempdir/* /recovery/linux cp -a 
> > /tempdir/.discinfo /recovery/linux umount /tempdir rm -rf /tempdir
> 
> 
> Seems to me there's enough people around who want the CD to be
available
> to %post scripts that Anaconda should be keeping the CD mounted a
little
> longer.
> 
> I have several systems here, laptops and compact desktops, that cannot

> pull a CD in; once it's ejected I need to push the tray or CD back in.
> 
> I think it's worth a bug report; perhaps you can allege a design
fault.


You are correct; the problem is that the CD gets ejected before the post
install script executes. This is different as compared to the behavior
of RHEL4.

Not knowing what the rational was to change this, I can only conclude
that this is a major problem for us. We use Kickstart to custom install
an application on an appliance style product using a slightly modified
RHEL5 install CD and we need to be able to add a couple files during
post install from the CD.

Is there a way to patch Anaconda to get it to not eject the CD?  Where
should I start looking?

--martin


> 
> --
> 
> Cheers
> John
> 
> -- spambait
> 1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
> 
> Please do not reply off-list
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list


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




More information about the Kickstart-list mailing list