Subject: Re: exports / diskless boot
To: None <tcalderw@BBN.COM, sillen@ts.umu.se>
From: Captech) <greywolf@tomcat.vas.viewlogic.com (James Graham>
List: port-sparc
Date: 08/24/1995 10:03:06
Sorry for the complete inclusion, but it all seems pretty relevant to the
follow up.

#: From owner-port-sparc@NetBSD.ORG Thu Aug 24 03:29:03 1995
#: Date: Thu, 24 Aug 1995 10:07:40 +0200 (DFT)
#: From: Daniel Silen <sillen@ts.umu.se>
#: To: Tom Calderwood <tcalderw@BBN.COM>
#: Cc: port-sun3@NetBSD.ORG, port-sparc@NetBSD.ORG
#: Subject: Re: exports / diskless boot
#: 
#: On Wed, 23 Aug 1995, Tom Calderwood wrote:
#: 
#: > I have a sparc running NetBSD "current" and I am trying to set it up as
#: > a server for a Sun3. Has anyone actually tried this scenario (as opposed
#: > to booting a NetBSD 3/50 off of a SunOS sparc?).
#: >=20
#: >  If I try to export both the client's root directory and swap file:
#: >=20
#: > /usr/src/export/bozo.bbn.com/root -maproot=3Droot bozo.bbn.com
#: > /usr/src/export/bozo.bbn.com/swap -maproot=3Droot bozo.bbn.com
#: >=20
#: >  The export of swap will fail "Can't change attributes for
#: > /usr/src/export/annie.bbn.com/root".  This error appears to
#: > be given when the mount() system call returns a EPERM. If
#: > I put swap ahead of root in the exports file, then root will
#: > fail the same way.
#: >=20
#: > If I try to use "-alldirs" on /usr/src:
#: >=20
#: > /usr/src -alldirs -maproot=3Droot bozo.bbn.com
#: >=20
#: > The Sun3 starts to boot but panics:
#: >=20
#: > NetBSD 1.0A (DISKLESS) #2: Thu Jul  6 17:43:09 EDT 1995
#: >     gwr@venus:/play/gwr/NetBSD-gwr/src/sys/arch/sun3/compile/DISKLESS
#: > Model: Sun 3/50
#: > real mem  =3D 8372224
#: > avail mem =3D 6889472
#: > using 51 buffers containing 417792 bytes of memory
#: > mainbus0 (root)
#: > obctl0 at mainbus0
#: > idprom0 at obctl0 hostid 0x12005c30
#: > fpu0 at mainbus0 (mc68881)
#: > obmem0 at mainbus0
#: > bwtwo0 at obmem0 addr 0x100000 (1152x900)
#: > obio0 at mainbus0
#: > zs0 at obio0 addr 0x20000 level 6 softpri 3
#: > zs1 at obio0 addr 0x0 level 6 softpri 3
#: > eeprom0 at obio0 addr 0x40000
#: > clock0 at obio0 addr 0x60000 level 5
#: > le0 at obio0 addr 0x120000 level 3 hwaddr 08:00:20:00:1d:a4
#: > nfs_boot: using network interface 'le0'
#: > nfs_boot: client_addr=3D0x80590185
#: > nfs_boot: server_addr=3D0x805901ea
#: > nfs_boot: hostname=3DANNIE.BBN.COM
#: > panic: nfs_boot: mountd swap, error=3D72
#:                                       ^^
#: I got exactly the same error when trying to set up a diskless
#: SS1+ with NetBSD-current. I'm not sune what's wrong, but I would
#: guess that it is the nfs-server that refuses to export plain files
#: instead of directories.
#: I tried to put the swapfile on a IBM-RS6000 running AIX3.2, and
#: suddenly everything worked perfect.
#: I suppose it must be possible to via some flag tell the server it
#: should export files, but don't know howto...
#:  - Anyone got any ideas?

Yes.

Don't export the file from the host, export the directory in which it
lives.

Typically, you have a directory, say /export/root, which contains all
the root directories for all diskless machines.
You also have an /export/swap directory, which contains directories for
all diskless machines, all of which contain swapfiles for that machine.

Now, the exports file from the server should read:

/export/root/<machine>	access=<machine>,root=<machine>
/export/swap/<machine>	access=<machine>,root=<machine>

The diskless machine should have
root on server:/export/root/<machine> type nfs
swap on server:/export/swap/<machine>/swap type nfs

You could always rearrange them, but I found that I would get better 
performance if I had /export/swap as its own filesystem on the server and
have it export nothing but swap files.

					--*greywolf;

#:
#: /Sillen
#: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
#: Daniel Silen |  sillen@ts.umu.se  | Historiegr 8A-103 | +46 90 196 889
#:              |  dvldsn@cs.umu.se  |    907 34 Ume=E5    | +46 10 6952451
#:              | sillen@tc.multi.se |       Sweden      |
#:             Comp. science stud. @ Ume=E5 University, Sweden
#:               Sysadm @ TSDF & Email-support:er @ UmDaC
#: GCS d-- H+ s+:- !g !p au a- w+ v C++ UA++++ P+>++++ L+ 3 N+ E K- W-- M- V -=
#: po+ Y+ t+ 5 j R G+ tv+ b++ D+ B+ e+++ u++(u*) h+ f r n---- y+
#: 
#: