From owner-freebsd-sparc Sun Dec 1 14:37:56 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 0165037B401 for ; Sun, 1 Dec 2002 14:37:53 -0800 (PST) Received: from brainlink.com (mail.brainlink.com [66.228.0.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C2A443E88 for ; Sun, 1 Dec 2002 14:37:52 -0800 (PST) (envelope-from anthonyv@brainlink.com) Received: from [24.189.7.159] (HELO brainlink.com) by brainlink.com (CommuniGate Pro SMTP 3.5.3) with SMTP id 17275039 for freebsd-sparc@freebsd.org; Sun, 01 Dec 2002 17:47:50 -0500 Message-ID: <3DEA8F3E.4000202@brainlink.com> Date: Sun, 01 Dec 2002 17:37:50 -0500 From: Anthony Volodkin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021021 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-sparc@freebsd.org Subject: Re: netbooting freebsd-sparc64 howto References: <3DE87029.2030609@brainlink.com> <20021201142028.B26595@locore.ca> In-Reply-To: <20021201142028.B26595@locore.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Hey, Thanks very much for the feedback. I tried out the suggestions and here is what I found. - using the loader included with the live filesystem does not seem to work because that particular loader insists on using TFTP to download the kernel. I suppose this would work too, but i just like to keep my kernel togehter with the rest of my nfsroot environment. - while the nfs entry in fstab does allow me to read-wrte to the partition, the system startup scripts seem to be operating as if i mounted nfsroot in read-only mode. Hence, they make a md device for /var and for /tmp. A md device for /tmp is not a bad idea anyway though. - thanks for that portmap note. - I was not able to get nfs locking to work. on the nfs server (4.7-stable, the release notes say it supports locking) i run rpc.statd and rpc.lockd in addition to the standard nfs daemons, but on the nfsroot system, i get the following type of problems: divine# passwd Changing local password for root New Password: Retype New Password: passwd: could not lock the passwd file: : Operation not supported If you have any idea on how to get locking to work, I'd be glad to hear about it. - while i was working on this earlier, i tried that option you mentioned, in my /boot/loader.conf located on my nfsroot, and that did not produce any results. Instead I got the following error: Mounting root from nfs:192.168.1.3:/storage3/sparc64-nfsroot setrootbyname failed Root mount failed: -1 Manual root filesystem specification: : Mount using filesystem eg. ufs:da0a ? List valid disk boot devices Abort manual input mountroot> I also tried using the "nfs:" command but that still produced the same error. - thanks for those additional make buildworld arguments. Things like cross-compiling werent really documented anywhere - found them in the mailing archive. I think for this howto, it's best to leave the existing steps as they are, because forgetting DESTDIR is very destructive. I think this should be covered in a separate document on building a live filesystem using those make buildworld/kernel commands. - and yes, i think this should go in the handbook. Regards, Anthony Jake Burkholder wrote: >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 > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message