NetBSD-Users archive

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

diskless NetBSD/macppc 5.0



(Apologies for the large recipient list, but it is not clear to me
which recipient is obviously preferable.)

This evening I netbooted NetBSD on a PowerBook from a MacBook running
Mac OS X.  I had never netbooted NetBSD before, so I was following the
instructions at <http://www.netbsd.org/docs/network/netboot/>, the
NetBSD/macppc INSTALL.txt document, and the diskless(8) man page.  I
eventually got the machine booted, but I encountered a number of snags
along the way.  I have attached a file chronicling them to the best of
my memory, with some suggestions for fixes to the documents.  Let me
know if you'd like more detailed suggestions.
* Notes on Netbooting NetBSD/macppc 5.0 from Mac OS X   -*- outline -*-

** FTP Site

At <http://www.netbsd.org/docs/network/netboot/intro.html>, there is
some information out of date concerning the FTP site:

. In Step 2, the reader is instructed to create a directory called
  `security', for no extant reason of which I am aware; I think the
  step can be omitted altogether.

. In Step 8, /pub/NetBSD/NetBSD-release/<client-arch>/ does not exist
  in NetBSD's FTP site; instead /pub/NetBSD/NetBSD-<version>/<arch>/ is
  the right pathname, I think.

. In Step 9, the kernel set is called kern-<CONF>.tgz, not kern.tgz.
  Also, for NetBSD/macppc, and possibly for other powerpc-based ports,
  installation/ofwboot.xcf is necessary too.

** Mac OS X Changes

*** tftpd: inetd -> xinetd -> launchd

At <http://www.netbsd.org/docs/network/netboot/tftpd.html>, the section
on Mac OS X discusses inetd and its replacement xinetd.  Now xinetd has
itself been replaced by launchd, which is what controls tftpd these
days, in /System/Library/LaunchDaemons/tftpd.plist.  Simply run

sudo /bin/launchctl load -F /System/Library/LaunchDaemons/tftpd.plist

to prepare it, or edit that file to omit the disabled key and run

sudo /bin/launchctl load /System/Library/LaunchDaemons/tftpd.plist

(Launchd will not actually run tftpd until there are packets addressed
to tftpd on the network interface.)

*** nfsd: NetInfo -> launchd

At <http://www.netbsd.org/docs/network/netboot/nfs.html>, the section on
Mac OS X explains how to set up NFS exports in NetInfo.  In Mac OS X
10.5 Leopard, NetInfo was eliminated; the NFS server is now configured
in /etc/exports and managed by launchd, which monitors /etc/exports and
starts the NFS server as soon as that file exists (and stops it as soon
as it ceases to exist).  The format of /etc/exports is as usual.

*** Mac OS X's /etc/hostconfig

<http://www.netbsd.org/docs/network/netboot/finish.html> mentions
/etc/hostconfig, which will probably be gone in Mac OS X 10.6 Snow
Leopard; in Mac OS X 10.5 Leopard, it begins with a comment

# This file is going away

Instead, to inhibit Mac OS X's bootpd, ensure that the entry

<key>Disabled</key>
<true/>

is in /System/Library/LaunchDaemons/bootps.plist.  (Yes, that's
bootps.plist, not bootpd.plist.)

*** darwinfo.org

In <http://www.netbsd.org/docs/network/netboot/finish.html>, the link
to <http://www.darwinfo.org/howto/SystemStarter_HOWTO.shtml>, under the
section on Mac OS X, is broken.  darwinfo.org appears to have been
taken by a domain squatter.  Furthermore, the suggested StartupItem
refers to NetInfo, which is no more in Mac OS X 10.5 Leopard.  However,
I don't know what to replace it by.

** Booting NetBSD

*** Kernel

None of the instructions, either in the diskless(8) man page, the
NetBSD/macppc INSTALL document, or the Diskless HOW-TO on the web at
<http://www.netbsd.org/docs/network/netboot/>, mentioned anything about
how to prepare a kernel for NetBSD/macppc.  It seemed to work to
extract kern-GENERIC.tgz in /export/client/root, and to pass
`enet:/netbsd' to the boot loader at the Open Firmware prompt.

*** boot command

Like <http://mail-index.netbsd.org/port-macppc/2003/05/13/0000.html>, I
needed pass an argument for the kernel pathname, `enet:/netbsd'.  The
full incantation that worked was:

boot enet:0,ofwboot.xcf enet:/netbsd

It is not clear to me how the INSTALL file's short incantation

boot enet:,ofwboot.xcf

is supposed to inform ofwboot.xcf where to find the kernel, or what
kernel to find, so I don't think that the short incantation can work,
unless it requires some other magic that was not documented.

*** Swap files

It did not work to create a directory /export/client/root/swap and a
file of N megabytes all zero /export/client/swap on the NFS server, and
to put in the client's /etc/fstab the line

nfsserver:/export/client/swap none swap sw,nfsmntpt=/swap

Doing so caused Mac OS X's NFS server to return ERR_NOENT when NetBSD
requested mounting /export/client/swap, as `swapctl -A' would try.
<http://mail-index.NetBSD.org/port-sun3/2009/02/27/msg000075.html>
involves a similar problem, I think.

It did work to put N megabytes of zeros in /export/client/root/swap and
to add

/swap none swap sw

to the client's /etc/fstab.  But this seems somewhat fragile.


Home | Main Index | Thread Index | Old Index