Bug 105987 - On "Insert CDROM" prompt, anaconda does not search all cdroms for disc
On "Insert CDROM" prompt, anaconda does not search all cdroms for disc
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-10-01 16:37 EDT by James Laska
Modified: 2013-09-02 01:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-16 09:42:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description James Laska 2003-10-01 16:37:04 EDT
# TESTED w/ Taroon-re0926.RC1.1 on i386

Appears to be a bug in the cdrom switching code for anaconda.  I've gone through
several manual installs with multiple cdrom drives (ide, and usb).  It appears
that if the cdrom's that anaconda needs are in drives already (doesn't matter
which drives), anaconda will use those drives no questions asked (good, this is
the expected behavior).  However, let's say I only have 3 cd drives w/ discs 1-3
in use.  Anaconda will prompt for disc4.  Here's where I think a problem may lie...

When I insert disc4 and click "Okay", anaconda only seems to search the cdrom
whose mount point is /mnt/source (so which ever drive booted disc1 probably).  I
can put disc4 in any of the other 2+ drives, but anaconda will not look there. 
Seems to be a bug in the code below in image.py.  Seems to me like the following
for loop over the cdlist list in image.py should be used also after the prompt
for the next disk to scan through all the kudzu probed cdrom drives attached to
the system.

------- Suspect code -------

cdlist = []
        for (dev, something, descript) in \
            kudzu.probe(kudzu.CLASS_CDROM, kudzu.BUS_UNSPEC, 0):

 # code below should use cdlist when trying to find the next cdrom, instead of
just self.device

        if not done:
        while not done:
        self.messageWindow(_("Change CDROM"),
            _("Please insert disc %d to continue.") % needed)
            if isys.mount(self.device, "/mnt/source",
                  fstype = "iso9660", readOnly = 1):
            isys.mount(self.device, "/mnt/source",
                   fstype = "iso9660", readOnly = 1)
      if os.access("/mnt/source/.discinfo", os.R_OK):
                        f = open("/mnt/source/.discinfo")
            newStamp = f.readline().strip()
                            descr = f.readline().strip()
                            descr = None
                            arch = f.readline().strip()
                            arch = None
                            discNum = getDiscNums(f.readline().strip())
                            discNum = [ 0 ]
                        if (newStamp == timestamp and
                            arch == _arch and
                            needed in discNum):
                done = 1
                            self.currentDisc = discNum
                            # make /tmp/cdrom again so cd gets ejected
                            isys.makeDevInode(self.device, "/tmp/cdrom")
            if not done:
            self.messageWindow(_("Wrong CDROM"),
                _("That's not the correct %s CDROM.")
                                           % (productName,))
                _("The CDROM could not be mounted."))

------- Additional Comments From msf@redhat.com  2003-09-30 16:23 -------

This is a 'by design' behavior.  We eject the CD drive #1, so we expect you to
put it in the CD tray we ejected.  Worth fixing but not a real problem.
Comment 1 Jeremy Katz 2003-10-21 19:03:24 EDT
This isn't really a new behavior, and I've touched this code late one too many
times and had to then deal with a release full of bad cd bugs.  So, targeting to
fix for FC2.
Comment 2 Jeremy Katz 2004-01-06 18:05:38 EST
Committed something that should fix this to CVS.  Could definitely do
with some testing as it's kind of uber-scary code.
Comment 3 James Laska 2004-08-16 09:42:09 EDT
Sorry, this has been fixed for some time...thanks

Note You need to log in before you can comment on or make changes to this bug.