Bug 737203 - Anaconda failure due to error in os-prober script if there is any OS X partition present
Summary: Anaconda failure due to error in os-prober script if there is any OS X partit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedNTH, RejectedBlocker
: 752279 757299 (view as bug list)
Depends On:
Blocks: F16Beta-accepted, F16BetaFreezeExcept
TreeView+ depends on / blocked
 
Reported: 2011-09-09 21:54 UTC by Bastien Nocera
Modified: 2011-12-30 22:55 UTC (History)
17 users (show)

Fixed In Version: grub2-1.99-13.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-30 22:55:30 UTC


Attachments (Terms of Use)
fix the bug (788 bytes, patch)
2011-09-12 17:17 UTC, Bastien Nocera
no flags Details | Diff

Description Bastien Nocera 2011-09-09 21:54:57 UTC
grub2-1.99-5.fc16.x64_64 in the Fedora-16-Nightly-20110908.14-x86_64-Live-desktop.iso image

Anaconda would fail to install the boot loader on my /boot partition because grub2-mkconfig was failing, and returning a 127 exit code.

Turns out that /etc/grub.d/30_os-prober tries to use "grub-probe" to find the MacOS X partition's UUID, instead of the shipped "grub2-probe".

That makes at least rEFIt see the partition as a Linux one.

Comment 1 David Lehman 2011-09-10 00:35:37 UTC
This will prevent bootloader installation on x86 BIOS systems that have other OS installed at the very least. It might even break installs that have no other installed OS.

Comment 2 Adam Williamson 2011-09-10 02:24:23 UTC
I tested TC1 with which installed to make os-prober work, installing alongside Windows, and it worked...so has this script changed in TC2?

I'll do some tests and post results, anyway.

Comment 3 Bastien Nocera 2011-09-11 11:54:12 UTC
(In reply to comment #2)
> I tested TC1 with which installed to make os-prober work, installing alongside
> Windows, and it worked...so has this script changed in TC2?
> 
> I'll do some tests and post results, anyway.

You need to have an OSX partition, I think.

Comment 4 Tim Flink 2011-09-12 15:55:53 UTC
Discussed during the 2011-09-12 Fedora QA meeting. We agreed to defer a decision on the blocker status of this bug due to lack of information.

Under which situations would users hit this bug (OSX partitions, Windows partitions etc.)? Can someone (or more than 1 person) hitting this bug describe the partition layout that they're using?

Comment 5 Bastien Nocera 2011-09-12 17:16:32 UTC
    macosx)
      OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
      osx_entry xnu_kernel 32
      osx_entry xnu_kernel64 64
    ;;  

