Bug 594803 - asks me which device to install to, when there's only one
Summary: asks me which device to install to, when there's only one
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Chris Lumens
QA Contact: Release Test Team
: 558689 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-21 16:30 UTC by Bill Nottingham
Modified: 2014-03-17 03:23 UTC (History)
4 users (show)

Fixed In Version: anaconda-13.21.51-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-07-16 15:28:50 UTC
Target Upstream Version:

Attachments (Terms of Use)
storage log (192.30 KB, text/plain)
2010-05-24 18:28 UTC, Bill Nottingham
no flags Details
storage log w/updates image (2.42 KB, text/plain)
2010-05-26 19:24 UTC, Bill Nottingham
no flags Details
anaconda log (6.18 KB, text/plain)
2010-05-26 19:24 UTC, Bill Nottingham
no flags Details
patch (1.55 KB, patch)
2010-05-29 03:09 UTC, Bill Nottingham
no flags Details | Diff
storage.log (117.98 KB, text/x-log)
2010-07-14 17:02 UTC, Alexander Todorov
no flags Details
tarball of all logs from stage2 (40.70 KB, application/x-gzip)
2010-07-14 17:03 UTC, Alexander Todorov
no flags Details

Description Bill Nottingham 2010-05-21 16:30:32 UTC
Description of problem:

Installing on a laptop with only one hard drive, I choose 'basic' storage.

I'm then asked which drives I'd like to install to. Since there's only one choice, it should skip this.

Version-Release number of selected component (if applicable):

20100521 nightly

How reproducible:


Comment 2 Chris Lumens 2010-05-21 20:00:08 UTC
Could you attach /tmp/storage.log and the output of udevadm info --export-db (switch to tty2, hit up arrow a bunch) to this bug report?

Comment 3 Bill Nottingham 2010-05-24 18:28:13 UTC
Created attachment 416192 [details]
storage log

Here's the anaconda storage.log from the installed system. I'll try and get the udevadm output once I'm in a position to do the test install again.

Comment 4 Chris Lumens 2010-05-24 20:02:24 UTC
According to your storage.log, you have two devices:  sda is a USB device of some description, and sdb is a drive with two partitions on it.  Are you doing a hard drive installation method where a USB device is the source?

Comment 5 Bill Nottingham 2010-05-25 14:29:49 UTC
sda is a USB card reader. It had no media in it, and was not ever shown in the UI.

Comment 6 Chris Lumens 2010-05-25 15:16:39 UTC
Does updates=http://clumens.fedorapeople.org/594803.img fix this issue and not drastically slow everything down?

Comment 7 Bill Nottingham 2010-05-26 19:23:17 UTC
It doesn't slow anything down (that I could notice), but it doesn't fix the issue either.

Comment 8 Bill Nottingham 2010-05-26 19:24:04 UTC
Created attachment 416993 [details]
storage log w/updates image

storage log w/updates image

Comment 9 Bill Nottingham 2010-05-26 19:24:36 UTC
Created attachment 416994 [details]
anaconda log

Comment 10 Chris Lumens 2010-05-26 20:25:15 UTC
Can you also jump over to tty2, start python, and paste the output of:

> import parted
> partedDevice = parted.Device("/dev/sda")
> print int(partedDevice.getSize())

Comment 11 Bill Nottingham 2010-05-26 20:34:51 UTC
> partedDevice = parted.Device("/dev/sda")

_ped.IOException: Error opening /dev/sda: No medium found

Comment 12 Bill Nottingham 2010-05-26 20:36:38 UTC
Looks like the populate() step that does the skipping for the device is done after we've decided to show the menu b/c there are there are two devices total.

Comment 13 Chris Lumens 2010-05-26 20:50:54 UTC
Right, that's what I was trying to solve with my updates.img:

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index a85cd1f..9f5b2f5 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -520,6 +520,8 @@ class FilterWindow(InstallWindow):
     def getScreen(self, anaconda):
+        global totalDevices
         (self.xml, self.vbox) = gui.getGladeWidget("filter.glade", "vbox")
         self.buttonBox = self.xml.get_widget("buttonBox")
         self.notebook = self.xml.get_widget("notebook")
@@ -575,12 +577,14 @@ class FilterWindow(InstallWindow):
         (raids, nonraids) = self.split_list(lambda d: isRAID(d) and not isCCISS(d),
+        self.populate(nonraids, mpaths, raids)
         if anaconda.id.simpleFilter:
             # In the typical use case, the user likely only has one drive and
             # there's no point showing either the filtering UI or the
             # cleardisks UI.  Unfortunately, that means we need to duplicate
             # some of the getNext method.
-            if len(singlepaths) == 1:
+            if totalDevices == 1:
                 anaconda.id.storage.exclusiveDisks = [udev_device_get_name(singlepaths[0])]
                 return None
@@ -592,8 +596,6 @@ class FilterWindow(InstallWindow):
                           self._makeMPath(), self._makeOther(),
-        self.populate(nonraids, mpaths, raids)
         # If the "Add Advanced" button is ever clicked, we need to have a list
         # of what devices previously existed so we know what's new.  Then we
         # can just add the new devices to the UI.  This is going to be slow,

Comment 14 RHEL Program Management 2010-05-27 13:55:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 15 Chris Lumens 2010-05-27 20:24:08 UTC
I think I'm going to need access to a machine with this problem, as I don't see anything else obvious in the code that could be a problem.

Comment 16 Bill Nottingham 2010-05-29 03:09:35 UTC
Created attachment 417795 [details]

The issue with the prior patch was that populate() was called before the pages were set up, so totalDevices would never get incremented correctly. On fixing that, I noticed that there would still be an issue because simplepaths could still contain multiple devices.

The attached fixes it by filtering simplepaths based on the size of the device. I decided to read it out of sysfs, but we could create a partedDevice here and do it too... just seemed overkill to init parted on each device.

Comment 17 Chris Lumens 2010-06-04 18:20:30 UTC
Is that patch on top of the one I initially put into this report?

Comment 18 Bill Nottingham 2010-06-04 18:30:26 UTC
It's instead of that patch.

Comment 20 Alexander Todorov 2010-07-07 16:03:41 UTC
I have an ASUS eeePC laptop with integrated USB card reader to test this bug. However I've hit bug #612232 while trying snapshot #7.

Comment 21 Alexander Todorov 2010-07-14 12:53:48 UTC
*** Bug 558689 has been marked as a duplicate of this bug. ***

Comment 22 Alexander Todorov 2010-07-14 17:02:18 UTC
This is not fixed with snapshot #7 / anaconda 13.21.56. 

I have a single disk (sdc) and USB SD card reader (sdb) with no media in it. The Basic storage screen asked me which disk I want to install to and was showing only sdc. Moving back to ASSIGNED.

Will attach storage.log shortly.

Also I went to tty2 and executed:
> import parted
> partedDevice = parted.Device("/dev/sdb")
 a traceback follows: _ped.IOException: Error opening /dev/sdb: No medium found

which is expected.

Comment 23 Alexander Todorov 2010-07-14 17:02:55 UTC
Created attachment 431847 [details]

Comment 24 Alexander Todorov 2010-07-14 17:03:16 UTC
Created attachment 431848 [details]
tarball of all logs from stage2

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