<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=785514713-30042004><FONT face=Arial color=#0000ff size=2>Thanks 
for the script - however, I still have the same problem. I looks like the cd is 
not being unmounted in the %post section - I am using RedHat AS 2.1 if that 
makes a difference. </FONT></SPAN></DIV>
<DIV><SPAN class=785514713-30042004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=785514713-30042004><FONT face=Arial color=#0000ff size=2>In the 
case of your script below, I am unable to eject the CD manually. During a post 
section, I change into vt2 and in the shell, do a mount and I see that the cdrom 
is mounted on /mnt/source. I can't umount from the shell - I get a device or 
resource busy. I tried putting a umount of /mnt/source in the kickstart.py file 
right before the %post scripts run, but same thing - "device or resource busy". 
It must be possible to change disks since kickstart can do it during the rpm 
install - guess I will have to dig around in the kickstart code a bit 
more.</FONT></SPAN></DIV>
<DIV><SPAN class=785514713-30042004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=785514713-30042004><FONT face=Arial color=#0000ff size=2>Thanks 
again for the help.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Wehner, Robert 
  [mailto:Robert.Wehner@McKesson.com] <BR><B>Sent:</B> Thursday, April 29, 2004 
  1:04 PM<BR><B>To:</B> 'Discussion list about Kickstart'<BR><B>Subject:</B> RE: 
  mounting non-install cd in %post cd<BR><BR></FONT></DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff 
  size=2>Using some of the tips mentioned on this list, I've been experimenting 
  with something like this in the %post section. It doesn't eject the RH install 
  CD (I don't believe it is mounted once you hit %post). The user just needs to 
  pull the CD out. Hope this helps.</FONT></SPAN></DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff 
  size=2>================</FONT></SPAN></DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff size=2># 
  use pid to get FDs, not "self"<BR>myPid=$$</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff size=2># 
  TTY we'll use for user 
  input<BR>tty_num=8<BR>user_tty=/dev/tty$tty_num</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff size=2># 
  Store original file descriptors<BR>stdin=$(ls -l /proc/$myPid/fd/0 | awk '/^l/ 
  {print $11}')<BR>stdout=$(ls -l /proc/$myPid/fd/1 | awk '/^l/ {print 
  $11}')<BR></FONT></SPAN></DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff size=2># 
  change to new virtual terminal and set FDs there<BR>exec < $user_tty > 
  $user_tty<BR>chvt $tty_num<BR>echo -n "Insert the next CD and then press 
  'Enter'. "<BR>read ans<BR>echo "Mounting CD..."<BR>updfstab<BR>if (mount 
  /mnt/cdrom); then<BR>   #check that cd is correct; error if 
  not<BR>   disc_label=$(head -1 /mnt/cdrom/.discinfo)<BR>   
  if [ $disc_label = "uniqueString" ]; then<BR>      # 
  unpack CD contents. <BR>   
  else<BR>      echo "This isn't the right CD. Please 
  try again."</FONT></SPAN></DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff 
  size=2>    # handle the please try again 
  part<BR>   fi<BR>   cd /<BR>   umount 
  /mnt/cdrom<BR>   eject<BR>else<BR>   # Error out. CD 
  wouldn't mount, try again<BR>   echo "Error out. CD wouldn't mount, 
  try again"<BR>   eject<BR>fi</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff 
  size=2>#change back the FDs<BR>exec < $stdin > 
  $stdout</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><SPAN class=967485617-29042004><FONT face=Arial color=#0000ff size=2>echo 
  "Done with CD file transfers"<BR></FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><!-- Converted from text/plain format -->
  <P><FONT size=2>Robert<BR></FONT></P>
  <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
    <DIV></DIV>
    <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
    face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Kristen Smith 
    [mailto:kjsmith@nortelnetworks.com] <BR><B>Sent:</B> Thursday, April 29, 
    2004 11:56 AM<BR><B>To:</B> 'kickstart-list@redhat.com'<BR><B>Subject:</B> 
    mounting non-install cd in %post cd<BR><BR></FONT></DIV>
    <P><FONT face=Arial size=2>Been digging around for a while now and can't 
    seem to figure this out. Is there anyway to eject the install cd in a %post 
    section and then mount a newly inserted cd? I have tried various methods of 
    using mount/eject/umount in the %post sections, but can't seem to get it to 
    work. </FONT></P>
    <P><FONT face=Arial size=2>Has anyone had any success doing this? I have 
    multiple CDs with data that need to be installed after the kickstart rpms 
    are installed (unfortunately, I can't make the contents of the CDs rpms and 
    I have to use multiple CDs for this part). I would like to keep from doing 
    the kickstart, rebooting the system and then prompting for the new cds - 
    instead would like to reboot only after everything has been installed - 
    after I have done the kickstart and installed the data from the other 
    CDs.</FONT></P>
    <P><FONT face=Arial size=2>Thanks for the help,</FONT> <BR><FONT face=Arial 
    size=2>Kristen Smith</FONT> <BR><FONT face=Arial size=2>Nortel 
    Networks</FONT> </P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>