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

Re: booting an apple g4 from network



On Wed, 2006-02-22 at 13:49 +0100, Jan-David Salchow wrote:
> hi
> 
> i'm trying to boot an apple g4 from network via dhcp/tftp. i get an
> yaboot command prompt, when bootin from the openfirmware prompt, but
> it don't work with just pressing n. i heard some mysterious things
> about patching the dhcpd ... 
> 
> does someone know something more specific?

There are several ways.

The first one is to boot directly into a kernel image, the second is to
"hop" via a bootloader like yaboot. In the later case, the bootloader
can be on disk or on the network too (though it may have trouble finding
it's config file over tftp in that case).

The first issue you'll encounter is the DHCP problem. Apple firmware
will happily DHCP to obtain an IP address and TFTP down a file if you
tell it to do so explicitely (providing the server address and file name
explicitely, via OF command line or environment variables in flash).
However, it will not accept a server address & file name to retreive
from the DHCP server (fully auto-netboot, aka "n" key) unless the server
has some Apple extensions. In order to get those, you had to patch it,
though I've been told recent dhcpd's may have that included now,
provided you have the right option in the config file of the server. I
don't know the details as I never use that capability, I always specify
the file explicitely.

Now, to boot a file explicitely from OF, you can do it manually from OF
command line:

 boot enet:server_ip,filename

OF will then obtain an address for itself via DHCP and TFTP the file
down and boot it. There are variations of this syntax where you can
provide the local IP yourself etc... but I don't have them in mind at
the moment.

In a similar vein, you can set your OF to netboot a file that way by
setting your boot-device variable to that same thing:

 setenv boot-device enet:server_ip,filename

If you choose to use a local yaboot have yaboot itself load a kernel
image over the network, then just use a path like the above in your
yaboot.conf:

image=enet:server_ip,filename

Though yaboot has been known to have issues with too large files & tftp
(too large ranging from 4 to 6Mo depending on the yaboot version) so be
careful.

You can load yaboot itself over the network from OF too. Yaboot should
then try to retreive yaboot.conf via tftp from the same server though
that doesn't always work very well...

Finally, you can load a kernel image directly from OF. To do that, you
need a fairly recent kernel sourc tree which is capable of booting a
"zImage.vmode" (make zImage on those recent trees will produce 2
zImage's in arch/powerpc/boot, a zImage and a zImage.vmode, you want the
later, do not EVER try to boot the former on a mac).

That file should be directly bootable from OF, either from a disk or
from the network. You can also embed an initrd or initramfs in it using
the usual technique of putting a file called ramdisk.image.gz in
arch/powerpc/boot/ and doing a make zImage.initrd (same issue, only use
the "vmode" version).

Note that some OF versions also have issues with large files over the
network...

Cheers,
Ben.




Reply to: