Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 2002 17:37:50 -0500
From:      Anthony Volodkin <anthonyv@brainlink.com>
To:        freebsd-sparc@freebsd.org
Subject:   Re: netbooting freebsd-sparc64 howto
Message-ID:  <3DEA8F3E.4000202@brainlink.com>
In-Reply-To: <20021201142028.B26595@locore.ca>
References:  <3DE87029.2030609@brainlink.com> <20021201142028.B26595@locore.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
 <fstype>:<device>  Mount <device> using filesystem <fstype>
                      eg. ufs:da0a
 ?                  List valid disk boot devices
 <empty line>       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




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