Bug 979205 - EFI: you have not created a bootloader stage1 target device
EFI: you have not created a bootloader stage1 target device
Status: CLOSED DUPLICATE of bug 1010495
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
https://fedoraproject.org/wiki/Common...
: CommonBugs
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-27 19:02 EDT by Chris Murphy
Modified: 2013-09-20 17:34 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-20 17:34:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
anaconda.log (45.49 KB, text/plain)
2013-06-27 19:03 EDT, Chris Murphy
no flags Details
packaging.log (174.38 KB, text/plain)
2013-06-27 19:04 EDT, Chris Murphy
no flags Details
program.log (19.53 KB, text/plain)
2013-06-27 19:04 EDT, Chris Murphy
no flags Details
storage.log (199.24 KB, text/plain)
2013-06-27 19:04 EDT, Chris Murphy
no flags Details
storage.state (20.00 KB, application/octet-stream)
2013-06-27 19:04 EDT, Chris Murphy
no flags Details
dmesg.log (114.10 KB, text/plain)
2013-07-03 19:39 EDT, Chris Murphy
no flags Details
storage.log (165.57 KB, text/plain)
2013-07-03 19:42 EDT, Chris Murphy
no flags Details

  None (edit)
Description Chris Murphy 2013-06-27 19:02:35 EDT
Description of problem:
Manual Partitioning option to use Automatically partition results in an error "you have not created a bootloader stage1 target device"


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


How reproducible:
Always so far (only tested with an existing OS X and Fedora system, with the Fedora system being replaced); appears to be a new problem since beta but I


Steps to Reproduce:
1. OS X installed, and successful F18 or F19 system already instaled.
2. Boot Fedora 19 final RC3 DVD.
3. Use custom partitioning, and in the Manual Partitioning section click on the Automatically partition link.

Actual results:
Error message dialog appears: you have not created a bootloader stage1 target device


Expected results:
To create all of the necessary partitions for a successful installation.


Additional info:
22:46:03,578 INFO storage.ui: skipping unneeded stage1 hfs+ request

This line in program.log and storage.log makes me wonder if this is mactel-boot package specific problem.
Comment 1 Chris Murphy 2013-06-27 19:03:09 EDT
Created attachment 766360 [details]
anaconda.log
Comment 2 Chris Murphy 2013-06-27 19:04:05 EDT
Created attachment 766361 [details]
packaging.log
Comment 3 Chris Murphy 2013-06-27 19:04:16 EDT
Created attachment 766362 [details]
program.log
Comment 4 Chris Murphy 2013-06-27 19:04:27 EDT
Created attachment 766363 [details]
storage.log
Comment 5 Chris Murphy 2013-06-27 19:04:42 EDT
Created attachment 766364 [details]
storage.state
Comment 6 Chris Murphy 2013-06-27 19:12:23 EDT
Version-Release number of selected component (if applicable):
Fedora-19-x86_64-DVD.iso
anaconda-19.30.13-1
mactel-boot-0.9-8
Comment 7 Adam Williamson 2013-06-27 19:41:55 EDT
just to be clear, if you actually go ahead and manually create an EFI system partition, does it work?

