Bug 503299 - grub installs on wrong disk (or wants to)
Summary: grub installs on wrong disk (or wants to)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Radek Vykydal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-31 00:54 UTC by Allen Kistler
Modified: 2010-07-21 16:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-21 16:09:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Allen Kistler 2009-05-31 00:54:48 UTC
Description of problem:
On a multi-disk system, start with at least the first disk (sda) uninitialized and at least one of the others initialized (e.g., sdb, partitioned or not).  Install with any partitioning you desire.  When you get to the "install boot loader" screen, anaconda wants to install grub on the first previously initialized disk (sdb in this example), not on the actual first disk (sda).

Version-Release number of selected component (if applicable):
anaconda-11.5.0.57 (RC2 i386 DVD)

How reproducible:
Always

Steps to Reproduce:
1. Start with sda uninitialized and sdb initialized
2. Boot to the installation CD, initialize sda (and any others)
3. Choose any partitioning and continue

Actual results:
Anaconda defaults to installing grub on sdb (in this example)

Expected results:
Anaconda defaults to installing grub on sda

Additional info:
There are two workarounds.
1. Click "Change Device" and tell anaconda to recognize a different
   (i.e., the correct) BIOS order
2. After installation, boot into the DVD rescue mode to reinstall grub and
   (very important!) to edit grub.conf for the correct hd numbers

If you don't do one of the two things above, the system won't boot off the hd.

I think it's a bug worth fixing at some point.  For F11 GA, it's probably enough to include it in the Release Notes as a known issue (but still fix it for real later).

Comment 1 cornel panceac 2009-05-31 02:55:52 UTC
like this?
https://bugzilla.redhat.com/show_bug.cgi?id=458138

Comment 2 Allen Kistler 2009-05-31 04:28:48 UTC
Re: Comment #1

I don't think so.  The drives are all SCSI for me, but I'd bet IDE would result the same.

I actually tested with 4 drives.  IDs 0-3, all on the same controller, although you only need 2 to see the bug.

If the drives are all initialized or uninitialized to begin, then anaconda puts them in the right order.  But if some are initialized and some are uninitialized, then anaconda says the "BIOS" lists the previously initialized ones before the newly initialized ones.  I'm reasonably sure the BIOS doesn't care which ones have partition tables.  In any case, once you partition them, they definitely go in ID order (like after you install and reboot).

Anaconda does get ID0 = sda, ID1 = sdb, etc., correct.

Comment 3 Chris Lumens 2009-06-01 15:47:47 UTC
The initial partitioning screen has a drop down box that allows you to select which hard drive should be booted from.  This defaults to the first drive in the drivelist, as detected by our bootloader code.  The sort order does not appear to take into account whether the disk is initialized or not, but it does take the BIOS disk order into account.  So I guess it's possible the BIOS could be lying to us here.

What does this drop down box show you?  What's listed in it, and what's the default?  Does the default here differ from the default in the bootloader screen or where grub actually gets installed?

Comment 4 Allen Kistler 2009-06-01 22:02:45 UTC
Take an example where sda is uninitialized and sd[b-d] are initialized.

1. The combo box on the first partitioning screen lists sdb as the boot drive.
   The combo box lists the drives in order: a, b, c, d

2a. If you select Custom Layout, the combo box gets disabled.
    Define the custom layout on the second partitioning screen
       (i.e., custom layout screen).

  The bootloader screen lists the "BIOS" order as b, c, d, a.
  That remains true even if you change the boot drive before it's disabled.
  (You can change the order on the bootloader screen, of course, which is the
   original workaround #1.)

  If you don't change the order on the bootloader screen, then the bootloader
  gets installed on sdb, and grub.conf refers to sda (where /boot usually is)
  as hd3, requiring both parts of original workaround #2.

2b. If you select anything *other* than Custom Layout and select sda as boot
    (changing it from sdb), then grub goes on sda and gets configured
    correctly.

So I guess the original condition in the description should be "install any _custom_ partitioning you desire," since none of the pre-specified options lead to the bootloader screen, where the bug really seems to be.

Comment 5 Bug Zapper 2009-06-09 16:52:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Allen Kistler 2009-06-10 17:26:21 UTC
Re: Comment 5

Moving from F11 back to rawhide.  It only makes sense there.

Comment 7 Bug Zapper 2009-11-16 10:01:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Radek Vykydal 2010-07-21 16:09:30 UTC
This should be fixed in F13 and later. Pre-partitioning boot device selection UI has changed, and in my tests anaconda defaults to sda (the freshly reinitialized) here. Also, change of selection is honored in bootloader (post-partitioning) screen.


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