Bug 1020112 - Fedora 20 alpha DVD is not recognized as bootable disk on Apple G5
Fedora 20 alpha DVD is not recognized as bootable disk on Apple G5
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
20
ppc64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
AcceptedFreezeException
:
: 1031377 (view as bug list)
Depends On:
Blocks: F20FinalFreezeException
  Show dependency treegraph
 
Reported: 2013-10-16 23:49 EDT by Ronald Maas
Modified: 2014-11-11 19:20 EST (History)
9 users (show)

See Also:
Fixed In Version: lorax-20.4-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 00:34:57 EST
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)
patch to bless boot directory (1.21 KB, patch)
2013-12-05 17:58 EST, Brian Lane
no flags Details | Diff
Patch to bless boot directory (the sequel) (1.25 KB, patch)
2013-12-05 21:40 EST, Erik Larsson
no flags Details | Diff
Patch to bless boot directory (the sequel, v2) (1.25 KB, patch)
2013-12-10 23:03 EST, Erik Larsson
no flags Details | Diff

  None (edit)
Description Ronald Maas 2013-10-16 23:49:00 EDT
Apple G5 does not recognize both images located on /releases/test/20-Alpha/Fedora/ppc64/iso as valid boot disks even after pressing C during chime. Computer always boots from hard drive. Therefore not able to install Fedora 20 alpha release with GRUB2 bootloader.

Note this computer is currently running Fedora 19 successfully. Also this computer is able to boot from regular Fedora 19 PPC64 DVD.

Version-Release number of selected component (if applicable):
Fedora 20 alpha PPC64

How reproducible:
Every time

Steps to Reproduce:
1. Insert Fedora 20 alpha DVD or netinst CD in drive
2. Reboot
3. Press C after chime
  
Actual results:
Computer boots from hard drive or shows little Mac icon with question mark in case hard drive does not contain any OS

Expected results:
Menu option to start installation of Fedora 20 or initial Anaconda screen

Additional info:
Powermac G5 (late 2005)
Dual core 2 GHz
4.25 GB RAM
500 MB SATA
nVidia 7800 GT

Actions done to solve the issue:
- Tried both DVD and netinst CD
- checked SHA256 checksums for downloaded ISOs
- checked for burning errors
Comment 1 Brian Lane 2013-10-18 17:14:37 EDT
Paulo wrote the patch, maybe he has some idea of how to debug this.
Comment 2 Brian Lane 2013-11-18 13:56:05 EST
*** Bug 1031377 has been marked as a duplicate of this bug. ***
Comment 3 Erik Larsson 2013-11-18 21:22:33 EST
A workaround is to do drop into OpenFirmware with Cmd-Option-O-F and issue the command:
boot cd:,\boot\grub\powerpc-ieee1275\core.elf

This loads GRUB and lets you choose the appropriate boot option. GRUB is then able to load the Linux kernel and boot it.
Comment 4 Erik Larsson 2013-11-18 22:09:03 EST
For a solution, Fedora should bless the /boot/grub/powerpc-ieee1275 folder as bootable in the HFS partition and set the 'tbxi' HFS file type for the 'core.elf' file in this directory.

This should be all that is required for booting on PowerPC Macs. You can read more about the boot process here:
http://www.opensource.apple.com/source/bless/bless-11/README.BOOTING

Blessing a folder as bootable and setting file types can be done in Linux with the utility 'hattrib' in hfsutils. Both these settings appear to be missing in the Fedora 20 Beta ISO.
Comment 5 Erik Larsson 2013-11-18 23:44:28 EST
As a demonstration, I modified the current Fedora 20 Beta image to be bootable on a PowerPC Mac. It required only minor modifications after which it boots successfully.
The modified image can be found here:

https://sourceforge.net/projects/catacombae/files/Fedora%2020%20Beta%20ppc64%20%28Mac%20bootable%29/

I used hfsutils in Linux to fix the image. Here's a step-by-step recipe to reproduce it:

1. Remove the write-protection in the volume header by changing bytes 10/0xA and 11/0xB (9226/0x340A and 9227/0x240B from the start of the image) from 0x81 0x80 to 0x01 0x00 using a hex editor. This proved to be necessary because hfsutils didn't have an option to ignore these bits/force the HFS volume to open in read/write mode (or I couldn't find it).

2. hmount the image:
     hmount Fedora-20-Beta-ppc64-netinst.iso

