# Network boot with diskless client and NFS root - stuck on bo



## mix_room (Oct 6, 2013)

I am trying to get diskless systems to PXE-boot FreeBSD 9.1, with the root-partition on an NFS server. 

The setup is the following: 
machine-s1: gateway and DHCP-server 
machine-s2: TFTP-server and NFS-server
machine-c-{1,..,N}: diskless clients 

When I follow http://freebsd.so14k.com/freebsd9_pxe.shtml I get a machine which directly boots pxeboot with the NFS-root. 

However, I would like to be able to boot other systems aswell. For this I followed http://www.wonkity.com/~wblock/docs/html/pxe.html to install pxelinux. At this time I get the boot-menu which lets me select what I want to boot, and I can successfully boot mfsBSD. 

Now to the remaining problem, when I attempt to start pxeboot from pxelinux the boot sequence does not proceed. I get stuck at the FreeBSD bootstrap loader, the last line given being: 


```
FreeBSD/x86 bootstrap loader, Revision 1.1 
(root@farrell.cse.buffalo.edu, Tue Dec 4 08:16:03 UTC 2012)
```

It would seem to me that pxeboot does not get informed that it should boot from a NFS-root, and so can't proceed. Has anyone else experienced something similiar?
I can mount the NFS-share from all machines on my network, that should not be the problem. 

My config files: 

DHCPd config

```
TFTP-Server: machine-s2
next-server: machine-s2
file-name: gpxelinux.0
root-path: machine-s2:/NFSROOT/
```

pxelinux.cfg

```
label freebsd
        menu label FreeBSD9.1
        pxe NFSROOT/boot/pxeboot      
        append nfsroot=machine-s2:/NFSROOT/

label mfsbsd
        menu label mfsBSD
        kernel memdisk
        initrd mfsbsd/mfsBSD9.1 raw
```
(The config above was tested with and without the append nfsroot=... line)

What am I missing / forgetting / doing wrong? Is this something that should not work?


----------



## Ajax (Jun 21, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

Got the same problem trying to make FreeBSD to boot from another FreeBSD 10 server as diskless machine. Was doing according to Handbook's 30.8 but got no luck. Anyone, any thoughts?


----------



## wblock@ (Jun 22, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

That screen shot says Ignoring unsupported root path.  Do you have the server IP address in the root path?


----------



## Ajax (Jun 22, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

Sure, here is the part of dhcpd.conf

```
class "vbox" {
    match if (substring(hardware, 1, 3) = 08:00:27);
}

# Mobile
subnet 192.168.22.0 netmask 255.255.255.0 {
        option domain-name-servers 192.168.22.1;
        option domain-name "example.mobi";
        authoritative;
        allow booting;
        allow bootp;
        allow client-updates;
        option subnet-mask 255.255.255.0;
        option routers 192.168.22.1;
        ddns-updates on;
        ddns-domainname "example.mobi.";
        ddns-rev-domainname "in-addr.arpa.";
        next-server 192.168.22.1;
        filename "FreeBSD/install/boot/pxeboot";
        option root-path "nfs://192.168.22.1/b/tftpboot/FreeBSD/install/";
        pool {
                range 192.168.22.100 192.168.22.200;
                allow members of "vbox";
                }
        }
```
and sure I have /b/tftpboot/FreeBSD/install/ on 192.168.22.1; also tried root-path in "192.168.22.1:/b/tftpboot/FreeBSD/install/" notation, result is the same


----------



## wblock@ (Jun 22, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

But that's the problem, I think: the root path should just be the path.  The server is already set in the next-server option.  So try just

```
option root-path "/b/tftpboot/FreeBSD/install/";
```


----------



## morl (Jun 22, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

I was playing a bit with diskless booting myself, following the Handbook instructions pretty closely led me to successfully netboot a laptop and an older machine. 
I run all the required services on a single machine connected with the switch to clients and to a home "router". 

This is the dhcpd.conf which works for me. 192.168.1.23 is the machine on which the `dhcpd` runs, along with `tftpd` (which serves pxeboot) and NFS root mount point.

```
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.10 192.168.1.20 ;

        option routers 192.168.1.1 ;
        option broadcast-address 192.168.1.255 ;
        option domain-name "morlab" ;
        option domain-name-servers [dns-isp1], [dns-isp2] ;

        next-server 192.168.1.23 ;
        filename "FreeBSD/install/boot/pxeboot" ;
        option root-path "192.168.1.23:/b/tftpboot/FreeBSD/install/" ;
}
```
I used the above root-path style, but I just tried:

```
option root-path "nfs://192.168.1.23/b/tftpboot/FreeBSD/install/" ;
```
which works too. However,

```
option root-path "/b/tftpboot/FreeBSD/install/";
```
Does not work for me.


----------



## Ajax (Jun 22, 2014)

*Re: Network boot with diskless client and NFS root - stuck o*

I have found in the mailing lists that this problem seems to be in the virtual box, particularly in the iPXE code they use. I will try with this environment to boot on real hardware in a day or so and will let you know.


----------

