Subject: Re: DISKLESS from 1.4.1 does NOT work.
To: =?ISO-8859-1?Q?P=E5llen?= <pollen@astrakan.hig.se>
From: Andrew Gillham <gillhaa@ghost.whirlpool.com>
List: port-i386
Date: 11/21/1999 03:56:45
Pållen writes:
> bunke# head /sys/arch/i386/conf/DISKLESS
> #       $NetBSD: DISKLESS,v 1.66 1999/01/23 15:35:21 drochner Exp $
> #
> # DISKLESS -- Generic machine setup for diskless boot.
> # This kernel can be loaded from a bootable floppy (i.e. kernel-copy)
> # and will use NFS for root and swap.  (No local disk space needed.)
> 
> this does not work at all. The kernel doesn't even touch the network and
> complains about error 49 when "trying" to mount root. Or have I missed
> something? I can't see that I should do more than config the server, and
> put this kernel together with dosboot.com some where. All NFS mounting and
> such works fine, but this diskless kernel doesn't even try to use the
> network.
> 
> Any ideas?

This sample is missing a 'options NFS_BOOT_XXXX' line.  Looking at
sys/nfs/nfs_boot.c (line 123+) there is code that checks for the
various options. (NFS_BOOT_BOOTP, NFS_BOOT_DHCP, NFS_BOOT_BOOTPARAM)
If none of these options are defined, the code does *nothing* instead
of defaulting to BOOTP/BOOTPARAM as is suggested at the top (line 83)
where it says:
#if defined(NFS_BOOT_BOOTP) || defined(NFS_BOOT_DHCP)
int nfs_boot_rfc951 = 1; /* BOOTP enabled (default) */
#endif
#ifdef NFS_BOOT_BOOTPARAM
int nfs_boot_bootparam = 1; /* BOOTPARAM enabled (default) */
#endif

This code is quite confusing, and apparently does the wrong thing when
no options are set.  It suggests that BOOTP and BOOTPARAM are the defaults,
but of course this code is only included if they're defined. :(

Either the DISKLESS config file needs to add an 'options NFS_BOOT_XXX"
line, or sys/nfs/nfs_boot.c needs to be modified.

-Andrew
-- 
-----------------------------------------------------------------
Andrew Gillham                            | This space left blank
gillham@whirlpool.com                     | inadvertently.
I speak for myself, not for my employer.  | Contact the publisher.