Bug 748587 - Detection of live images / USB keys broken in F16 Final TC2
Detection of live images / USB keys broken in F16 Final TC2
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
Depends On:
Blocks: F16Blocker/F16FinalBlocker
  Show dependency treegraph
Reported: 2011-10-24 18:57 EDT by Adam Williamson
Modified: 2011-10-29 02:42 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-10-29 02:42:13 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 Adam Williamson 2011-10-24 18:57:12 EDT
To reproduce, write F16 Final TC2 live image (any one) to a USB stick, boot from the USB stick, run the live installer, and go down any path which pops up the 'data storage devices' / 'install target devices' dialog. The USB stick will show up as an 'install target device' and a possible boot loader target. It should not show up as either, but some changes broke anaconda's detection.

Proposing as a blocker, as we know this detection being broken can cause problems like BIOS boot partition not being created, bootloader being written to the install USB stick rather than the target disk, and so on (we had issues with this at Beta time).
Comment 1 Adam Williamson 2011-10-24 20:00:34 EDT
Add some CCs for blocker votes. Please vote!
Comment 2 Sandro Mathys 2011-10-25 01:16:21 EDT
Is this a regression? I think I've seen the usb stick itself listed in that dialog forever. Never tried to choose it though, maybe anaconda would've disallowed that, but you explicitly state "show" is the problem.

There's also a workaround that can be documented: don't choose the usb stick as target.

-1 blocker
+1 NTH just because this should have been fixed decades ago and this is rather annoying because it brings up the dialogs Adam mentioned in single-disk systems.
Comment 3 Adam Williamson 2011-10-25 02:39:57 EDT
there's more to it; this is the easiest way to reproduce, but the USB stick being considered a valid bootloader target can cause ickier stuff, like what I mentioned in my first post. it means anaconda doesn't worry so much about creating a BIOS boot partition on the actual target disk (because the USB stick constitutes a valid stage1 target), and depending on the path you choose, can result in anaconda just dumping the bootloader on the USB stick and not your install disk. which obviously is not what you want.
Comment 4 Kamil Páral 2011-10-25 05:21:28 EDT
I can confirm that USB stick is shown as a possible installation target. Just wondering, is there a valid use case where I would like to install Fedora from a stick/hard drive to the *same* media? Is that even possible in Anaconda?
If the use case is nonsense, then +1 to blocker.
Comment 5 Adam Williamson 2011-10-25 13:16:38 EDT
That use case is nonsense AFAIK. And anaconda has always *had* code the filter out the USB stick as a possible target, it just got broken. We're not really introducing a new behaviour here. We've always wanted to filter out the stick.
Comment 6 Dennis Gilmore 2011-10-25 15:58:54 EDT
+1 to blocker
Comment 7 Adam Williamson 2011-10-25 16:17:09 EDT
so we have four +1 blocker votes, acceptedblocker.
Comment 8 Fedora Update System 2011-10-25 17:02:18 EDT
anaconda-16.23-1.fc16 has been submitted as an update for Fedora 16.
Comment 9 Sandro Mathys 2011-10-28 03:48:55 EDT
Still broken in F16 Final TC3 (Live Desktop).

[liveuser@localhost ~]$ rpm -qa anaconda
Comment 10 David Lehman 2011-10-28 10:48:50 EDT
Let me clarify some of this.

1. Anaconda has never prevented selecting live media disks as boot or
2. If selected, they would not be cleared or repartitioned, but as of
   F16 they could possibly be chosen as the boot disk if one was not
3. The patch for this bug only prevents selection of live media disks
   when doing custom partitioning. It does not prevent the live media
   disks from appearing in the cleardisks screen (on the left,
   available to move to the right and therefore set as the boot disk)
   in automatic partitioning.

To rework the patch to cover both custom and autopart would be trivial,
but it's up to you to decide if it's too late for that now.

Sandro, if you could tell us what exactly is broken in F16 Final TC3 perhaps we could make some use of that information.
Comment 11 David Lehman 2011-10-28 10:58:01 EDT
This is the patch to properly fix this on top of what's currently there:

diff --git a/pyanaconda/iw/cleardisks_gui.py b/pyanaconda/iw/cleardisks_gui.py
index 9ab4799..0160be7 100644
--- a/pyanaconda/iw/cleardisks_gui.py
+++ b/pyanaconda/iw/cleardisks_gui.py
@@ -77,7 +77,8 @@ class ClearDisksWindow (InstallWindow):
         # optional in which case neither list would be populated.  Luckily,
         # storage.disks takes isIgnored into account and that handles both thes
         # issues.
-        disks = filter(lambda d: not d.format.hidden, anaconda.storage.disks)
+        disks = filter(lambda d: not d.format.hidden and not d.protected,
+                       anaconda.storage.disks)
         self.anaconda = anaconda
@@ -162,7 +163,7 @@ class ClearDisksWindow (InstallWindow):
         if self.anaconda.storage.doAutoPart:
             use_disks = self.anaconda.storage.config.clearPartDisks
-            use_disks = [d.name for d in disks if not d.protected]
+            use_disks = [d.name for d in disks]
Comment 12 Adam Williamson 2011-10-28 12:04:41 EDT
yeah, I tested the fix for the issue as originally described and I'm pretty sure it's good. I don't think we need to fix it any harder at this point.

Fedora Bugzappers volunteer triage team
Comment 13 Adam Williamson 2011-10-28 14:58:39 EDT
Discussed at 2011-10-28 blocker review meeting. The actual blocker issue here ought to be fixed in TC3, we should confirm that and set to VERIFIED. The further issue described by David, which we think is what Sandro saw, we don't consider blocker- or nth-worthy, but if anyone wants to re-consider that, please file a new bug to avoid confusion.

TC3: http://dl.fedoraproject.org/pub/alt/stage/16.TC3/
Comment 14 Sandro Mathys 2011-10-28 18:46:05 EDT
FWIW: I considered this broken just by being able to select the usb stick and didn't do any more precise tests. That's how I understood the bug...and why I thought this wasn't a regression earlier.
Comment 15 Adam Williamson 2011-10-28 19:45:02 EDT
Looks fixed (as fixed as we intended, anyway) in TC3: the live USB is filtered to the left in both 'use all space' and 'create custom layout'.
Comment 16 Adam Williamson 2011-10-29 02:42:13 EDT
anaconda 16.24-2 (glibc rebuild) went stable, so CLOSING.

Fedora Bugzappers volunteer triage team

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