cancel
Showing results for 
Search instead for 
Did you mean: 

KickStart & ejecting CD-Rom

SOLVED
Go to solution
Don_89
Trusted Contributor

KickStart & ejecting CD-Rom

Greets...

I'm having a hell of a time trying to get the cdrom to eject in the %post section of a kickstart script. I've tried /mnt/sysimage/eject ; /mnt/sysimage/eject /dev/cdrom and some others.. If I try it from another terminal while anaconda is running , I get 'no device found'.. So the million dollar question is , what is the device name for the cdrom on a compaq dl380 g3 during the install process?

thanks..
11 REPLIES
Alexander Chuzhoy
Honored Contributor

Re: KickStart & ejecting CD-Rom

did you try simply
/usr/bin/eject
Huc_1
Honored Contributor

Re: KickStart & ejecting CD-Rom

Nice that Alexander.. did not know that one

but now the question is

eject cdrom
or
eject /dev/cdrom

perhaps start install process ... then CTRL F2
(or CTRL F3 do not remember which) to the # prompt and there a

#df
#cat /etc/fstab

Should do the trick ?

J-P
Smile I will feel the difference
Alexander Chuzhoy
Honored Contributor

Re: KickStart & ejecting CD-Rom

Hey Huc! I guess it'll work without argument. i.e. just eject
Don_89
Trusted Contributor

Re: KickStart & ejecting CD-Rom

Eject works when the OS is booted but not during the install process. I've tried 20 different combinations including all the suggestions from the last 4 posts..

thanks to all that have replied but I'm still looking for a solution..

Huc_1
Honored Contributor

Re: KickStart & ejecting CD-Rom

I know you may have tryed this ...

but just in case have you tryed

eject /dev/hdc

cause normaly /dev/cdrom is a soft link to /dev/hdX (that is most of the times hdc)

J-P (still hoping to be of use !)
Smile I will feel the difference
Steven E. Protter
Exalted Contributor
Solution

Re: KickStart & ejecting CD-Rom

The only thing that will stop an eject is the cdrom which has a filesystem on it being mounted.

If you start the install by doing a cd /cdrom (or whatever its called) this could be the caus of the problem.

If however you kick the install by booting the box with the cd in the drive and let the bios auto boot off the cd, this should not be happening.

If you are auto booting, you probably need to open up the box and make sure the cd is set up to be compatible with the other IDE devices on the connecting ribbon.

If its sharing with a hard disk, the default configuration is cs for cable select. Sometimes that does not work in which case the disk must be master and the cd must be set to slave.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alexander Chuzhoy
Honored Contributor

Re: KickStart & ejecting CD-Rom

By the way do you choose to install the eject rpm in your Kickstart configuration?
Don_89
Trusted Contributor

Re: KickStart & ejecting CD-Rom

Some good suggestions but still no luck..

I'm booting off a CD which has all the netboot images for Red Hat from Compaq.. AS 2.1, AS 2.1#2 and ES 2.1. That CD loads the initrd and kernel for the install and pulls the kickstart script off a NFS share.. The media for installation is also located on NFS.

I verified that the CDROM isn't being mounted to a directory.. Thats not the problem. The 'eject' command does work since I went to a different TTY and tried it.. Its located at /mnt/sysimage/usr/bin/

I tried all of the following mulitple times.. Still can't that sucker to pop out.. .

eject
eject /dev/cdrom
eject cdrom
eject /dev/hda
eject /dev/hdb
eject /dev/hdc



Stuart Browne
Honored Contributor

Re: KickStart & ejecting CD-Rom

You've got no chance of ejecting the CD from a %post. The CD is most definately in use (as SEP mentions).

The RH installer usually ejects it it's self.

But as you are doing a KS, ... yea, I have the same issue (but have just been ignoring it) ;) (KS, booting from CD, installing from NFS).

Unfortunately, I don't think it can be done.

Which leaves you the option of making a boot diskette (shrinking driver modules to fit on a single floppy is a pain-in-the-arse!) and ejecting that, creating a fully networked installer (private segment with a DHCP server etc.), or ... dunno, haven't done the 'or' yet..

Sorry.
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: KickStart & ejecting CD-Rom

Hrm.. Just had an odd thought (not tried this so..)

'pivot_root'. Linux does this upon bootup, which is what allows it to use an 'initrd' at boot, but mount a root filesystem.

You may be able to pivot_root to your new filesystem, and then eject the CD..

wild idea, and untried.. Worth a thought though..
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: KickStart & ejecting CD-Rom

After doing some experimentation (built my boot-cd etc. etc.), found out that the CD doesn't get locked until later in the install routine.

You may be able to customize a boot CD, throw an eject binary (statically linked) on there, and eject it at the end of a %pre.

The instructions to do such a thing are message (from RH), but the original instructions actually come from http://syslinux.zytor.com/iso.php, and are nice and clear!

mm.. Kick-start fun.. ;)
One long-haired git at your service...