Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Dec 2002 14:20:28 -0500
From:      Jake Burkholder <jake@locore.ca>
To:        Anthony Volodkin <anthonyv@brainlink.com>
Cc:        freebsd-sparc@FreeBSD.ORG
Subject:   Re: netbooting freebsd-sparc64 howto
Message-ID:  <20021201142028.B26595@locore.ca>
In-Reply-To: <3DE87029.2030609@brainlink.com>; from anthonyv@brainlink.com on Sat, Nov 30, 2002 at 03:00:41AM -0500
References:  <3DE87029.2030609@brainlink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Sat, Nov 30, 2002 at 03:00:41AM -0500,
	Anthony Volodkin said words to the effect of;

> Hi
> 
> After last night of hacking netbooting with nfsroot, I wrote the 
> following howto: http://non-standard.net/freebsd/sparc64-nfsroot.html
> Any comments or corrections are appreciated.

Hi,

Thanks for making the effort to put this together.

Comments:

Your dhcp setup looks correct, that's basically what I use.

I don't think that tftp is required if you use 'boot net:dhcp', as far as
I know the firmware will use bootp to retrieve the bootstrap in this case.
'boot net' alone will use tftp.  Also, the loader.nfs isn't necessary
anymore; the default loader does nfs and tftp, so you can just copy
it from the unpacked distribution or from the cross built world.
i.e: cp /path/to/nfsroot/boot/loader /tftpboot.  I just noticed that
you didn't setup the symlinks to the ethernet address for tftp, so
boot net:dhcp must be using bootp.  If tftp is to be used the ethernet
address for the sparc must appear in /etc/ethers, and a symlink needs
to be made to its ip address in hex.  boot net:dhcp should probably be
recommended as its simpler.

A non-empty fstab in the nfsroot is not strictly necessary, although I
suppose this will cause the nfsroot to be mounted read write, which is
useful.  There were some problems with the default diskless scripts and
mounting root read only last time I checked, but might be worth pointing
this out if a readonly mount is desired.

portmap is called rpcbind in 5.0, might be worth pointing out this
difference.  Also, for nfs locking to work right rpc.statd and rpc.lockd
should be started as well.

I see you found the steps to cross build the kernel, you might point out
that you can also use the cross built world instead of downloading the iso
and using the files on that.  i.e. checkout a 5.0 source tree and cross
build world as the first step, and then install it in the nfsroot directory
on the nfs server.  The steps to do this are:

	cd /path/to/src
	make TARGET_ARCH=sparc64 buildworld
	make TARGET_ARCH=sparc64 buildkernel
	cd /path/to/src/etc
	make TARGET_ARCH=sparc64 distrib-dirs DESTDIR=/path/to/nfsroot
	make TARGET_ARCH=sparc64 distribution DESTDIR=/path/to/nfsroot
	cd /path/to/src
	make TARGET_ARCH=sparc64 installworld DESTDIR=/path/to/nfsroot
	touch /path/to/nfsroot/boot/device.hints
	make TARGET_ARCH=sparc64 installkernel DESTDIR=/path/to/nfsroot

Of course, in this case its VERY IMPORTANT not to forget the DESTDIR, or
you will toast the existing system.  Installworld doesn't create an fstab
by default, so it needs to be created manually, either empty or pointing to
the nfsroot on the server as you did.  Also, the distrib-dirs and distribution
steps don't honour TARGET_ARCH properly.  In general this doesn't matter,
but some of the wrong files will be installed in /etc, so its necessary to
do: cp /path/to/src/etc/etc.sparc64/* /path/to/nfsroot/etc

Its possible to netboot without compiling a new kernel to add BOOTP.  BOOTP
can't be included in the default config because it assumes nfsroot.  If the
kernel is loaded via bootp it should be sufficient to either put
'set vfs.root.mountfrom=nfs:' in the loader.conf in the nfsroot directory
(/path/to/nfsroot/boot/loader.conf), or to enter nfs: at the mountroot
prompt.  This works with the GENERIC kernel.

Are you interested in converting this to sgml at some point so we can
include it in the handbook somewhere?

Thanks again,
Jake

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021201142028.B26595>