Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 229231 - Unable to create "Prep" partition for IBM PPC systems
Unable to create "Prep" partition for IBM PPC systems
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
ppc64 Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Depends On:
  Show dependency treegraph
Reported: 2007-02-19 12:27 EST by Jerone Young
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-01 11:18:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jerone Young 2007-02-19 12:27:24 EST
Description of problem:

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

How reproducible:

Steps to Reproduce:
1. Launch CD installer
2. Use Create Custom partition layout
Actual results:
The installer in Fedora Core 7 is not able to create a "Prep" partition that is
required for IBM PPC based machines. Since these machines do not use the MBR but
they use Prep parition to boot the machine. Yaboot has to be installed to this
partition for this to work. I've heard that this worked before and is now broken
in FC 7 test1. This is ok in RHEL, but not sure what the story is with Fedora?

Expected results:
User should have the ability to create a Prep partition if one is not already
created. Also if user uses "automatic" partitioning" should create the Prep
partition so can succesfully boot on IBM PPC machines.
Comment 1 David Woodhouse 2007-02-20 18:06:38 EST
Please explain the failure mode. What happens when you try to create the PReP
Comment 2 Paul Nasrat 2007-02-26 11:26:31 EST
Also does auto partitioning create the correct layout, or is this just a failure
with manual partitioning?
Comment 3 Jerone Young 2007-02-26 14:23:36 EST
The partitioning tool does not allow you to create a "PPC Prep" partition on the
disk. This is not amongst the options (ext3,swap,vfat, etc)...It also does not
automaticatly if you use the "automatic" partitioning on a disk that does not
already contain a "PPC Prep" partition.
Comment 4 Jeremy Katz 2007-02-26 14:47:41 EST
What type of machine is this on?  We only display it as available if you're on a
pSeries or iSeries?
Comment 5 Hollis Blanchard 2007-02-26 15:37:58 EST
How is that detection done?

This system is a blade using SLOF firmware.
Comment 6 Jeremy Katz 2007-02-26 15:41:55 EST
Code is in rhpl --

See what 
  python -c 'import rhpl; print rhpl.getPPCMachine()' 
gives you
Comment 7 Jerone Young 2007-02-26 18:34:27 EST
The machine is a Blade JS20. Oh in this case it was not running SLOF firmware,
but Global Firmware (that ships with it). Will try the python function , I have
to install something on the machine to try it out.
Comment 8 Jerone Young 2007-02-27 11:47:00 EST
So trying the lastest rawhide of today. I see the following.

Scenerio #1:
  --- IBM Blade JS20 disk has no Prep partition ---
  * Automatic Partitioning
    -- Does not create a PPC Prep partition
  * Manual Partition
    -- "Prep PPC" not under "File System type" when trying to Add Partition

Scenerio #2:
  --- IBM Blade JS20 disk already has a Prep partition ---
 * Automatic Partitioning
   -- Creates a PPC Prep partition
 * Manual Paritition
   -- after removing all the automatic generated. "Prep PPC" not under "File
System type" when trying to Add Partition

Have not had a chance to go through the full install process for Scenerio #1
since I am in need of this machine for a bit, and I can't destroy the install on
disk just yet. I will try and get to it today or tomorrow.
Comment 9 Jerone Young 2007-02-27 15:01:15 EST
Looking at the code for rhpl. Blades are being detected wrong. So there is
problem with the array for PPC detection for PPC blades. 

The function  getPPCMachine() in file src/__init__.py. Is incorrectly seeing the
machine type for blades. This function greps out the "machine: ~~" line from
/proc/cpuinfo . Well the problem is this looks a little different in certain cases:

JS20 with stock firmware
machine         : CHRP IBM,8842-21X

The problem here is that with the Blades the model number is in the string and
not just "CHRP IBM", which is what matches up in the array.

Here is a patch to rhpl that fixes this issue:

