# diskless - NFS root mount problem



## mgp (Oct 31, 2009)

Hi,
I'm trying to setup diskless operation between my FreeBSD desktop (server) and my laptop (client)
I have NFS_ROOT and all other necessary options compiled into my kernel, I have this in /etc/exports:

```
/ -ro -maproot=root -alldirs 192.168.0.3
/usr -ro -alldirs 192.168.0.3
```
and this in dhcpd.conf

```
subnet 192.168.0.0 netmask 255.255.255.0 {
  use-host-decl-names on;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.0.255;
  option routers 192.168.0.1;

  host laptop {
    hardware ethernet 00:1E:68:45:0D:98;
    fixed-address 192.168.0.3;
    filename "pxeboot";
    option root-path "192.168.0.1:/";
  }
```
when I attempt to (diskless) boot the laptop - stage one and two of the boot process are fine...actually stage tree which is the kernel is also fine...the kernel boots and starts bringing the system up...however it's unable to mount the NFS root for some reason and the system freezes here:

```
...
...
Trying to mount root from ufs:/dev/ad4s1a
Trying to mount root from nfs:
NFS ROOT: 192.168.0.1:/
nfs send error 13 for server 192.168.0.1:/
bge0: link state changed to DOWN
bge0: link state changed to UP
```
I think error 13 means attempt to write on read-only mounted NFS...but does not make sense, does it?
do you have any ideas what could be the problem?

thanks


----------



## monty_hall (Nov 2, 2009)

*Here's what I did*

Just create a kernel/world @ /diskless on the server.  I'm just cutting and pasting from a working diskless system.  YMMV.  Hope this helps.

Monty

===========================


```
/etc/export:
/diskless -maproot=root -network 192.168.1.0 -netmask 255.255.255.0

/usr/local/etc/dhcp.conf:
host <<client_name>> {
  hardware ethernet     ....;
  option host-name      "<<client_name>>";
  ddns-hostname         "<<client_name>>";
  next-server           <<server_ip>;
  filename              "pxeboot";
  option root-path      "/diskless";
  fixed-address         <<client_name>>;
}
```


----------



## mgp (Nov 3, 2009)

thanks for the reply, Monty
You don't have the "-ro" option in your exports file?
You allow your clients to have write permissions on the root partition?
Would your setup work if you add the "-ro" switch?

thanks


----------

