[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#382129: Beta3 won't boot on OldWorld PowerPC Mac



Thank you for taking the time to report this information here, Aurélien!  There are those of us who *really* appreciate it.  Over the past year or so, my primary portable has been an OldWorld PowerBook G3 ("Wallstreet 2").  This PowerBook is currently running Xubuntu, but I'm interested in trying Debian again.  (I enjoy using Xubuntu a great deal, but I'm interesting in trying a pure CLI again, and Debian is simply more "pure" to me than Xubuntu.)  I've been using BootX, but it's intriguing for me to hear more about the current state of miboot (and how to use it).  I'd really like to use miboot once I can figure out how, and your report here provides some much-desired information.
 
Thanks again!
 
Harold J. Johnson
 
On 8/18/06, Aurélien GÉRÔME <ag@roxor.cx> wrote:
On Fri, Aug 18, 2006 at 07:58:46AM +0200, Sven Luther wrote:
> Notice that Piotr, Aurelien gerome and Jeremie Koenig are working on freeing
> miboot, which would allow to make it to main, and that Aurelien Gerome and
> some of his friends apparently succeeded in puting a kernel with builtin
> initrd onto a a HFS partition on the harddisk and boot from there. This would
> be akin to how the prep or chrp zImage is copied to the PReP partition on IBM
> hardware, after having be passed through mkvmlinuz. The plan is to, once
> miboot is freed, to add support to mkvmlinuz for this way of handling things.

OK, more than a year and a half later, I think it is time to report
publically on how to install miBoot on a hard disk in the only way
possible for now. :)

miBoot is the OldWorld PowerPC Macintosh bootloader coded by Benjamin
Herrenschmidt to replace his BootX bootloader which was performing
the same task, but from a running MacOS. Unlike BootX, miBoot does
not require MacOS, it only needs the MacOSROM: it is the best solution
for Debian.

The issue on these OldWorld PowerPC Macintosh machines is that
OF is completely broken and can boot neither from hardisk nor from
floppy. Its only purpose is to launch the MacOSROM. I am very skeptical
concerning success reports with Quik on these machines, though some
probably work... Hence, Quik is not the recommended way in Debian to
boot all the OldWorld machines.

So what is the issue with miBoot? Well, miBoot is GPL'ed software,
so it is fine. However, it requires proprietary tools, namely
Metrowerks Codewarrior, to build, and moreover, a specific version
4.0 Pro... Thus, it cannot enter Debian main, the installer cannot
depend on it, and we cannot modify it to suit our needs which is
really problematic. This is what Piotr Krysiuk and I are working on
right now: porting it to the GNU toolchain...

Two years ago, Jérémie Koenig coded rsrce, a tool needed by
miBoot to be installed in a fake System MacOS resource fork on a HFS
partition. He also prepared a preliminary package for miBoot and an
install script to get it installed on the HFS partition. I did not
own an Oldworld machine at that time, but it is then I tried it with
Ludovic Reslinger on his Beige G3 with a 2.6.8 Sarge kernel...

The hard disk of the machine was completely blank. It took us 3 or 4
days of hacking to get it working after numerous attempts... So to sum
up, this is what we did in the end with the hardware we disposed then:

* We used MacOS installation floppies to create the partition table
layout and a 100 MB HFS partition. We needed the proprietary
bootblock installed by MacOS, because the hfsutils do not install it
when they format a partition in HFS. (That bootblock is proprietary
and I am currently reversing it with the help of EMILE m68k HFS
bootblock and the specifications Piotr wrote for the PowerPC HFS
bootblock...)

* We only had an i386 machine with a viable Debian system to mount an
IDE hard disk and a powerpc laptop to work on that hard
disk. Therefore, we switched the hard disk to the i386 and we
mounted the HFS partition detected by the i386 kernel via NBD on
the powerpc laptop.

* On the powerpc laptop, we used Jérémie's miBoot install script to
put miBoot and the Debian-patched kernel we recompiled without any
modules on the HFS partition of the exported NBD HFS partition. Why
without any modules? Because previous attempts show us that miBoot
could not handle XCOFF dummy kernel+ramdisk image, despite showing
the contrary in its source code. We could not recompile it anyway. :(

The machine booted fine and it still runs fine since then with a huge
uptime... The glitch is we did not touch it again since then to make
tests, because it is a production server for Ludovic. :)

> More info on this on the debootloaders alioth project, there is also a mailing
> list regarding miboot (and emile) there.
>
> >  curiously, i am also trying to install debian on a powerbook 500 series
> >  (pre powerpc, but mac) (i have two, a 520 and a 540, as well as an earlier
> >  performa model) ---
> >    they have a new booter which i would try soon, called emile, it seems
> >  to be combining functions of miboot and quik and more. very nice ...
> >  --- yes my 68k macs have floppies, that work:
> >
> >  http://emile.sourceforge.net/
> >
> >  he's working on a cd version !!!

Indeed, Laurent Vivier is a great Mac hacker and a wonderful person. :)

Wouter Verhelst has kindly accepted to move its private SVN repository
of EMILE packaging in the Alioth Debootloaders project to team-maintain
it inside Debian. There is also an EMILE package in the archive
if you want to try it. Do not hesitate to post your success on the
debootloaders-emile mailing-list on Alioth.

> >  to my understanding my pci-based open firmware ppc macs should not
> >  use miboot anyway, isn't that for nubus, that is pre OF/pci power macs ?
> >  of course whatever works, but as i already have two dead floppies i am
> >  not too keen on this method...
>
> pci based oldworld macs are those with a pci interface but previous to the
> ibook and blue-and-white powermac i believe, and still have the mac os rom,
> while the newworld ones don't have a real rom. nubus pmacs are those
> firstgeneration powermacs which still use the m68k legacy nubus architecture.
> nubus pmacs are not supported in debian there is no 2.6 kernel, and very few
> people reported any kind of success on them using the sarge 2.4.27 nubus
> flavour.

Like Sven explains above, you have 5 kinds of Macintosh machines in
chronological order:

* the Mac68k:
* running 2.2 kernels perfectly
* 2.4 kernels never work
* 2.6 kernels starting to work (Quadra840AV perfectly fine)
* bootable by:
   * PenguinLoader (by Alan Cox) under MacOS
   * EMILE (by Laurent Vivier) directly under MacOSROM
     => Debian proposed solution

* the MacPPC Nubus:
* only 2.4 kernels
* bootable by:
   * Apple mklinux proprietary bootloader
   * surely EMILE if Laurent had one of these...

* the MacPPC OldWorld:
* 2.6 kernels work fine
* bootable by:
   * BootX (from Benjamin Herrenschmidt) under MacOS
   * miBoot (from the same author, Piotr Krysiuk, and I) directly
     under MacOSROM
     => Debian proposed solution

* the MacPPC NewWorld:
* 2.6 kernels work fine of course ;P
* bootable by:
   * Yaboot (from Benjamin Herrenschmidt, then Ethan Benson) under OF
   * GRUB2 (from the GNU project), but not very reliable

* the MacIntel craps, but less crappy than Intel ones, it seems... :)

> >  i am going to try the new initrd tool, yaird, to see if that helps.
> >  (i have already tried mkinitrd w/hand config, not having any luck,
> >  although i could try again)

Well, I am currently prospecting, among other things, to see how miBoot
can integrate himself in Debian kernel and installer packaging... I
can setup miBoot floppies with the last Debian kernel if you want.

The solution we want to retain with Sven is to propose:

* Boot floppies for the debian-installer: one floppy containing miBoot
and the ELF gzipped kernel which load another floppy containing the
d-i ramdisk which can thereafter use the network or a CD to finish
the installation.

* miboot-installer package as a helper of d-i to install miBoot it
at the last step of d-i.

P.S.: Of course, Sven getting kicked out of d-i will not help...

* miboot package to install the XCOFF gzipped dummy kernel+ramdisk
image in the HFS partition with miBoot bootblocks.

As Sven and I discussed it, the 3 points will use mkvmlinuz to produce
the kernel images. Of course, mkvmlinuz will need some care to do so,
as the miBoot cases are actually void...

Cheers,
--
.''`.   Aurélien GÉRÔME
: :'  :
`. `'`   Free Software Developer
`-     Unix Sys & Net Admin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFE5abzI2xgxmW0sWIRAo83AKCD+6Y61yYYMua33/oA2jdn5Cs+GgCeIXT9
e6MMWz03Z1gSvA6h+1WQiuw=
=r9eR
-----END PGP SIGNATURE-----




Reply to: