Bug 198889

Summary: Eject command does not always work in the ks.cfg - yet a normal red hat install does
Product: [Fedora] Fedora Reporter: Ian Nicholls <ian.a.nicholls>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-24 21:03:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Nicholls 2006-07-14 13:08:03 UTC
Description of problem:

On doing a custom install using kickstart the 'eject' command doesn't always
work - however doing a standard Red Hat release does eject the cd

Version-Release number of selected component (if applicable):



How reproducible:

Works on some machines and not on others

Steps to Reproduce:
1. create a custom kickstart with 'eject' at the end of the %POST section
2. do install and see if it ejects before rebooting!
3. repeat install on other hardware
4. on hardware where it does not eject the cd try a standard FC3 install
  
Actual results:

Custom KS - Ejects some cds but not all
Std FC3   - Ejects all

Expected results:

Custom KS - Ejects some cds but not all
Std FC3   - Ejects all

Additional info:

Comment 1 Jeremy Katz 2006-07-19 15:56:36 UTC
Is your %post using --nochroot or not?

Comment 2 Ian Nicholls 2006-07-19 16:04:16 UTC
it is indeed

%post --nochroot
mkdir -p /mnt/sysimage/mnt/cdrom
mkdir -p /mnt/sysimage/root/Genesis/
mkdir /mnt/source
mount /tmp/cdrom /mnt/source
....
copy custom rpms off of the cd
....
eject /tmp/cdrom


Have tried various things like making /dev/hda-d and unmounting then ejecting
them all etc but none do the trick!

Comment 3 Jeremy Katz 2006-07-19 18:48:18 UTC
Are you doing installs off of the cd?

Comment 4 Ian Nicholls 2006-07-19 18:57:10 UTC
Here it is in its entirity

%post --nochroot
mkdir -p /mnt/sysimage/mnt/cdrom
mkdir -p /mnt/sysimage/root/Genesis/
mkdir /mnt/source
mount /tmp/cdrom /mnt/source
TEXT="Copying Genesis RPMS\n\nPlease Wait ..."
/mnt/source/Genesis/install_scripts/dialog --infobox "${TEXT}" 10 30 > /dev/tty0
cp /mnt/source/Genesis/* /mnt/sysimage/root/Genesis -r

TEXT="Installing Genesis_init\n\nPlease Wait ..."
/mnt/source/Genesis/install_scripts/dialog --infobox "${TEXT}" 10 30 > /dev/tty0
ls /mnt/source/Genesis/RPMS/Genesis_update-*.rpm > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
  chroot /mnt/sysimage rpm -i /root/Genesis/RPMS/Genesis_update-*rpm
fi

ls /mnt/source/Genesis/RPMS/Genesis_init-*.rpm > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
  chroot /mnt/sysimage rpm -i /root/Genesis/RPMS/Genesis_init-*rpm
fi

# Install Lilo boot loader - we need this to be able to successfully
# boot HP DL320
if [ -f /mnt/sysimage/etc/lilo.conf.anaconda ]; then
  # Anaconda generously creates the lilo config for us.
  mv /mnt/sysimage/etc/lilo.conf.anaconda /mnt/sysimage/etc/lilo.conf
  sed -i -e 's/c0d0p[0-9][0-9]*$/c0d0/' /mnt/sysimage/etc/lilo.conf
  sed -i -e "s/\([sh]\)da[0-9]/\1da/" /mnt/sysimage/etc/lilo.conf
fi
#
if [ -f /mnt/sysimage/etc/lilo.conf ]; then
  lilo -r /mnt/sysimage
else
  TEXT="We are missing a boot loader config file.\n\n\Panic! This machine will
never be able to reboot."
/mnt/source/Genesis/install_scripts/dialog --infobox "${TEXT}" 10 30 > /dev/tty0
  echo "We are missing a boot loader config file - this machine will never be
able to reboot."
  echo "Sleeping 1 hour!"
  sleep 36000
fi

#Turn off some services in runlevel 5
for FILE in `ls /mnt/sysimage/etc/init.d`; do
  case $FILE in
  sysstat)
     echo "Ignoring service ${FILE}";;
  cpuspeed)
     echo "Ignoring service ${FILE}";;
  messagebus)
     echo "Ignoring service ${FILE}";;
  irqbalance)
     echo "Ignoring service ${FILE}";;
  kudzu)
     echo "Ignoring service ${FILE}";;
  network)
     echo "Ignoring service ${FILE}";;
  *)
     chroot /mnt/sysimage  chkconfig --levels 35 ${FILE} off
  esac
done
eject /tmp/cdrom

Comment 5 Ian Nicholls 2006-10-10 08:44:28 UTC
Any news?

Comment 6 Christian Iseli 2007-01-20 00:41:39 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 7 Red Hat Bugzilla 2007-06-12 03:12:29 UTC
requested by Jams Antill