3. Bless the /boot/grub/powerpc-ieee1275 directory as the boot folder:
     hattrib -b 20-Beta:boot:grub:powerpc-ieee1275

4. Set the file type of core.elf to 'tbxi':
     hattrib -t tbxi 20-Beta:boot:grub:powerpc-ieee1275:core.elf

5. Restore the write-protection in the volume header by reverting the changes in step 1.

I hope this helps.
Comment 6 Erik Larsson 2013-11-18 23:48:24 EST
Forgot to add a humount step between step 4 and 5...

-5. Restore the write-protection in the volume header by reverting the changes in step 1.
+5. humount the image:
+     humount
+
+6. Restore the write-protection in the volume header by reverting the changes in step 1.
Comment 7 dehua.yang 2013-11-19 01:47:33 EST
(In reply to Erik Larsson from comment #3)
> A workaround is to do drop into OpenFirmware with Cmd-Option-O-F and issue
> the command:
> boot cd:,\boot\grub\powerpc-ieee1275\core.elf
> 
> This loads GRUB and lets you choose the appropriate boot option. GRUB is
> then able to load the Linux kernel and boot it.

I tried as you said my powermac G5 booted successfully, until the X started. Then the screen filled with colorful rectangles and stuck there. The only thing I could do was to shut it down. During the booting and loading processes it seemed there was no fans control for my G5(PowerMac7,2,late 2003) in the kernel, the fans roared all the time. My display card is GeForce 6800Ultra, AGP 8X.
Comment 8 Erik Larsson 2013-11-19 02:02:33 EST
(In reply to dehua.yang from comment #7)
> (In reply to Erik Larsson from comment #3)
> > A workaround is to do drop into OpenFirmware with Cmd-Option-O-F and issue
> > the command:
> > boot cd:,\boot\grub\powerpc-ieee1275\core.elf
> > 
> > This loads GRUB and lets you choose the appropriate boot option. GRUB is
> > then able to load the Linux kernel and boot it.
> 
> I tried as you said my powermac G5 booted successfully, until the X started.
> Then the screen filled with colorful rectangles and stuck there. The only
> thing I could do was to shut it down. During the booting and loading
> processes it seemed there was no fans control for my G5(PowerMac7,2,late
> 2003) in the kernel, the fans roared all the time. My display card is
> GeForce 6800Ultra, AGP 8X.

I also have the same problem with the display. nouveau (the Nvidia driver) appears to be broken in Fedora 20 Alpha.
I recently opened a bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1031895

Please comment further in this bug.

Regarding the fans, this is because the PowerMac fan control kernel module isn't loaded. You can load it manually with the command:
  modprobe i2c-powermac

This may be intended in order to make sure the installer is compatible with all hardware. You can open a bug for this if you want to.
Comment 9 Erik Larsson 2013-11-19 02:03:24 EST
(In reply to Erik Larsson from comment #8)
> (In reply to dehua.yang from comment #7)
> > (In reply to Erik Larsson from comment #3)
> > > A workaround is to do drop into OpenFirmware with Cmd-Option-O-F and issue
> > > the command:
> > > boot cd:,\boot\grub\powerpc-ieee1275\core.elf
> > > 
> > > This loads GRUB and lets you choose the appropriate boot option. GRUB is
> > > then able to load the Linux kernel and boot it.
> > 
> > I tried as you said my powermac G5 booted successfully, until the X started.
> > Then the screen filled with colorful rectangles and stuck there. The only
> > thing I could do was to shut it down. During the booting and loading
> > processes it seemed there was no fans control for my G5(PowerMac7,2,late
> > 2003) in the kernel, the fans roared all the time. My display card is
> > GeForce 6800Ultra, AGP 8X.
> 
> I also have the same problem with the display. nouveau (the Nvidia driver)
> appears to be broken in Fedora 20 Alpha.
> I recently opened a bug here:
> https://bugzilla.redhat.com/show_bug.cgi?id=1031895
> 
> Please comment further in this bug.

Sorry, to clarify, nouveau is apparently also broken in 20-Beta ppc64.
Comment 10 Ronald Maas 2013-11-23 15:39:45 EST
I was able to successfully boot the blessed Fedora 20 beta ISO created by Eric Larsen (comment #5).

Like dehua.yang@gmail.com (comment #7) Anaconda was not rendered correctly. But adding boot parameter nouveau.noaccel=1 solved the issue allowing me to complete the installation procedure.

After rebooting I saw the following error:

Welcome to Fedora!
Hit <TAB> for boot options
Welcome to yaboot version 1.3.17 (Red Hat 1.3.17-6.fc19)
Enter "help" to get some basic usage information
boot: linux
Please wat, loading kernel...
/ht@0,f2000000/pci@9/k2-sata-root@c/k2-sata@0/disk@0:3,vmlinuz-3.11.8-300.fc20.ppc64: Unknown or corrupt file system
boot:

(fans start to blow and need to switch off the G5)

I was expecting GRUB to boot Fedora 20, but instead Anaconda installed the Yaboot boot loader. I will create a new bug report for this issue.
Comment 11 Ronald Maas 2013-11-27 21:09:21 EST
Successfully installed and booted Fedora 20 beta on PowerMac G5. Summary of installation steps:
1) Download and burn blessed F20 beta ISOs created by Eric Larsen (comment #5). Eric: kudos for putting these on the web
2) If your PowerMac has an nVidia adapter, then after GRUB menu is displayed, select 1st item, click 'e', append parameter 'nouveau.noaccel=1', and enter Ctrl-X to continue booting (see https://bugzilla.redhat.com/show_bug.cgi?id=1031895#c5)
3) After Anaconda displays initial screen, switch to command line (Control+Option+F2), run command 'modprobe i2c-powermac' (as described in comment #8), and switch back to Anaconda (Control+Option+F7)
4) Install Fedora with default settings. If Anaconda throws an exception during partitioning, you can wipe out the partition table using command 'dd count=1048576 if=/dev/zero of=/dev/sda' (and naturally you backup any valuable information beforehand)
5) Anaconda installs Yaboot on PowerMac by default. Fix yaboot.conf by following the steps in https://bugzilla.redhat.com/show_bug.cgi?id=876625#c10. Also for nVidia display adapter, edit the "append" line in yaboot.conf and add kernel argument 'nouveau.noaccel=1' before running ybin
6) After GNOME desktop has started, start a terminal and run 'modprobe i2c-powermac' to silence the fans

A few things are not working (yet):
- Nouveau is broken. GNOME desktop is entirely rendered by llvmpipe (pleasantly surprised that it was working for PPC64). A bit slow but workable
- Sound card is not recognized. Probably nothing that can be fixed with modprobe
- Some application stability issues. E.g. Firefox crashed the first time, second time it was running fine
Comment 12 Brian Lane 2013-12-05 17:58:22 EST
Created attachment 833337 [details]
patch to bless boot directory

If someone with ppc hardware could try making a boot.iso using lorax and this patch I'd appreciate it. You can run lorax from the git repo like this:

sudo setenforce 0
sudo PATH=./src/sbin:$PATH PYTHONPATH=./src/ ./src/sbin/lorax -p Fedora -v 20 -r 20 \
-s <PATH TO PPC REPO> \
--logfile=lorax-build.log --config ~/tmp/rawhide.conf --tmp /tmp/ /tmp/f20-lorax/ |& tee lorax-build-out.log
sudo setenforce 1

/tmp/ on tmpfs needs to be big enough to hold the results (several GB) or change it to /var/tmp to use disk and run slower.

~/tmp/rawhide.conf looks like this:
[lorax]
sharedir = /home/bcl/Red_Hat/projs/lorax/share/

and points to your lorax git repo
Comment 13 Erik Larsson 2013-12-05 21:40:01 EST
Created attachment 833393 [details]
Patch to bless boot directory (the sequel)

Hi Brian,

(In reply to Brian C. Lane from comment #12)
> Created attachment 833337 [details]
> patch to bless boot directory
> 
> If someone with ppc hardware could try making a boot.iso using lorax and
> this patch I'd appreciate it. You can run lorax from the git repo like this:
> 
> sudo setenforce 0
> sudo PATH=./src/sbin:$PATH PYTHONPATH=./src/ ./src/sbin/lorax -p Fedora -v
> 20 -r 20 \
> -s <PATH TO PPC REPO> \
> --logfile=lorax-build.log --config ~/tmp/rawhide.conf --tmp /tmp/
> /tmp/f20-lorax/ |& tee lorax-build-out.log
> sudo setenforce 1
> 
> /tmp/ on tmpfs needs to be big enough to hold the results (several GB) or
> change it to /var/tmp to use disk and run slower.
> 
> ~/tmp/rawhide.conf looks like this:
> [lorax]
> sharedir = /home/bcl/Red_Hat/projs/lorax/share/
> 
> and points to your lorax git repo

For various reasons this patch won't work (hattrib cannot be used with host file system, prior to the HFS filesystem in the image being created since it only operates directly on block devices/images...), but you pointed me in the right direction. I checked the ppc.tmpl file and realized that the infrastructure is already in place... it just never got updated for the GRUB2 switch.

I'm attaching a patch for lorax which should fix the boot issues on Macs.

This is untested because I'm not familiar with the whole build process and so I cannot do a full build (the PATH_TO_PPC_REPO seems like a big missing link).
I'd like to learn the entire build process though... how to build a Fedora installer starting with sources and ending up with the iso.
Comment 14 Brian Lane 2013-12-09 12:06:44 EST
Thanks! I think this repo may be what you need:

http://secondary.fedoraproject.org/pub/fedora-secondary/development/20/ppc64/os/

I'm on x86_64 so I don't think I can build ppc64 images. I tried specifying the arch with --buildarch but it blew up.
Comment 15 Erik Larsson 2013-12-10 23:03:13 EST
Created attachment 835097 [details]
Patch to bless boot directory (the sequel, v2)

Thanks for the pointer. I have now built the boot.iso using lorax and found an issue with my previous patch (variable expansion didn't happen the way I assumed).

This patch corrects the problem and it appears to work now. The boot.iso built by lorax gets the proper directory blessed and the core.elf file gets the 'tbxi' file type.
Comment 16 Brian Lane 2013-12-11 13:47:23 EST
Thanks! This is probably too late to make it into F20, but after release I'll do a new lorax build with this change.
Comment 17 Fedora Blocker Bugs Application 2013-12-11 13:48:19 EST
Proposed as a Freeze Exception for 20-final by Fedora user bcl using the blocker tracking app because:

 Would be nice if f20 ppc images could boot.
Comment 18 Mike Ruckman 2013-12-11 13:57:15 EST
Discussed in 2013-12-11 Blocker Review Meeting [1]. Voted as an AcceptedFreezeException. This improves situation for Apple G5.

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-12-11/
Comment 19 Fedora Update System 2013-12-11 18:51:38 EST
lorax-20.4-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lorax-20.4-2.fc20
Comment 20 Fedora Update System 2013-12-12 11:28:50 EST
Package lorax-20.4-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lorax-20.4-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23238/lorax-20.4-2.fc20
then log in and leave karma (feedback).
Comment 21 Fedora Update System 2013-12-13 00:34:57 EST
lorax-20.4-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 EMR_Fedora 2014-03-13 21:35:51 EDT
Yeah, the DVD doesn't boot, but the Net Install CD does (thank goodness!)
Comment 23 Fedora Update System 2014-06-02 15:09:37 EDT
lorax-20.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lorax-20.5-1.fc20
Comment 24 Fedora Update System 2014-06-19 19:01:15 EDT
lorax-20.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Al Dunsmuir 2014-11-10 11:43:15 EST
After using Eric Larsson's fixed Netinst disk, you will likely experience problems due to yaboot.conf missing the drive stanza.

See http://polywogsys.livejournal.com/305603.html for fix.
Comment 26 Al Dunsmuir 2014-11-10 11:44:06 EST
Still a problem with F21 alpha and beta release.
Comment 27 Brian Lane 2014-11-10 14:18:57 EST
(In reply to Al Dunsmuir from comment #26)
> Still a problem with F21 alpha and beta release.

F21 is a new release If you are seeing problems please open a new bug with the installation logs from /tmp/*log attached as individual attachments. You can also find them in /var/log/anaconda/ after installation.
Comment 28 Al Dunsmuir 2014-11-11 14:03:16 EST
I plan to do so for F21 today, after researching the nvr of the lorax package on the ppc64 koji builders.

There have been a number of folks on IRC asking how to install F20 on G5s.  Rather than telling them to check multiple URLs for each piece of setup info added a pointer here.
Comment 29 Al Dunsmuir 2014-11-11 19:20:44 EST
Followed Eric's procedure with Beta RC1 netinst iso.
- volume label 21_BETA
- write protect attr bytes were at 0x240A and 0x240B.

The hfs utilities do not appear to have method for displaying if a file is already blessed, so did that again.  Verified the core.elf file already had file type "tbxi".

Restored protect attr bytes, and created CD.  

Same behaviour as original F21 netinst iso - boots, but display "Entering rescue mode" instead of the normal install CD menu.

Problem may still be in lorax, but is not the same issue as F20.  
- Need to debug root cause and determine fix.

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