From owner-freebsd-sparc Sun Dec 1 11:11: 8 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FC1C37B404 for ; Sun, 1 Dec 2002 11:11:06 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41B1743EA9 for ; Sun, 1 Dec 2002 11:07:19 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.6/8.12.6) with ESMTP id gB1JLixQ035477 for ; Sun, 1 Dec 2002 14:21:44 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.6/8.12.6/Submit) id gB1JKTNb035471; Sun, 1 Dec 2002 14:20:29 -0500 (EST) Date: Sun, 1 Dec 2002 14:20:28 -0500 From: Jake Burkholder To: Anthony Volodkin Cc: freebsd-sparc@FreeBSD.ORG Subject: Re: netbooting freebsd-sparc64 howto Message-ID: <20021201142028.B26595@locore.ca> References: <3DE87029.2030609@brainlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3DE87029.2030609@brainlink.com>; from anthonyv@brainlink.com on Sat, Nov 30, 2002 at 03:00:41AM -0500 Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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