Bug 809342 - anaconda tries to install grub on wrong device
anaconda tries to install grub on wrong device
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
AcceptedBlocker
:
Depends On:
Blocks: F17Beta/F17BetaBlocker
  Show dependency treegraph
 
Reported: 2012-04-03 03:01 EDT by Matthias Runge
Modified: 2012-04-11 13:22 EDT (History)
7 users (show)

See Also:
Fixed In Version: anaconda-17.20-1.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-05 03:15:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
logs from the attempt to upgrade via a USB stick (223.63 KB, text/plain)
2012-04-03 15:20 EDT, Adam Williamson
no flags Details
crash when just cherrypicking the f16 fix into f17 (258.56 KB, text/plain)
2012-04-03 15:56 EDT, Adam Williamson
no flags Details

  None (edit)
Description Matthias Runge 2012-04-03 03:01:56 EDT
Description of problem:
I got fedora-17 beta rc2 (network install), wrote it to an USB stick using liveusb creator. During upgrade from f16 to f17, the installer tries to update boot loader to configuration on /dev/sdb (usb stick) instead of /dev/sda. One can not change that, except write it to /dev/sda3. In advanced options it is possible to change bios boot order.

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

Skipping writing boot loader leaves system in un-bootable state.
Comment 1 Chris Lumens 2012-04-03 09:51:22 EDT
Please attach /tmp/anaconda.log, /tmp/program.log, and /tmp/syslog as individual files to this bug report.
Comment 2 Matthias Runge 2012-04-03 10:44:25 EDT
The system upgrade went wrong in more than one case. This was on my only system at home, I had to do a fresh install of f17. 

The only file I have, is upgrade.log. 
Sadly, this doesn't help in this case, I guess.
Comment 3 Tim Flink 2012-04-03 12:16:14 EDT
out of curiosity, what version of livecd-creator did you use to create the bootable usb stick?
Comment 4 Adam Williamson 2012-04-03 13:21:44 EDT
more than curiosity, it's an important question. Was it 3.11.6 or something earlier? And can you check the LABEL of the USB stick that was created? It should be LIVE.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 5 Adam Williamson 2012-04-03 13:43:13 EDT
actually, I think there must be something wrong with the description.

You wrote "I got fedora-17 beta rc2 (network install), wrote it to an USB stick using liveusb creator".

liveusb-creator cannot write non-live images (DVD or netinst.iso). So that can't be right. Either you used liveusb-creator but you wrote a Live image, or you used netinst.iso but you wrote it with livecd-iso-to-disk or dd, not liveusb-creator. Which is it? Thanks!



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 6 Matthias Runge 2012-04-03 14:24:24 EDT
It was the latest version available on f16 through update. I updated the machine pretty regular.

The label on the sick is LIVE. 

I took LiveUSB Creator, chose previous downloaded netinst.iso[1] as existing live cd and wrote it to my usb-stick. 
There were several directories created: boot, EFI, LiveOS, syslinux and a file ldlinux.sys.