Do you hit this if you use guided partitioning rather than custom partitioning+autopart?
Comment 8 Brian Lane 2013-06-27 20:27:50 EDT
Before 19.30.10 (and blivet 0.17) we weren't catching missing /boot/efi in manual partitioning, and we weren't reusing existing ESP's. The log line about skipping should mean that it is using the existing one.
Comment 9 Chris Murphy 2013-06-27 22:07:45 EDT
(In reply to Adam Williamson from comment #7)
> just to be clear, if you actually go ahead and manually create an EFI system
> partition, does it work?

No. To further qualify the answer:

1. Guided partitioning/reclaim space, if I leave an existing /boot/efi set to preserve, I still get the error.

2. Manual partitioning, I'm not allowed by the UI to reuse an existing /boot/efi (options to set it as a mount point are grayed out). If I click + to manually add one, then the blue link to automatically creating partitions vanishes.
Comment 10 Adam Williamson 2013-06-27 22:15:15 EDT
"1. Guided partitioning/reclaim space, if I leave an existing /boot/efi set to preserve, I still get the error."

That's a case we just need to test a bit harder in general, I think. Not exactly what I asked.

"2. Manual partitioning, I'm not allowed by the UI to reuse an existing /boot/efi (options to set it as a mount point are grayed out). If I click + to manually add one, then the blue link to automatically creating partitions vanishes."

Well, sure, that's just how it works - as soon as you create any partition, you lose the ability to use autopart. I was more thinking of you doing autopart *then* reducing the size of one partition and adding an ESP. But just manually creating the whole layout would also be valid. I'm just trying to establish if you can actually create a working setup and the problem is just that we're not smart enough to help you do it very well, or if you're really stymied.

Before writing any commonbugs notes here I'd want to do an awful lot more investigation of how we're behaving on multi-boot UEFI installs in general. I'm sure there's lots of wackiness there.
Comment 11 Chris Murphy 2013-06-27 22:36:12 EDT
(In reply to Adam Williamson from comment #10)
> I was more thinking of you doing
> autopart *then* reducing the size of one partition and adding an ESP.

I get the error message immediately upon clicking the blue link to partition automatically. No partitions are created when I click this, only the error message.

> But
> just manually creating the whole layout would also be valid. I'm just trying
> to establish if you can actually create a working setup and the problem is
> just that we're not smart enough to help you do it very well, or if you're
> really stymied.

With or without an existing system, guided partitioning is broken, manual partitioning's automatic option is also broken. 

Manual partitioning performed manually does work.


> 
> Before writing any commonbugs notes here I'd want to do an awful lot more
> investigation of how we're behaving on multi-boot UEFI installs in general.
> I'm sure there's lots of wackiness there.

The use case is completely removing the prior OS, and installing Fedora 19. I used to be able to do that with guided+reclaim space, now I can't. So it's not multiboot, but rather a replacement scenario.

I just did regression testing in an existing working VirtualBox UEFI VM, and the problem is not reproducible. It seems this is limited to Macs.
Comment 12 Adam Williamson 2013-06-27 22:39:09 EDT
Thanks. But if the use case is 'completely removing the prior OS, and installing Fedora 19' I'm confused at the reference to 'if I leave an existing /boot/efi set to preserve'. If you just wipe all existing partitions in 'reclaim space', does it work?
Comment 13 Chris Murphy 2013-06-27 22:53:24 EDT
(In reply to Adam Williamson from comment #12)
> Thanks. But if the use case is 'completely removing the prior OS, and
> installing Fedora 19' I'm confused at the reference to 'if I leave an
> existing /boot/efi set to preserve'. If you just wipe all existing
> partitions in 'reclaim space', does it work?

Yeah that was confusing: I wasn't considering one instance of OS X and one instance of Fedora to be multiboot because they don't share boot managers or boot loaders. They're completely segregated, even down to having separate ESPs.

So what I think is happening for the first time due to the recent changes, is anaconda is finding the real FAT32 ESP created by Apple's partitioning tool (disk utility), and thinks it doesn't have to create an hfs+ one, but then mactel-boot code is mad because an hfs+ one hasn't been created.
Comment 14 Chris Murphy 2013-06-27 23:00:26 EDT
If I set the hfs+ /boot/efi to preserve or delete, autopartitioning fails (this bug).

If I set the FAT32 EFI System partition to preserve or delete, autopartitioning fails.

Autopartitioning is only working if I set the whole disk from preserve to delete, or if I nuke the GPT.
Comment 15 Chris Murphy 2013-06-27 23:06:51 EDT
Yeah so it doesn't matter if the state of the two ESPs is preserve/preserve or delete/preserve or preserve/delete or delete/delete, autopart fails. Only if I set the disk to delete (thereby deleting all partitions) does autopartitioning work. Weird.
Comment 16 Adam Williamson 2013-06-28 00:23:06 EDT
"So what I think is happening for the first time due to the recent changes, is anaconda is finding the real FAT32 ESP created by Apple's partitioning tool (disk utility), and thinks it doesn't have to create an hfs+ one, but then mactel-boot code is mad because an hfs+ one hasn't been created."

Yeah, that sounds about right. As  bcl mentioned in comment #8, we did include a change late that tries to re-use a pre-existing ESP. Sounds like that needs some tweaking. There's always another damn corner case.

bcl, do we need logs from any of the different cases mentioned above?
Comment 17 Chris Murphy 2013-06-28 15:11:40 EDT
(In reply to Adam Williamson from comment #16)

I'm unsure of the interaction between anaconda and mactel-boot, but it seems that  mactel-boot would be a modifier of anything anaconda does. So it may be that the fix belongs in mactel-boot. And that also ought to protect non-Mac installs from being adversely affected by a fix, should it come before release.

If it comes to a vote on blocking, I'd really be on the fence just because it's so late. I'm leaning -1 even though it'll be a really icky bug for Mac users.
Comment 18 Adam Williamson 2013-06-28 15:16:53 EDT
We're already past go/no-go meeting, any attempt to 'block release' for this would involve a major policy change and have to happen at a much higher level than in-bug voting.

As you describe the issue it doesn't seem to be so much that 'we try and write some configuration and it fails', it's more just a logic failure in anaconda's check for a valid ESP, and that check is definitely in anaconda not in mactel-boot, I think. But I should probably stop speculating and just get some data. I'm going to get our guys in Brno to test this with our test Mac hardware and see if they can reproduce, and if so, probably attach more logs. I'm sure the devs should be able to figure it out from there.
Comment 19 Chris Murphy 2013-06-28 16:08:03 EDT
Understood.

Is it possible there can be an updates image available that'd fix this if applied when booting media? And if so could that reference be put in common bugs?

FWIW I've tested this on two Macs of different vintages, and both exhibit the same problem. While it's not reproducible at all with VirtualBox UEFI.
Comment 20 Adam Williamson 2013-06-28 16:29:13 EDT
"Is it possible there can be an updates image available that'd fix this if applied when booting media? And if so could that reference be put in common bugs?"

Yeah, we all already thought of that separately, it'll probably happen if we can identify a clear fixable bug here. Mjg also suggests that people can simply install Beta and update.
Comment 21 Chris Murphy 2013-06-28 17:13:18 EDT
True, although the small problem with recommending beta is that neither gnome method of updating worked, so if "use beta" is the recommended work around for this bug then we'll also need to recommend a one time update with yum.
Comment 22 Adam Williamson 2013-07-03 15:05:55 EDT
Somehow missed this off of common bugs. It'd be really nice if someone else could test and confirm cmurf's results before I write it up.
Comment 23 Chris Murphy 2013-07-03 19:38:35 EDT
re: the write up. For the less initiated user, there's a really unfortunate collision of bugs that makes a recommended work around more difficult.

1. Most (probably all) Macs lack wireless upon a Fedora install due to needing b43 proprietary firmware, so updates image isn't available unless it's on a USB stick.

2. Beta has two bugs that causes the two Gnome update methods to not work.

If we recommend final release, they either have to use custom partitioning or be instructed how to use an updates image on a USB stick. If we recommend beta, they need to be instructed to copy b43 firmware, reboot, and then do the first software update using yum. In any case, they'll have to deal with the command line at some point.

On quite a few laptops, the two USB ports are so close to each other that it's often not possible to get two USB sticks inserted at the same time, and as the install media will almost certainly have been dd'd, it means the updates image on a usb stick approach will require two sticks. So at the moment my suggestion is two work arounds:

A. If you have ethernet, use the final release with updates image via network.

B. If you don't have ethernet, use beta release, install b43 firmware, do the first software update with yum.

Just a thought. Also, I've reproduced the bug on three Macbook Pro vintages 2008, 2011, and 2012.
Comment 24 Chris Murphy 2013-07-03 19:39:45 EDT
Created attachment 768522 [details]
dmesg.log

Apple Inc. MacBookPro9,2/Mac-6F01561E16C75D06, BIOS MBP91.88Z.00D3.B08.1208081132 08/08/2012
Comment 25 Chris Murphy 2013-07-03 19:42:31 EDT
Created attachment 768523 [details]
storage.log

MacBookPro9,2 (2012)
Same problem as the other models. No matter how much free space I have, or free up through Reclaim Space, if I don't choose the whole disk device for deletion, I get this bug.


23:29:29,831 INFO blivet: skipping unneeded stage1 hfs+ request
...
23:29:29,981 DEBUG blivet: failed to set bootloader stage1 device: failed to find a suitable stage1 device
23:29:29,987 ERR blivet: you have not created a bootloader stage1 target device
Comment 26 Adam Williamson 2013-07-03 19:50:18 EDT
Chris: a thought on issue #1: can you bring up the wireless adapter successfully when booting from a live image?
Comment 27 Chris Murphy 2013-07-03 19:56:00 EDT
(In reply to Adam Williamson from comment #26)
> Chris: a thought on issue #1: can you bring up the wireless adapter
> successfully when booting from a live image?

No, it doesn't even see the interface existing because the firmware isn't there at boot time. I'm 90% certain (or 100% wrong) that I've made media with a persistent overly, added the firmware, and that does allow wireless to become available. But that requires access to something that can run livecd-tools.
Comment 28 Kevin Fenzi 2013-07-04 13:39:40 EDT
So, I'm a bit confused on the scope here...

My reading of comment #15 is that if you specify wiping the entire disk and autopartition it works and you get a completed install? Or did I read that wrong?
(This of course doesn't help anyone who wants to keep osx around)

And we think this is All apple hardware? Or a subset?
Comment 29 Chris Murphy 2013-07-04 13:53:18 EDT
(In reply to Kevin Fenzi from comment #28)
> My reading of comment #15 is that if you specify wiping the entire disk and
> autopartition it works and you get a completed install?

Correct.

> And we think this is All apple hardware? Or a subset?

I think it's all hardware that mactel-boot identifies as needing an hfs+ EFI System partition created, which ought to be all Apple hardware.

So far it happens on all the models I've tested: MacbookPro models dating 2008, 2011, and 2012.

I don't think this is hardware related at all. I think it's an interaction between anaconda and mactel-boot but I don't fully understand the logic or what part thinks an ESP hasn't been created. But it's triggered by the presence of either the FAT32 ESP (created by the OS X Disk Utility whenever it GPT partitions a disk), or the hfs+ ESP created by anaconda+mactel-boot from a prior Fedora.

So the bug is triggered merely by having any ESP on the disk.
Comment 30 Adam Williamson 2013-07-04 17:37:48 EDT
Hum, then it's actually less bad than I thought. mjg59 and I seemed to be reading it as 'any non-custom install attempt on a UEFI Mac will fail' up till now, I think.
Comment 31 Chris Murphy 2013-07-04 17:44:07 EDT
A non-custom install attempt on EFI Mac attempting to preserve any prior OS X or Fedora installation will fail.
Comment 32 Adam Williamson 2013-07-05 17:59:18 EDT
Common bugs entry added: Chris, please advise me of (or simply correct) any inaccuracies you see. thanks!
Comment 33 Chris Murphy 2013-07-05 18:34:25 EDT
FYI it is possible to use livecd-iso-to-disk with overlay to create a stick with persistently functioning wireless. Once the proprietary firmware is added to /lib/firmware, it's found on subsequent reboots, and NetworkManager even remembers, and automatically connects to, recent wireless connections.
Comment 34 Colin Adams 2013-07-09 05:47:38 EDT
I am encountering this bug.

I need to do custom partitioning in order to preserve my /home partition from my current Fedora 14 set up.

As far as I can tell from reading the comments here, it's not possible. is that right?
Comment 35 Chris Murphy 2013-07-09 10:52:26 EDT
(In reply to Colin Adams from comment #34)
This is on a Mac? Custom partition is one of the work arounds for the bug, but you need to create a /boot/efi mountpoint (which on Macs should default to hfs+ format) in addition to /. You should be able to locate the partition for the prior home, click on it, and set its mount point to /home.
Comment 36 Colin Adams 2013-07-09 12:44:34 EDT
This is on a MacBook Air (version2)

I don't understand what "create a /boot/efi mountpoint (which on Macs should default to hfs+ format)" involves.
Comment 37 Chris Murphy 2013-07-09 12:51:48 EDT
In Manual partitioning, you click +, and in the resulting dialog choose the mountpoint /boot/efi and set the size to 100MB. See the commonbugs entry and if that's not clear then comment on the points of confusion so that it can be fixed.

https://fedoraproject.org/wiki/Common_F19_bugs#Apple_EFI_Macs:_EFI_install_alongside_existing_EFI_installed_OS_.28including_OS_X.29_results_in_you_have_not_created_a_bootloader_stage1_target_device_error
Comment 38 Colin Adams 2013-07-09 14:15:28 EDT
That doesn't work. It says there is not enough space on the device.

And that's after deleting a 3.8GB Swap partition, and a 500MB /boot partition. The free space remains at 1.05MB, which is what it is to start with.
Comment 39 Chris Murphy 2013-07-09 14:50:25 EDT
(In reply to Colin Adams from comment #38)
Fedora 19 requires 10GB free space, so the message that there isn't enough space, give your description of what you've deleted, seems correct. This bug is about EFI System partition issues, not space issues. If you need help with creating enough free space for Fedora to install, I suggest posting in:
http://www.forums.fedoraforum.org/forumdisplay.php?f=51
Comment 40 Colin Adams 2013-07-09 14:52:59 EDT
But there's a 50GB / partition. I marked it to be formated.
Comment 41 Chris Murphy 2013-07-09 14:59:41 EDT
(In reply to Colin Adams from comment #40)
See what you did? You didn't say that originally. Start over and create /boot/efi first so that there's enough space to create it. Doesn't seem difficult to figure out that if you don't have enough space to create /boot/efi that the installer will tell you that there's not enough space.
Comment 42 Colin Adams 2013-07-09 15:28:06 EDT
But as I explained, I deleted a 500MB /boot partition, and a 3.8GB swap partition. That should be plenty to fit a 100MB partition into.
Comment 43 Chris Murphy 2013-07-09 16:52:29 EDT
(In reply to Colin Adams from comment #42)
Except the installer is apparently confused if it's still showing 1MB free after you've deleted 3.85GB. That would be a different bug, which would be a good idea to file, just make sure you save out program.log and storage.log so you can attach them to the new bug report. Then if you start over and specify /boot/efi, /boot, swap, /, then reuse the old home by specifying a mount point.
Comment 44 Brian Lane 2013-07-10 20:28:58 EDT
http://bcl.fedorapeople.org/updates/979205.img

May fix this issue. It changes 2 things in blivet:

1) allow 'efi' on Mac so that pre-existing vfat ESP's can be selected in custom and mounted to /boot/efi

2) Set the mountpoint for pre-existing hfs+ ESP to /boot/efi so that autopart will work.

Note that I have tested #1 (my air was setup for bootcamp so the ESP was vfat). These patches haven't been reviewed, may eat your data, etc. But you can give them a try and see if they help.

You can create a usb stick using livecd-iso-to-disk --efi --format --updates 979205.img /path/to/iso /path/to/usb

so that you don't need network to get the updates.img
Comment 45 Chris Murphy 2013-07-10 20:45:40 EDT
(In reply to Brian C. Lane from comment #44)
> 1) allow 'efi' on Mac so that pre-existing vfat ESP's can be selected in
> custom and mounted to /boot/efi
 
> 2) Set the mountpoint for pre-existing hfs+ ESP to /boot/efi so that
> autopart will work.

At least you need to make sure that if both vfat and hfs+ ESPs are present, that the hfs+ one is favored or it results in an unbootable system.

However, because Apple's firmware ignores bootloaders on vfat ESPs if there's no NVRAM entry; and also it always favors hfs+ bootable volumes even if its NVRAM boot order entry is after a vfat ESP located bootloader. This is why mactel-boot creates hfs+ ESPs for grub. I honestly don't see the use case for relying on the existing vfat ESP. On three of my Macs, it's only workable if NVRAM is devoid of any other entry except for Fedora. And no advantage to just creating the hfs+ one if it's not present.
 
> Note that I have tested #1 (my air was setup for bootcamp so the ESP was
> vfat).

I don't follow this. Boot Camp is an OS X application, so if you have grub on the vfat ESP, then Fedora isn't a boot option in either the OS X System Preferences Startup disk panel, and isn't available in the firmware's boot time disk selector. The only way mactel-boot works is by virtue of the ESP being hfs+, and grub files being installed there.

Also, Boot Camp creates hybrid MBRs which is the antithesis of mactel-boot. So I'm pretty confused at this point. I'll try the updates image in some scenarios and report back.
Comment 46 Chris Murphy 2013-07-10 21:49:26 EDT
Attempt 1: Guided partitioning to free space on a Mac that has 3 partitions: a fat32 ESP, OS X, and OS X recovery.

With updates.img in comment 44, the error in this bug isn't triggered. However on a MBP4,1 Fedora doesn't boot after installation, OS X does. And Fedora isn't a boot option in either the System Preferences Startup Disk panel, or in the firmware's boot (time) options menu. So Fedora isn't bootable at all. Further investigation reveals that an hfs+ ESP was not created, rather the existing fat32 ESP was used.

I think using an existing fat32 ESP on Apple hardware is untenable for either guided or custom partitioning, with or without OS X.
Comment 47 Adam Williamson 2013-07-11 01:08:30 EDT
Why would OS X be able to boot from a FAT32 ESP but Fedora not? That doesn't seem to make sense.
Comment 48 Matthew Garrett 2013-07-11 01:16:21 EDT
OS X doesn't boot from a FAT32 ESP.
Comment 49 Brian Lane 2013-07-11 13:25:04 EDT
yeah, nevermind. Those patches didn't help things. And the bootcamp thing was irrelevant.
Comment 50 Rudi Plesch 2013-08-10 19:28:20 EDT
rEFIt shows two options on the flash drive, grub and boot. Booting grub with 'quiet' and 'rhgb' removed and with 'selinux=0', 'noefi', and 'nogpt' eliminates this problem. This is tested on a late 2009 MacBook Pro. Install completes and device boots.
Comment 51 Rudi Plesch 2013-08-10 19:39:48 EDT
(In reply to Rudi Plesch from comment #50)
> rEFIt shows two options on the flash drive, grub and boot. Booting grub with
> 'quiet' and 'rhgb' removed and with 'selinux=0', 'noefi', and 'nogpt'
> eliminates this problem. This is tested on a late 2009 MacBook Pro. Install
> completes and device boots.

After thinking about it for a bit, I think this can only be used to install a legacy bootloader and will only work with bootcamp.
Comment 52 Chris Murphy 2013-09-20 17:34:51 EDT
This is still a bug with Fedora 20 alpha RC4. It prevents testing Fedora on Macs unless the user is willing to delete all existing partitions. Closing this bug as duplicate of new bug 1010495.

*** This bug has been marked as a duplicate of bug 1010495 ***

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