# NFS diskless problem.....

## xanthax

Hi, i get a error when i iboot my diskless client thats says

```

Root-NFS: Server returned error -13 while mounting /diskless/192.168.0.21

```

And then i cheded the CONFIG_ROOT_NFS and it kompiled in so i did a

TCPDUMP and got a error in the end.

So here is the end.

```

11:20:38.820411 IP linuxdatorn.32781 > ..56325: UDP, length: 1414

11:20:38.821732 IP ..56325 > linuxdatorn.32781: UDP, length: 4

11:20:41.235724 arp who-has . tell linuxdatorn

11:20:42.236542 arp who-has . tell linuxdatorn

11:20:43.236365 arp who-has . tell linuxdatorn

11:20:51.801962 IP linuxdatorn.bootps > ..bootpc: BOOTP/DHCP, Reply, length: 32011:20:51.803049 IP linuxdatorn.bootps > ..bootpc: BOOTP/DHCP, Reply, length: 32011:20:51.812024 arp who-has linuxdatorn tell .

11:20:51.812040 arp reply linuxdatorn is-at 00:0c:76:b6:18:d3

11:20:51.812307 IP ..800 > linuxdatorn.sunrpc: UDP, length: 56

11:20:51.812396 IP linuxdatorn.sunrpc > ..800: UDP, length: 28

11:20:51.812820 IP ..800 > linuxdatorn.sunrpc: UDP, length: 56

11:20:51.812867 IP linuxdatorn.sunrpc > ..800: UDP, length: 28

11:20:51.813226 IP ..800 > linuxdatorn.761: UDP, length: 96

11:20:56.812037 arp who-has . tell linuxdatorn

11:20:56.812270 arp reply . is-at 00:00:39:d8:8d:d7

11:20:56.813473 IP ..800 > linuxdatorn.761: UDP, length: 96

11:21:01.815308 IP linuxdatorn.761 > ..800: UDP, length: 28

11:21:11.816622 IP linuxdatorn.761 > ..800: UDP, length: 28

11:21:11.817061 IP . > linuxdatorn: icmp 64: . udp port 800 unreachable

```

If it helps anything "mountd"  takes verrylong time to start when starting

NFS package in "/etc/init.d/nfs"

NEED HEEELP   :Crying or Very sad: 

----------

## rasmussen

Is portmap running?

----------

## xanthax

yes portmap is running...

----------

## xanthax

Come on dudes, i really need this working...

im intruducing this as a clone server for notebooks in a 100%

microsoft enviroment. need this to brake the chain of micro$oft evil.

----------

## neysx

You're nor giving a lot of info about your setup.

Maybe  this will help.

----------

## xanthax

Nope sorry, that page didn´t help..

Please tell me what information you need and i will provide it.

i HAS worked before. I have used it on a DELL inspiron "as client".

and now im using it on a toshiba p2000 "as client". and i have generic

architechture suport on and what i can see i have the driver for both

computers compiled into the kernel. And i do change the MAC when i

change clients.

PLEEZZZZZZ NEEED HELP......

/Sad little Xanta.... X  :Crying or Very sad: 

----------

## neysx

Received in a personal msg: *Quote:*   

> You posted a reply on my forum post aplying to NFS diskless installation
> 
> and you wanted facts so here is what i can offer you soo far....
> 
> Im woking as a notebook technichan for a toshiba service center and
> ...

 

For the record, posting a private message is not very clever. You limit the number of persons who might help you to exactly one. On one of my many bad days, it would have been zero.

Now about your problem.

If I get it right, you boot both your laptops with the same kernel. How does the kernel get to your clients? PXE? Have you got a pxe config file to show us?

Can you manage to read the messages displayed when your kernel is booting?

Could you try to compile two kernels with only one net driver compiled in each?

Have you made nfs log more messages with the -d options in /etc/conf.d/nfs:

```
RPCMOUNTDOPTS="-d all"
```

----------

## xanthax

Oki, here we go and sorry for the private mess. won't happen again...

Yes i use PXE but also atleast tries to enable Etherboot

This is my /etc/conf.d/nfs

```

# Config file for /etc/init.d/nfs

                                                                                

# Number of servers to be started up by default

RPCNFSDCOUNT=8

                                                                                

# Options to pass to rpc.mountd

# ex. RPCMOUNTDOPTS="-p 32767

RPCMOUNTDOPTS="-d all"

                                                                                

# Options to pass to rpc.statd

# ex. RPCSTATDOPTS="-p 32765 -o 32766"

RPCSTATDOPTS=""

```

and then we have the /etc/dhcp/dhcpd.conf

```

# DHCP configuration file for DHCP ISC 3.0

                                                                                

    max-lease-time 86400;

    default-lease-time 86400;

                                                                                

ddns-update-style none;

                                                                                

# Definition of PXE-specific options

# Code 1: Multicast IP address of boot file server

# Code 2: UDP port that client should monitor for MTFTP responses

# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests

# Code 4: Number of seconds a client must listen for activity before trying

#         to start a new MTFTP transfer

# Code 5: Number of seconds a client must listen before trying to restart

#         a MTFTP transfer

                                                                                

option space PXE;

                                                                                

option PXE.mtftp-ip               code 1 = ip-address;

option PXE.mtftp-cport            code 2 = unsigned integer 16;

option PXE.mtftp-sport            code 3 = unsigned integer 16;

option PXE.mtftp-tmout            code 4 = unsigned integer 8;

option PXE.mtftp-delay            code 5 = unsigned integer 8;

option PXE.discovery-control      code 6 = unsigned integer 8;

option PXE.discovery-mcast-addr   code 7 = ip-address;

                                                                                

allow booting;

allow bootp;

                                                                                

option subnet-mask            255.255.255.0;

option broadcast-address      192.168.0.255;

#option routers                192.168.0.1;

#option domain-name-servers    192.168.0.1;

option routers                192.168.0.30;

option domain-name-servers    192.168.0.30;

option log-servers            192.168.0.30;

option domain-name            "linuxdatorn";

                                                                                

subnet 192.168.0.0 netmask 255.255.255.0 {

                                                                                

  range dynamic-bootp 192.168.0.21 192.168.0.21;

                                                                                

  class "pxeclients" {

    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

    option vendor-class-identifier "PXEClient";

    vendor-option-space PXE;

                                                                                

    # At least one of the vendor-specific PXE options must be set in

    # order for the client boot ROMs to realize that we are a PXE-compliant

    # server.  We set the MCAST IP address to 0.0.0.0 to tell the boot ROM

    # that we can't provide multicast TFTP (address 0.0.0.0 means no

    # address).

                                                                                

    option PXE.mtftp-ip 0.0.0.0;

                                                                                

    # This is the name of the file the boot ROMs should download.

    filename "pxelinux.0";

    # This is the name of the server they should get it from.

    # Use the master's IP

    next-server 192.168.0.30;

  }

                                                                                

  # If you are using etherboot with a non specific image

  class "etherboot" {

        if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

        filename "/diskless/vmlinuz";

        }

  }

                                                                                

  host slave21 {

       # Use your slave's MAC address

       hardware ethernet                00:08:0D:40:AD:36;

       # Give your slave a static IP

       fixed-address                    192.168.0.21;

       server-name                      "linuxdatorn";

       # Use your gateway IP, if required

#       option routers                   192.168.0.1;

       option routers                   192.168.0.30;

       # Use your DNS IP, if required

#       option domain-name-servers       192.168.0.1;

       option domain-name-servers       192.168.0.30;

       option domain-name               "linuxdatorn";

       # Use your slave hostname

       option host-name                 "slave21";

                                                                                

                                                                                

       # Etherboot and pxe boot with a mac specific image

       option root-path                 "192.168.0.30:/diskless/192.168.0.21";

                                                                                

       if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

                        filename "/vmlinuz";

        } else if substring (option vendor-class-identifier, 0,9) ="PXEClient" {                        filename "/pxelinux.0";

        }

                                                                                

  }

}

```

And here is my /etc/exports that shares folders to my network