--- src/__init__.py.orig        2007-02-27 13:49:55.000000000 -0600
+++ src/__init__.py     2007-02-27 13:52:12.000000000 -0600
@@ -49,7 +49,7 @@
     for line in lines:
         if line.find('machine') != -1 or line.find('platform') != -1:
-            machine = line.split(':')[1]
+            machine = (line.split(':')[1]).split(',')[0]
     if machine is None:

Signed-off-by: Jerone Young <jerone@gmail.com>

This should fix the problem with IBM JS* blades.
Comment 10 Jeremy Katz 2007-02-28 10:00:05 EST
That shouldn't change anything, though -- we match against substrings, not the
full thing.  See the loop over the items of the ppcType dict below it.
Comment 11 Jerone Young 2007-02-28 12:37:12 EST
doh! Ok that code is ok. I'll deep dive into this today. Since this is the case
I should see this on other pSeries machines. I can then debug it easier on a
machine where I can have virtual consoles (as with the blades you only go
through serial terminal).

*I must go to the back and beat myself severely. Bad! Bad! :-0
Comment 12 Jeremy Katz 2007-02-28 13:04:40 EST
No worries.  Note that with the serial console, you should be able to hit ctrl-z
from the installer second stage to get a shell.  Or do a vnc install and then
you can just hit enter on the serial console to get a shell.
Comment 13 Jerone Young 2007-02-28 16:13:02 EST
So it seems that this effects all p series machines. I recently just tried the
following scenarios with a P series machine "44P Model 170". It's a P series
workstation and it displays the same behavior as the JS20. If you do not have a
"Prep PPC boot" partition already on the machine one will not be created
automatically, nor can you create it manually. This is using the GUI (which
doesn't matter).

I'm looking in the anaconda code and the problem is somewhere in here. Still
looking and putting pieces together. But It appears following from
getAutopartitionBoot() in autopart.py . It seems that it should work, though I'm
still untangling my way through the code to see why the autopartitioner is not
creating the Prep partition.
Comment 14 Jerone Young 2007-02-28 17:07:30 EST
Think I found the problem. 

After digging the code and finding nothing wrong. I went back up and I found the
anaconda log under /tmp on the Pseries workstation I have running the setup. And
one thing I see is a lot of

'WARNING: Unknown PowerPC machine type: 0'

So going through the code we see this comes from iutil.py , in function
getPPCMachine() .. which is a wraper for the one in rhpl. 

Well under the install enviroment rhpl.getPPCMachine() return 0. 
Running the command:
python -c 'import rhpl; print rhpl.getPPCMachine()'

You get 0 !!

So doing further looking in the enviroment of the setup I see the following in

platform: pSeries
machine: CHRP IBM,7044-170

So I grab the library and put it in temp and put some debug statments in. I find
that after the loop to find the machine line I see the the value of machine is
"pSeries" and not "CHRP IBM,7044-170". This is because the platform line comes
before the machine line. 

Well in the arrary there is no key for "pSeries". So the solution to this
problem is to actually add a key  for "pSeries".

--- src/__init__.py.orig        2007-02-27 13:49:55.000000000 -0600
+++ src/__init__.py     2007-02-28 16:06:44.000000000 -0600
@@ -27,6 +27,7 @@
                 'CHRP IBM' : 'pSeries',
                 'Pegasos'  : 'Pegasos',
                 'iSeries'  : 'iSeries',
+                'pSeries'  : 'pSeries',
                 'PReP'     : 'PReP',
                 'CHRP'     : 'pSeries',
                 'Amiga'    : 'APUS',

Signed-off-by: Jerone Young <jerone@gmail.com>

ok this time I should have the right answer :-)
Comment 15 Jeremy Katz 2007-03-01 11:18:21 EST
Looks reasonable.  Committed and building; will be in tomorrow's rawhide.
Comment 16 Bill Nottingham 2007-03-02 12:40:09 EST
Moving to 'devel' as discussed on

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