Mount cdrom in %post

John Monaco xjmonaco at ti.com
Tue Dec 7 15:42:22 UTC 2004


Corey,

     For IDE CD/DVD-ROM drives, I wrote this:

_____________________________________________________________________________________ 

error_count=0
echo -n "Mounting the DVD drive "
mkdir /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
error_count=`expr ${error_count} + ${?}`
echo -n "."
mount -r -t iso9660 /dev/scd0 /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
error_count=`expr ${error_count} + ${?}`
echo -n "."
sleep 2
echo -n "."

if
   [ -d /mnt/vlct_redhat/RH7.3 ]
then
   :
else
   mount -r -t iso9660 /dev/cdrom /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
   error_count=`expr ${error_count} + ${?}`
   echo -n "."
   sleep 2
   echo -n "."

   if
     [ -d /mnt/vlct_redhat/RH7.3 ]
   then
     :
   else
     mount -r -t iso9660 /dev/cdrom1 /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
     error_count=`expr ${error_count} + ${?}`
     echo -n "."
     sleep 2
     echo -n "."

     if
       [ -d /mnt/vlct_redhat/RH7.3 ]
     then
       :
     else
       mount -r -t iso9660 /dev/hdb /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
       error_count=`expr ${error_count} + ${?}`
       echo -n "."
       sleep 2
       echo -n "."

       if
         [ -d /mnt/vlct_redhat/RH7.3 ]
       then
         :
       else
         mount -r -t iso9660 /dev/hdc /mnt/vlct_redhat 2>> ${STD_ERROR_LOG}
         error_count=`expr ${error_count} + ${?}`
         echo -n "."
         sleep 2
         echo -n "."

         if
           [ -d /mnt/vlct_redhat/RH7.3 ]
         then
           :
         else
           mount -r -t iso9660 /dev/hdd /mnt/vlct_redhat 2>> 
${STD_ERROR_LOG}
           error_count=`expr ${error_count} + ${?}`
           echo -n "."
           sleep 2
           echo -n "."
           if
             [ -d /mnt/vlct_redhat/RH7.3 ]
           then
             :
           else
             echo -e " done, but there were errors\n"
             echo "Unable to mount the DVD drive!" >&2
             echo "Your configuration is not currently supported!" >&2
           fi

         fi

       fi

     fi

   fi

fi

         Sincerely,

         John S. Monaco

         System Administrator & "Linux Dude"
         TI WW MAKE IT
         Infrastructure System Engineering and Administration
         E-mail: xjmonaco at ti.com
         Phone:  (214) 567-5831


Corey Epps wrote:
> I'm having a problem getting some customized rpms installed during %post
>  
> Is there a way to mount the cdrom in the post install?
>  
> I've looked at using:
>  
> # updfstab
> # mount -t iso9660 /dev/cdrom /mnt/cdrom
> # cp /mnt/cdrom/extras/*.rpm /mnt/sysimage/root/rpm
> Can this command be run in chroot?
>  
> I'm trying to copy some rpms out of /extras/*.rpm on my AS3 kickstart cd.
>  
> Any help on this would be great.  Thanks.
>  
> .
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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