```

# /etc/exports: NFS file systems being exported.  See exports(5).

# one line like this for each slave

/diskless/192.168.0.21   192.168.0.21(sync,rw,no_root_squash,no_all_squash)

                                                                                

# common to all slaves

/opt   192.168.0.21(sync,ro,no_root_squash,no_all_squash)

/usr   192.168.0.21(sync,ro,no_root_squash,no_all_squash)

/home  192.168.0.21(sync,rw,no_root_squash,no_all_squash)

/mnt/dumpdisk  192.168.0.21(sync,rw,no_root_squash,no_all_squash)

                                                                                

# if you want to have a shared log

/var/log   192.168.0.21(sync,rw,no_root_squash,no_all_squash)

```

And finally my /diskless/192.168.0.21/etc/fstab that mounts fron my

NFS server to my diskless client.

```
 

# <fs>                  <mountpoint>    <type>          <opts>                  <dump/pass>

                                                                                                                                               

# these entries are essential

192.168.0.30:/diskless/192.168.0.21   /         nfs     sync,hard,intr,rw,nolock,rsize=8192,wsize=8192    0 0

192.168.0.30:/opt                     /opt      nfs     sync,hard,intr,ro,nolock,rsize=8192,wsize=8192    0 0

192.168.0.30:/usr                     /usr      nfs     sync,hard,intr,ro,nolock,rsize=8192,wsize=8192    0 0

192.168.0.30:/home                    /home     nfs     sync,hard,intr,rw,nolock,rsize=8192,wsize=8192    0 0

192.168.0.30:/mnt/dumpdisk            /mnt/dumpdisk     nfs     sync,hard,intr,rw,nolock,rsize=8192,wsize=8192    0 0

none                                  /proc     proc    defaults                                     0 0

# useful but superfluous

192.168.0.30:/var/log                 /var/log  nfs     hard,intr,rw                                 0 0

```

All suggestions gratefully accepted.

//Xanthax

----------

## xanthax

BTW, If it helps anyone i took my server back to work and it

still won work there. And i checked that it dont have another

DCHP server, on that network either.

Really need help...

//Xanthax

----------

## neysx

Given both your toshiba and your dell receive a kernel image, I suppose your DHCp config is OK. Mine is slightly different, I don't use the root-path options. Here is a verbatim copy just in case:

```
# DHCP configuration file for DHCP ISC 3.0

ddns-update-style none;

# Definition of PXE-specific options

# Code 1: Multicast IP address of boot file server

# Code 2: UDP port that client should monitor for MTFTP responses

# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests

# Code 4: Number of seconds a client must listen for activity before trying

#         to start a new MTFTP transfer

# Code 5: Number of seconds a client must listen before trying to restart

#         a MTFTP transfer

option space PXE;

option PXE.mtftp-ip               code 1 = ip-address;  

option PXE.mtftp-cport            code 2 = unsigned integer 16;

option PXE.mtftp-sport            code 3 = unsigned integer 16;

option PXE.mtftp-tmout            code 4 = unsigned integer 8;

option PXE.mtftp-delay            code 5 = unsigned integer 8;

option PXE.discovery-control      code 6 = unsigned integer 8;

option PXE.discovery-mcast-addr   code 7 = ip-address;

subnet 10.0.0.0 netmask 255.255.255.0 {

  class "pxeclients" {

    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

    option vendor-class-identifier "PXEClient";

    vendor-option-space PXE;

    # At least one of the vendor-specific PXE options must be set in

    # order for the client boot ROMs to realize that we are a PXE-compliant

    # server.  We set the MCAST IP address to 0.0.0.0 to tell the boot ROM

    # that we can't provide multicast TFTP (address 0.0.0.0 means no

    # address).

    option PXE.mtftp-ip 0.0.0.0;

    # This is the name of the file the boot ROMs should download.

    filename "pxelinux.0";

    # This is the name of the server they should get it from.

    next-server 10.0.0.10;

  }

  pool {

    max-lease-time 86400;

    default-lease-time 86400;

    range 10.0.0.10 10.0.0.40;

    deny unknown clients;

  }

  host clusternode2 {

       hardware ethernet                00:40:63:C2:CA:C9;

       fixed-address                    10.0.0.20;

       server-name                      "manuel";

       option routers                   10.0.0.138;

       option domain-name-servers       10.0.0.1;

       option domain-name               "a.la.maison";

       option host-name                 "clusternode2";

  }

  host clusternode3 {

       hardware ethernet                00:40:63:C2:C5:65;

       fixed-address                    10.0.0.30;

       server-name                      "manuel";

       option routers                   10.0.0.138;

       option domain-name-servers       10.0.0.1;

       option domain-name               "a.la.maison";

       option host-name                 "clusternode3";

  }

  host clusternode4 {

       hardware ethernet                00:40:63:C0:B3:B6;

       fixed-address                    10.0.0.40;

       server-name                      "manuel";

       option routers                   10.0.0.138;

       option domain-name-servers       10.0.0.1;

       option domain-name               "a.la.maison";

       option host-name                 "clusternode4";

  }

}
```

