Subject: re: NFS_BOOT_BOOTPARAM
To: None <mrg@eterna.com.au>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-sparc
Date: 05/07/1999 17:16:59
>    can someone please explain the comment
>
>    ## NFS boot options; default on sparc is the bootparam protocol
>    options         NFS_BOOT_BOOTPARAM
>    #options        NFS_BOOT_BOOTP
>    #options        NFS_BOOT_DHCP
>
>    which can be found in may of the sparc config files.  I'm
>    particularly thinking of the first comment.
>
>    In what sense is booparam "the default"?  In the sense that it
>    does not need to be defined?  I recently had an experience where
>    I upgraded from 1.3.2 to 1.4_BETA, and I now had to add the
>    NFS_BOOT_BOOTPARAM define in order for a diskless boot to succeed
>    (otherwise it would fail to mount the root file system).
>
> is it the 'default' in that it is uncommented on the sparc,
> as shown above from your snippet.

Oh, so it's only 'default' in the sense that "this is what is
commonly used on sparc systems", not "this is enabled by default".
There's room for misinterpretation in that statement...  (Suggestion
for rewording follows below.)

>    Thus, I think something must have changed between 1.3.2 and
>    1.4_BETA which makes the above mentioned comment misleading.
>
> yes.  all the nfs boot code was made conditional on the type
> of support needed (bootparams, bootp, or dhcp), and kernel options
> were created for these.  much like the exec options were created
> some time ago (exec_aout, exec_elf32, etc.) to allow ports to not
> have, eg, a.out support.  the old code (i think) included bootparams
> unconditionally, which wasn't much use for non-sun folks.

Understood.

> these options are documented in options(4) also;  you could have
> looked there :-)

I did, after trying to debug why I got errno 79 on the root mount in
1.4_BETA when I used essentially the same kernel config as was used
in 1.3.2.  However, the way I read the man pages, neither options(4)
nor diskless(8) say anything decisive to or from regarding the
absolute requirement to enable one of the above mentioned options
for diskless operation.  The options(4) man page says:

     options NFS_BOOT_BOOTPARAM
     Enable use of the BOOTPARAM protocol, consisting of RARP and
     BOOTPARAM RPC, to get configuration information if NFS is used
     to mount the root file system.  See diskless(8) for details.

and diskless(8) says

     In phase 3, the kernel does NFS mounts for root.  The kernel
     repeats much of the work done by the boot program because there
     is no standard way for the boot program to pass the information
     it gathered on to the kernel.  The procedure used by the kernel
     is as follows:

     3.1  The kernel finds a boot server using the same procedure as
          described in steps 2.1 and 2.2 above.  In general, the
          GENERIC config(8) files for any particular architecture
          will specify options to activate in the kernel the same
          protocol used by the boot program for that architecture,
          however, the kernel can be compiled to use any of BOOTP,
          DHCP, or BOOTPARAMS. See options(4).

and that's about all the "details" it contains on this particular
point.


Well, I may be picking nits here, but I think two things should be
done to improve the clarity and remove some room for misunderstanding:

a) The options(4) man page should state that one of the three
   NFS_BOOT_* options must be enabled for diskless booting.

   Actually, I think I'd create a separate (sub?)section for these
   three options, under e.g. "Diskless boot options" where it would
   make sense to add some text to the effect that "one of these is
   required for diskless operation".

b) The comment in the config files should probably be changed to

   ## NFS boot options; traditionally, bootparam is used on sparc systems

Regards,

- H=E5vard