I was astonished twice: first, because it worked (last time I tried LiveUSB-Creator, it didn't wrote anything). Then I was able to boot.

Another thing: I took a stick from my wife, and there were two files on the stick. They're still there. It's a 256 mb stick, netinst fit's there.

The version I took was this [1]: 
[1] http://dl.fedoraproject.org/pub/alt/stage/17-Beta.RC2/Fedora/x86_64/iso/Fedora-17-Beta-x86_64-netinst.iso
Comment 7 Matthias Runge 2012-04-03 14:27:41 EDT
Version: it had to be the version 3.11.6-1. I'm sure, I didn't install any version other than from fedora repos.
Comment 8 Adam Williamson 2012-04-03 15:18:00 EDT
Huh, odd.

Anyhow, I can reproduce this with boot.iso written to USB with livecd-iso-to-disk, so it doesn't look like the writing method is important.

Test setup:

A system with one 500MB hard disk attached, contents considered 'unreadable' by anaconda (I think it has a busted softRAID or something) so it pops up the dialog warning it'll wipe the disk if I proceed: this is sda

A USB stick with Fedora 16 netinst.iso written to it via livecd-iso-to-disk
A USB stick with Fedora 17 Beta RC2 netinst.iso written to it via livecd-iso-to-disk

Test procedure:

1. Install F16 to the 500GB hard disk, selecting 'Use all space' and ensuring the hard disk is selected as the install and bootloader target device

2. Boot F16 install to check it's all working

3. Boot from the F17 USB stick (only this stick and the hard disk are attached), proceed through installation selecting to upgrade to F16 install on the hard disk. At bootloader selection screen, note that it has decided to use /dev/sdc as the target device: it says 'Install boot loader on /dev/sdc.' There is a 'Change device' button which only gives the option of /dev/sdc or /dev/sda2, and a 'BIOS Drive Order' drop-down which allows you to re-order sda and sdc but has no effect on the disk selected as the bootloader target.

4. Switch to console and verify via dmesg that sda is the 500GB hard disk, and sdc is the USB stick. I have no idea what sdb is - there always seems to be a 'phantom disk' when booting anaconda on this system. But it shouldn't affect the testing.

So, on upgrade, it wants to install the bootloader to sdc (the USB stick), not sda (the hard disk), just as Matthias found. 

Attaching the logs from this test (catted into a single big file).

I note that there's a chunk of code for detecting live backing devices in pyanaconda/storage/devicetree.py in the F16 anaconda branch which is completely absent from the F17 anaconda branch. I think that may be the cause of these regressions around live backing device detection.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 9 Adam Williamson 2012-04-03 15:20:45 EDT
Created attachment 574935 [details]
logs from the attempt to upgrade via a USB stick
Comment 10 Adam Williamson 2012-04-03 15:50:31 EDT
So we definitely went through similar bugs for F16: https://bugzilla.redhat.com/show_bug.cgi?id=750469

The commit that we eventually took to fix that seems to be entirely missing from the F17 anaconda branch: http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=38c6764de599859fe36c0ea58ad03aaf81992d86 exists in f16-branch but not in f17-branch.

If I cherry-pick it into f17-branch and create an updates.img and boot with it, I hit a crash. So it seems like the patch doesn't just transfer smoothly to F17 at this point :/ Will attach the traceback from the crash.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 11 Adam Williamson 2012-04-03 15:56:30 EDT
Created attachment 574940 [details]
crash when just cherrypicking the f16 fix into f17
Comment 12 Fedora Update System 2012-04-03 20:26:31 EDT
anaconda-17.17-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/anaconda-17.17-1.fc17
Comment 13 Adam Williamson 2012-04-03 21:47:58 EDT
Discussed at 2012-04-03 emergency blocker review meeting - http://meetbot.fedoraproject.org/fedora-meeting/2012-04-03/fedora-meeting.2012-04-03-23.08.html . Accepted as a blocker per criterion "The installer must be able to successfully complete an upgrade installation from a clean, fully updated default installation (from any official install medium) of the previous stable Fedora release, either via preupgrade or by booting to the installer manually. The upgraded system must meet all release criteria", in the case of upgrading via an ISO written to USB.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 14 Adam Williamson 2012-04-05 03:15:14 EDT
confirming this is fixed in Beta RC3. the fix is in 17.18 which went stable, but wasn't marked as fixing this bug.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 15 Fedora Update System 2012-04-06 09:58:44 EDT
anaconda-17.19-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/anaconda-17.19-1.fc17
Comment 16 Matthias Runge 2012-04-07 11:19:51 EDT
(a bit late, but better now than never):

thanks to you all, for confirming and fixing this. I can't reproduce the bug any more.
Comment 17 Fedora Update System 2012-04-10 00:14:41 EDT
anaconda-17.20-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/anaconda-17.20-1.fc17
Comment 18 Fedora Update System 2012-04-11 13:22:31 EDT
anaconda-17.20-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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