And my pxelinux.cfg/0A000014:

```
DEFAULT /boot/2.6.5-slave

APPEND vga=0x30a ip=dhcp root=/dev/nfs nfsroot=10.0.0.10:/

```

This is found next to pxelinux.0. The name of the file is the IP address of the node written in hexadecimal. The file abov is for node 10.0.0.20. Using filename C0 will serve all nodes in 192.*.*.*

The nfsroot option gives the server and path to the root  :Wink:  All my boxes (server 10.0.0.10 and nodes .20 .30 .40) share a common / 

FYI, this is how it looks like.

BTW, you did change the MAC address to your toshiba's in your dhcp config?

Isn't there any clue in your nfs logs about why the NFS mount is refused?

----------

## xanthax

Yep, i alterd the MAC before i booted the new laptop.

and here is my  /diskless/pxelinux.cfg/C0A800  wich is = 192.168.0

```

DEFAULT /bzImage

APPEND ip=dhcp root=/dev/nfs nfsroot=192.168.0.30:/diskless/192.168.0.21

```

And im gonna do a TYPEOFF of my client screen *PHEW*

```

Sending DHCP request from 192.168.0.21, my address is 192.168.0.21, OK

IP-Config: Got DHCP answer from192.168.0.30, my address is 192.168.0.21

IP-Config: Complete:

 device=eth0, addr=192.168.0.21, mask=255.255.255.0, gw=192.168.0.30,

 host=host1, domain=LinuxClient, nis-domain=(none), 

 bootserver=192.168.0.30, rootserver=192.168.0.30, rootpath=

Looking up port of RPC 100003/2 on 192.168.0.30

Looking up port of RPC 100005/1 on 192.168.0.30

Root-NFS: Server returned error -13 while mounting /diskless/192.168.0.21

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Insert root floppy and press ENTER

```

That is what my client says before it just won´t continue...

AND REMEMBER IT´S A TYPEOFF NOT A COPY PASTE SO COULD BE SPELLING MISTAKES....

BTW i tested your dhcpd.conf and alterd it for my computers.

it gave the same error.

Hope this gave you something more to go on..

//Xanthax

----------

## neysx

This is what I have:

```
eth0: Setting full-duplex based on MII #1 link partner capability of cde1.

Sending DHCP requests ., OK

IP-Config: Got DHCP answer from 10.0.0.10, my address is 10.0.0.20

IP-Config: Complete:

      device=eth0, addr=10.0.0.20, mask=255.255.255.0, gw=10.0.0.138,

     host=clusternode2, domain=a.la.maison, nis-domain=(none),

     bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=

Looking up port of RPC 100003/2 on 10.0.0.10

Looking up port of RPC 100005/1 on 10.0.0.10

VFS: Mounted root (nfs filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 120k freed
```

Not very different. I wonder why your domain is LinuxClient.

Does rpc.mountd log anything?

A refused mount looks like

```
Jun  2 15:27:57 [rpc.mountd] refused mount request from basil.a.la.maison for /usr2/portage/distfiles (/): not exported
```

 and a successful one like

```
Jun  2 15:28:53 [rpc.mountd] authenticated mount request from basil.a.la.maison:707 for /usr2/portage/distfiles (/usr2/portage/distfiles)
```

You might also want to try the insecure option in your exportfs like

```
/ 10.0.0.20(insecure,sync,rw,no_root_squash)

/ 10.0.0.30(insecure,sync,rw,no_root_squash)

/ 10.0.0.40(insecure,sync,rw,no_root_squash)
```

 and then run

```
exportfs -f && exportfs -v
```

----------

## xanthax

I set my exports to insecure and tried to run your command,

this is what is says when i try to tun the command you said.

```

# exportfs -f && exportfs -v

exportfs: -f: only available with new cache controls: mount /proc/fs/nfsd first

```

And this is what mountd logs in /var/log/messages

```

# cat /var/log/messages | grep mountd

Jun  7 07:52:04 linuxdatorn rpc.mountd: Fake hostname . for 192.168.0.21 - forward lookup doesn't exist

Jun  7 07:52:04 linuxdatorn rpc.mountd: refused mount request from 192.168.0.21 for /diskless/192.168.0.21 (/): no export entry

Jun  7 07:52:14 linuxdatorn rpc.mountd: Fake hostname . for 192.168.0.21 - forward lookup doesn't exist

Jun  7 07:52:14 linuxdatorn rpc.mountd: refused mount request from 192.168.0.21 for /diskless/192.168.0.21 (/): no export entry

```

I took my dell laptop to work an tested there and it didn´t work so it has to be something with the network. and the ondy diffrence on our networks

is that at home i have a dlink Dl604+ and at work we have a Dl804 as DSL router. Internal DHCP turned OFF on both DSL routing devices of cause.

"have been away from work since wensday, havent been able to check before now."

does this say something ?

----------

## neysx

 *xanthax wrote:*   

> This is what is says when i try to tun the command you said.
> 
> ```
> 
> # exportfs -f && exportfs -v
> ...

 My fault. Without /proc/fs/nfsd (don't bother about that), just use exportfs -r, then use exportfs -v to display what is exported with what options.

 *xanthax wrote:*   

> And this is what mountd logs in /var/log/messages
> 
> ```
> 
> # cat /var/log/messages | grep mountd
> ...

 This makes me think nfs is doing a reverse DNS lookup. I was not aware it did that.

For the sake of it, could you try adding the insecure option in your exports like /diskless/192.168.0.21   192.168.0.21(insecure,sync,rw,no_root_squash,no_all_squash)

Anyway, if nfs does try to reverse dns, you should define your host in the /etc/hosts file on your server. After that, exportfs -v should display the hostname of your diskless instead of its IP.

HTH

----------

## xanthax

IT WORKS:::::.........  :Shocked: 

GODAMNIT...

It seems as when you use a DNS/router as DNS wich does not support

realtime hostname updating, in other words realtime reverse DNS lookup,

you have to specify the hostnames IP/hostname in "/ets/hosts" otherwise

it cant find the ip and says FAKE HOSTNAME and says, im a bitchy security

function and says NO....

So just add your host to your hosts file and woila....

THANK YOU "NEYSX"  :Wink: 

AND A BIG BOOOO to dlink for making Dl804....

Over and out.

----------

## neysx

Glad I could help.

I'll make a note about this in our diskless howto.

Thanks a lot for bringing up this issue.

BTW, your dhcpd.conf starts with ddns-update-style none; and you tell your diskless that 192.168.0.30 is its gw and dns server so maybe you shouldn't blame dlink too much  :Wink: 

dnsmasq provides an integrated dhcp/dns server and it looks like it supports net booting. I've added 'try dnsmasq' on my todo list. Its config looks a lot simpler.

Bye.

----------

## xanthax

Hmm got a new or almost new problem.

I want to be able to boot any computer without

changing the mac address.

so be able to boot any ONE computer at the same time without

changing the MAC in the dhcp config.

//XanthaX

----------

