How can I programatically eject a live cd?

Bill Schoolcraft bill at wiliweld.com
Sat Nov 12 20:19:18 GMT 2005


At Sat, 12 Nov 2005 it looks like Sean Bruno composed:

> On Sat, 2005-11-12 at 09:35 -0500, Lowell Gilbert wrote:
>> Sean Bruno <sean.bruno at dsl-only.net> writes:
>>
>>> I was looking for an answer to this question.  Since my CD is actually
>>> the running file system(is mounted), I cannnot eject it while the system
>>> is running.
>>>
>>> So is there a way to do this that y'all have found, or do I have to
>>> change my CD to run from memory(RAMDISK) instead of running from the CD.
>>
>> You want to eject your running root filesystem?
>> That's a *really* crazy idea.
>> Why do you want to do that?
>>
> Well, I don't "want" to eject my running root filesystem, but I need to
> have the CD eject on a reboot/halt of the system.
>
> So, is there a "nicer" way of doing this?
>

There is on "other" Unix type OS's the command "eject" which
will actually open the CD tray.  I use it all the time in the
server colo when there is some mislabed machines, I'll make sure
all the CDROM trays are shut, login to the machine and type
"eject" and the tray of the mislabed machine will pop open.

Here is some information that "may or may not" help you in
finding a *BSD equivalent:

#####################################################

[wiliweld at corten8 ~]-> ldd `which eject`
         libc.so.6 => /lib/libc.so.6 (0x4002c000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

[wiliweld at corten8 ~]-> file `which eject`
/usr/bin/eject: ELF 32-bit LSB executable, Intel 80386, version
1 (SYSV), dynamically linked (uses shared libs), not stripped

[wiliweld at corten8 ~]->

#####################################################

-- 
Bill Schoolcraft
PO Box 210076
San Francisco, CA 94121
http://billschoolcraft.com
              ~
"You do best what you like most."



More information about the freebsd-questions mailing list