Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
The problem is that nor umount does work. – Hi-Angel Feb 1 at 10:27

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


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.