Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We use LiveCD's alot in my line of work. Whether it be fscking file systems, recovering data from a customer to rm'd his server, etc.

I'm looking for a quick way to eject the CDROM and reboot the server.

Does anyone have any one-liners to do this or any other suggestions? Using 'eject' doesn't work most of the time, from what I've tested / used.

We're using RHEL / Cent on most of our servers if that helps :D

share|improve this question
    
Can you provide more details as to the environment running? Is it a default RHEL/CentOS live cd, or something custom? –  Mike Fiedler Apr 9 '10 at 14:11
    
Most of the time they are Knoppix and other variants. –  JPerkSter Apr 9 '10 at 14:45

3 Answers 3

up vote 1 down vote accepted

I don't know what distro your LiveCDs are, but I've used grml(a Knoppix variant) before and when you reboot, it ejects the CD, tells you to remove the CD and hit return to reboot. The prompt can be suppressed by passing it the "noprompt" boot parameter.

So yes it can be done. But all I know about your distro is "knoppix variant".

share|improve this answer

The eject would most likely fail if the disk is still mounted, as part of the exit sequence place the eject call after the umount.

share|improve this answer

If you have properly unmounted any storage devices you mounted. Then you could use the simple method. Hit the power button so the machine reboots, and hit the eject button before the system boots off the disk.

Another option would be to use livecd that immediately loads the image into memory instead of running from the disk.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.