macppc installation instructions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

macppc installation instructions

John Brendler
The text below (your digest/interpretation of it) should replace text
currently in the INSTALL.macppc instructions file that address
dual-booting through the use of yaboot.  I'm new to BSD and not sure of
other means to disseminate this, so you may want to post this elsewhere
as appropriate.

This is a work-around for an upstream bug preventing macppc users from
using yaboot to dual/multi-boot.  The current instructions supply
partial work-arounds that I found inadequate.  I searched the web and
found no answer to this elsewhere, so this should be useful information.

You can pass this upstream if that is appropriate, but I also think this
would be an easy 1- or 2-line patch (I'm not a programmer).

These are my words, and this is based on a 3.9 install from ftp on June
19, 2006.

John Brendler
[hidden email]

-----------------------------------------------------------------------
Yaboot doesn't dual-boot with BSD as advertised due to what appears to
be a path concatenation bug in the ybin shell script. If you follow
instructions, you get a stage 1 bootloader prompt (l for GNU/Linux, b
for BSD), but pressing b doesn't work.  You also can't set BSD to be the
default.

The advice available on the internet is to boot into OpenFirmware and
type a bootline every time, or hard-code OpenFirmware to boot only
OpenBSD and get to your other OS through the clunky and painfully slow
graphical bootloader that comes up when you hold down "option" at boot.
There is a better fix that enables yaboot to function as it's supposed
to.

Edit a line in the OpenFirmware bootloader script that ybin creates in
the bootstrap partition. The script is named "ofboot.b" and the
offending line is near the top. Basically, it erroneously tacks a kernel
path onto the end of the line.

Before (this is a single line):
: bootybsd " Booting BSD..." .printf 100 ms load-base release-load-area
" /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/disk@0:2,\
\ofwboot :,/bsd" $boot ;

After:

: bootybsd " Booting BSD..." .printf 100 ms load-base release-load-area
" /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/disk@0:2,ofwboot"
$boot ;

Note that I have deleted the piece at the end ( :,/bsd).  In a nutshell,
replace the text between that second set of quotes with whatever command
you can successfully boot with at the OpenFirmware prompt. For me this
was simply "hd:2,ofwboot".

To make OpenBSD the default OS:
There is a second bug that is only binding if you have "defaultos=bsd"
in yaboot.conf. Toward the bottom of ofboot.b, after the line "drop" is
the command referring to whichever bootline is your default (either
"bootyaboot" or "bootbsd"). The fix: "bootbsd" should be replaced with
"bootybsd".  (I just love saying "bootybsd".)

Note: Running ybin over-writes any changes, so you may want to make a
copy of the fixed ofboot.b in your home directory for reference.

Reply | Threaded
Open this post in threaded view
|

Re: macppc installation instructions

John Brendler
This is the portion of the INSTALL.macppc file that should be corrected
to include the work-around:

        Currently it is necessary to use Open Firmware commands to dual
        boot between OS's, or multiple drives may be used with each OS
        owning drive(s). It is also possible on some newer models to set
        up the system to auto boot OpenBSD and if Mac OS is desired,
        choose it using the firmware boot selector by holding down the
        <option> key during reboot and selecting the Mac OS Disk icon.


On Mon, 2006-06-19 at 01:48 -0400, John Brendler wrote:

> The text below (your digest/interpretation of it) should replace text
> currently in the INSTALL.macppc instructions file that address
> dual-booting through the use of yaboot.  I'm new to BSD and not sure of
> other means to disseminate this, so you may want to post this elsewhere
> as appropriate.
>
> This is a work-around for an upstream bug preventing macppc users from
> using yaboot to dual/multi-boot.  The current instructions supply
> partial work-arounds that I found inadequate.  I searched the web and
> found no answer to this elsewhere, so this should be useful information.
>
> You can pass this upstream if that is appropriate, but I also think this
> would be an easy 1- or 2-line patch (I'm not a programmer).
>
> These are my words, and this is based on a 3.9 install from ftp on June
> 19, 2006.
>
> John Brendler
> [hidden email]
>
> -----------------------------------------------------------------------
> Yaboot doesn't dual-boot with BSD as advertised due to what appears to
> be a path concatenation bug in the ybin shell script. If you follow
> instructions, you get a stage 1 bootloader prompt (l for GNU/Linux, b
> for BSD), but pressing b doesn't work.  You also can't set BSD to be the
> default.
>
> The advice available on the internet is to boot into OpenFirmware and
> type a bootline every time, or hard-code OpenFirmware to boot only
> OpenBSD and get to your other OS through the clunky and painfully slow
> graphical bootloader that comes up when you hold down "option" at boot.
> There is a better fix that enables yaboot to function as it's supposed
> to.
>
> Edit a line in the OpenFirmware bootloader script that ybin creates in
> the bootstrap partition. The script is named "ofboot.b" and the
> offending line is near the top. Basically, it erroneously tacks a kernel
> path onto the end of the line.
>
> Before (this is a single line):
> : bootybsd " Booting BSD..." .printf 100 ms load-base release-load-area
> " /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/disk@0:2,\
> \ofwboot :,/bsd" $boot ;
>
> After:
>
> : bootybsd " Booting BSD..." .printf 100 ms load-base release-load-area
> " /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/disk@0:2,ofwboot"
> $boot ;
>
> Note that I have deleted the piece at the end ( :,/bsd).  In a nutshell,
> replace the text between that second set of quotes with whatever command
> you can successfully boot with at the OpenFirmware prompt. For me this
> was simply "hd:2,ofwboot".
>
> To make OpenBSD the default OS:
> There is a second bug that is only binding if you have "defaultos=bsd"
> in yaboot.conf. Toward the bottom of ofboot.b, after the line "drop" is
> the command referring to whichever bootline is your default (either
> "bootyaboot" or "bootbsd"). The fix: "bootbsd" should be replaced with
> "bootybsd".  (I just love saying "bootybsd".)
>
> Note: Running ybin over-writes any changes, so you may want to make a
> copy of the fixed ofboot.b in your home directory for reference.

Reply | Threaded
Open this post in threaded view
|

Re: macppc installation instructions

Martin Reindl-3
John Brendler <[hidden email]> wrote:

> This is the portion of the INSTALL.macppc file that should be corrected
> to include the work-around:

Much easier for everyone if you provide a unified diff against
src/distrib/notes/macppc.

IMO this belongs to yaboot documentation anyway.

Reply | Threaded
Open this post in threaded view
|

Re: macppc installation instructions

Miod Vallat
In reply to this post by John Brendler
> This is the portion of the INSTALL.macppc file that should be corrected
> to include the work-around:
>
> Currently it is necessary to use Open Firmware commands to dual
> boot between OS's, or multiple drives may be used with each OS
> owning drive(s). It is also possible on some newer models to set
> up the system to auto boot OpenBSD and if Mac OS is desired,
> choose it using the firmware boot selector by holding down the
> <option> key during reboot and selecting the Mac OS Disk icon.

But this part has nothing to do with multibooting with yaboot. If enough
people think this is worth adding, we could add such a section, though.

Miod