Bug 511210

Summary: Ejecting wrong device
Product: [openSUSE] openSUSE 11.2 Reporter: Karl Eichwalder <ke>
Component: Live MediumAssignee: Jiri Srain <jsrain>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P4 - Low CC: coolo, forgotten_DBWoND-zrO, Larry.Finger, ms, novellbmw, sharms
Version: Milestone 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Documentation Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Karl Eichwalder 2009-06-09 11:02:51 UTC
My computer features 2 DVD drive.  sr0 is a writer from which I was running the GNOME Live medium.

1/ Boot the GNOME Live medium 11.2-milestone2.

2/ Click Install Live medium (the icon on the left side of the desktop, maybe, the label was different).

3/ At the end of the installation sr1 gets ejected.
Comment 1 Stephan Kulow 2009-07-13 11:52:06 UTC
do you have yast log files?
Comment 2 Stephan Kulow 2009-07-13 11:52:51 UTC
I think trying to eject in live-installer is always going to be wrong. We need a hook in the live cd itself that ejects when the live installer created a file.
Comment 3 Jiri Srain 2009-07-15 14:35:30 UTC
Since the live system is in ramdisk, there is no real need to shut it down properly provided partitions are either unmounted, or remounted read-only.

Adding a hook brings a problem that, typically, one of the first things BIOS does is to shut the CD/DVD drive when it is initializing, therefore any hook may not give enough time to remove the media (OTOH,  it still can ask user to push a key).

Stephan, can you implement such hook? Then, I could adapt YaST to trigger it via creating a file...
Comment 4 Stephan Kulow 2009-07-21 09:44:27 UTC
If the live installer should work in more than the openSUSE distribution live cds, then it needs to be implemented in kiwi itself.
Comment 5 Marcus Schaefer 2009-07-21 10:22:12 UTC
Hmm, what I don't understand here is how should kiwi take over control
of the eject call ? The system has booted and runs in runlevel X
depending on the image description. The call to eject the DVD is made
on shutdown of the system so it must be part of an init script
and yes that's distribution specific, each has a different "shutdown"
coding

I could provide a default init script along with the kiwi
code but it's still up to the author of the image description to _include_
and _activate_ the script in its image description.

From a coding perspective it's relatively easy to find the right
device on a kiwi live CD

  cat /proc/mounts | grep livecd | cut -f1 -d " "

that's your device. So I'm wondering why the wrong one is ejected ?
Comment 6 Stephan Kulow 2009-07-21 11:05:48 UTC
the eject is not done on shutdown, but when the live installer is finished and at that point the (right) DVD simply can't be ejected.
Comment 7 Jiri Srain 2009-07-21 13:25:09 UTC
It can, I tried it on a single-drived computer (but I must admit for me it was a big surprise as well).
Comment 8 Steven Harms 2009-09-11 14:38:13 UTC
When installing from a Live USB image, the CDRom is always opened, even when no media is present.
Comment 9 Jiri Srain 2010-01-04 11:35:50 UTC
I will implement Marcus' suggestion when time permits.
Comment 10 Bernhard Wiedemann 2010-04-29 16:04:55 UTC
On 11.3-MS6 it is still ejecting CD when booted from USB-device.
Comment 11 Steven Harms 2010-06-17 16:50:30 UTC
11.3 RC1 still ejecting errantly from Gnome Live Installer
Comment 12 Jiri Srain 2010-06-21 08:27:06 UTC
*** Bug 612340 has been marked as a duplicate of this bug. ***
Comment 13 Jiri Srain 2011-02-16 09:26:10 UTC
*** Bug 668198 has been marked as a duplicate of this bug. ***
Comment 14 Jiri Srain 2011-03-08 12:44:31 UTC
Fixed in SVN trunk for openSUSE 11.5.

I also use cleaner way of reboot (/sbin/reboot instead of fiddling with SysRq commands).
Comment 15 Bernhard Wiedemann 2016-04-15 09:40:44 UTC
This is an autogenerated message for OBS integration:
This bug (511210) was mentioned in
https://build.opensuse.org/request/show/78282 Factory / yast2-live-installer