Given the code, it will fail if there are any detected OSX partitions (grub-probe fails because it doesn't exist, exit code is carried to the end of the script, script thus fails, then grub2-mkconfig is failing)

Comment 6 Bastien Nocera 2011-09-12 17:17:01 UTC
Created attachment 522740 [details]
fix the bug

Comment 7 Adam Williamson 2011-09-12 22:53:23 UTC
updating summary.

Comment 8 Adam Williamson 2011-09-12 22:54:58 UTC
I don't think this quite makes Beta blocker status - we require installation alongside Windows to work at Final, but we have no such criterion for OS X at Beta or Final. I'd vote -1 blocker +1 NTH for Beta  or Final, I think.

Comment 9 Adam Williamson 2011-09-13 01:30:10 UTC
We don't have another blocker review till Friday but we need to decide on blocker status of all uncertain bugs by tomorrow, so can people please vote here?

Comment 10 Jóhann B. Guðmundsson 2011-09-13 09:05:46 UTC
+1 to NTH. +1 to Final blocker

Comment 11 Othman Madjoudj 2011-09-13 13:46:33 UTC
+1 NTH, -1 blocker (afaik we don't have a criterion for multi OS except recently for Windows).

Comment 12 Tim Flink 2011-09-13 16:05:42 UTC
I'm also -1 blocker +1 NTH on this. We don't have any requirements for installing alongside OSX and I can't see blocking release for this.

Total at the moment: -2 blocker, +4 NTH.

I'd like to see -3 blocker before rejecting it, but we have enough to accept as NTH.

Comment 13 John Dulaney 2011-09-13 19:31:42 UTC
-1 blocker, +1 NTH, but recommend modify criteria such that install alongside *any* other OS be required in the future.

Comment 14 Adam Williamson 2011-09-13 19:49:58 UTC
er, really? Plan 9? ReactOS? My Little Pony OS?

I could see adding OS X to the list, but 'any other OS' is a rather large can of worms.

Comment 15 John Dulaney 2011-09-14 17:40:47 UTC
Hey, what's wrong with Little Pony OS?

Anyway, point taken.

Comment 16 Tim Flink 2011-09-14 17:44:00 UTC
Votes went up to -3 for blocker, moving to rejected.

Adding OS X to the list seems a bit odd to me since we explicitly exclude apple
machines from the EFI criterion. We would end up saying "Fedora has to be able
to co-exist with OS X when installed but we don't care so much if the installer
actually boots and runs"

That just seems a little inconsistent to me.

Comment 17 Adam Williamson 2011-09-14 17:48:48 UTC
john: Don't...don't look at my user agent string!

Comment 18 Fedora Admin XMLRPC Client 2011-09-16 19:08:26 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 19 Nicolae Ghimbovschi 2011-11-03 11:18:27 UTC
I had the same issue. The patch fixed it.

Comment 20 Adam Williamson 2011-11-05 16:36:27 UTC
sigh, I kind of expected this would get fixed for final. pjones, can you fix it now?



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 21 Simone Tolotti 2011-11-06 12:09:38 UTC
sooo long discussing instead of releasing a 1 character fix...
SAD.

Comment 22 Mads Kiilerich 2011-11-09 18:37:09 UTC
*** Bug 752279 has been marked as a duplicate of this bug. ***

Comment 23 Adam Williamson 2011-11-10 21:35:15 UTC
simone: the discussion was a separate issue: whether the bug is a blocker or not is an important question to do with the release cycle. the bug could still have been fixed by the maintainer at any time, the blocker discussion simply determines exactly when it would have got pulled into the release.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 24 Adam Williamson 2011-12-08 17:31:06 UTC
*** Bug 757299 has been marked as a duplicate of this bug. ***

Comment 25 Chris Murphy 2011-12-08 18:18:47 UTC
(In reply to comment #6)
> Created attachment 522740 [details]
> fix the bug

I believe the fix grub2-probe should be ${grub_probe} instead rather than hard coding it as grub2-probe, as there is code early in grub2-mkconfig that allows for the proper substitution.

Comment 26 Adam Williamson 2011-12-08 18:32:31 UTC
Chris: yeah, I know. I already fixed it the correct way, it's building for Rawhide ATM.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 27 Adam Williamson 2011-12-08 20:29:20 UTC
I've committed a fix for this and submitted a build for Rawhide, it's waiting on the build server outage. I also submitted the fix upstream:

https://savannah.gnu.org/bugs/index.php?35018

I guess I'll also submit the fix as an F16 update so you can at least do a net install of F16.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 28 Fedora Update System 2011-12-09 17:34:06 UTC
grubby-8.3-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grubby-8.3-2.fc16

Comment 29 Fedora Update System 2011-12-10 06:08:52 UTC
grub2-1.99-13.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grub2-1.99-13.fc16

Comment 30 Fedora Update System 2011-12-11 21:53:22 UTC
Package grub2-1.99-13.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub2-1.99-13.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16975/grub2-1.99-13.fc16
then log in and leave karma (feedback).

Comment 31 Chris Murphy 2011-12-19 01:28:18 UTC
worksforme

grub2-1.99-13.fc16 now correctly produces a grub.cfg (from grub.cfg.new) when manually using grub2-mkconfig -o /boot/grub2/grub.cfg.

Resulting grub.cfg on a system containing Mac OS X 10.7.2 (current), Windows Vista, and Fedora 16,  produces the expected entries for all of them. Previously grub.cfg was not created, and grub.cfg.new was truncated at the 30_os-prober header resulting in only Fedora entries.

Comment 32 joshua 2011-12-23 16:32:55 UTC
Looks much better, but I now see this error:

/sbin/grub2-probe: error: no such disk

... in this output:

+ echo '### BEGIN /etc/grub.d/30_os-prober ###'
+ /etc/grub.d/30_os-prober
Found Mac OS X on /dev/sda2
Found Windows 7 (loader) on /dev/sda4
Found Fedora release 13 (Goddard) on /dev/mapper/VolGrp00-f13_root
Found Fedora release 14 (Laughlin) on /dev/mapper/VolGrp00-f14_root
Found Fedora release 15 (Lovelock) on /dev/mapper/VolGrp00-f15_root
/sbin/grub2-probe: error: no such disk.
+ echo '### END /etc/grub.d/30_os-prober ###'
+ for i in '${grub_mkconfig_dir}/*'
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/30_os-prober-orig
+ test -f /etc/grub.d/30_os-prober-orig
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/30_os-prober-orig
+ echo
+ echo '### BEGIN /etc/grub.d/30_os-prober-orig ###'
+ /etc/grub.d/30_os-prober-orig
Found Mac OS X on /dev/sda2


Not sure what it is probing for, but it isn't happy about not finding it.

Comment 33 Mads Kiilerich 2011-12-23 22:10:27 UTC
(In reply to comment #32)
> Looks much better, but I now see this error:
> 
> /sbin/grub2-probe: error: no such disk
> 
> ... in this output:
> 
> + echo '### BEGIN /etc/grub.d/30_os-prober ###'
> + /etc/grub.d/30_os-prober
> Found Mac OS X on /dev/sda2
> Found Windows 7 (loader) on /dev/sda4
> Found Fedora release 13 (Goddard) on /dev/mapper/VolGrp00-f13_root
> Found Fedora release 14 (Laughlin) on /dev/mapper/VolGrp00-f14_root
> Found Fedora release 15 (Lovelock) on /dev/mapper/VolGrp00-f15_root
> /sbin/grub2-probe: error: no such disk.

That is a different error that requires a different fix - please file a new bug report. To debug it insert 'set -x' in /etc/grub.d/30_os-prober instead of running grub2-mkconfig with -x.

> + echo '### BEGIN /etc/grub.d/30_os-prober-orig ###'

You have created a -orig file manually and it is executed just like (almost) any other file in that directory. Please remove it.

Comment 34 Fedora Update System 2011-12-30 22:55:30 UTC
grub2-1.99-13.fc16 has been pushed to the Fedora 16 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.