# PXE problems

## Hajen

I'm trying to make my HTPC bott over the network, but i'm having some problems. The motherboard has a Nforce2 chip vith builtin nvidia NIC. This nic is by what i understand not supported by pxe grub, so i cant use thatone. And when i'm trying to make it load my kernel directly it complains that it's to bigg to load into memmory. Are there any way to solve this problem?

----------

## Hajen

Ok, that problem is solved now. But i get kernel panic that /dev/nfs does't exist when i boot. Anny ideas?

----------

## neysx

Maybe the Gentoo diskless howto can help you out.

Hth

----------

## Hajen

Actualy i don't i checked thatone before i started  :Smile: 

First pxegrub doesent suport my netvorkcard (builtin nforce2 card)

secondly i tonight found that there are a oops in the 2.6.7 krenel making it panic when trying to mount nfsroot on /dev/nfs :-/ So i gues i'm stuck for now.

----------

## smart

I'm doing netboot of 2.6.7 on sparc without problems.

----------

## neysx

I use 2.6.7 on diskless machines and it works like a charm.

----------

## Hajen

Hmm strange.

Then this should work.

Ok, can someone find somting strange in this.

From the config file in pxelinux.cfg

DEFAULT pxelinux.cfg/bzImage ip=dhcp root=/dev/nfs nfsroot=192.168.0.100:/Diskles/nox AutoLogin=aido pxelinux.cfg/initrd=initrd-800x600

From export in the nfs server

/Diskles/nox nox/255.255.255.255(rw,sync,no_root_squash)

And i have compiled the kernel with Root filesystem on NFS but still i'm geting kernelpanic after 

VFS cant open device nfs or unknown block(0,255)

----------

## neysx

Check checking: you did check

```
Device Drivers  --->

  Networking support  --->

    Networking options  --->

      [*]   IP: kernel level autoconfiguration

      [*]     IP: DHCP support

File systems  --->

  Network File Systems  --->

    [*] Root file system on NFS
```

This is what I have in my pxeconfig:(no initrd here)

```
# cat /boot/pxelinux.cfg/0A000028

DEFAULT /boot/2.6.7-slave

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

Please note that I share a common /, hence the different nfsroot.

I'd say you miss the APPEND line.

That should solve your current problem.

::edit::

You seem to believe pxelinux.cfg is a file, it should be a directory and it should contain the config files. In my case, 0A000028 is for node 10.0.0.40. Use e.g. C0 for all your nodes and C0A80064 for another config for node 192.168.0.100. Just an example.

Besides, what's the point of nox/255.255.255.255?

I'm not even sure it's supposed to work.

You should put either a hostname or its IP, or a network/netmask pair. You should use nox on its own and it should resolve to the IP your diskless is getting from DHCP.

If you get an NFS error 13 (iirc), you'll know you had it wrong  :Wink: 

----------

## Hajen

Yes the kenel options are there in my config.

Sorry for writing so fast ofcourse i have pxelinux.cfg as a directory with a pile named after the ip in hex inside it.

The append row is not nececerry if you write it as i do, atleaast if i read pxelinux.doc, although i tested by changing it but it still wont work. 

The nox/255.255.255.255 are so that only nox should be able to mount that source, but i have also tried without it wit the same error as previously.

```

VFS cant open root device "nfs" or unknown block(0,255)

please apend a correct "root=" boot option

Kernel panic: VFS:  unable to mount root fs on unknown block(0,255)
```

----------

## smart

several parts:

A) Can you verify, that the network driver starts and the interface is detected during startup ?

B) The DHCP kernel configuration should come back with a 3liner telling that the request has been sent and all configuration adice it got out of the DHCP data. So allt hat stuff like ipaddress netmask gateway and bootserver should be shown during kernel start.

C) If you go DHCP, then why do you use this pxegrub stuff at all and don't just go for kernel directly and serve all kernel config you need with DHCP ? Would safe you from the question if pxegrub supports the NIC, only kernel needs  :Smile: 

----------

## Hajen

 *smart wrote:*   

> several parts:
> 
> A) Can you verify, that the network driver starts and the interface is detected during startup ?
> 
> 

 

Yes since pxelinux.0 is downloaded from the tftpserver and it prints out the ip that i get.

 *Quote:*   

> 
> 
> B) The DHCP kernel configuration should come back with a 3liner telling that the request has been sent and all configuration adice it got out of the DHCP data. So allt hat stuff like ipaddress netmask gateway and bootserver should be shown during kernel start.
> 
> 

 

If this  is the information from the pxe then yes, during linux-kernel booting no.

 *Quote:*   

> 
> 
> C) If you go DHCP, then why do you use this pxegrub stuff at all and don't just go for kernel directly and serve all kernel config you need with DHCP ? Would safe you from the question if pxegrub supports the NIC, only kernel needs 

 

I dont use pxegrub since it is incompatible with my neworkcard, i use pxelinux.0 linuxloader.  Also tried to point the pxe directly to the kernel (bzImage) but then i get the error that it's to large to load. This even when i have removed al things not required for netboot into modules instead to slim the kernel down.

----------

## neysx

 *Hajen wrote:*   

>  *smart wrote:*   several parts:
> 
> A) Can you verify, that the network driver starts and the interface is detected during startup ?
> 
>  Yes since pxelinux.0 is downloaded from the tftpserver and it prints out the ip that i get.

 This is plain wrong. It's the rom on your NIC card that does that. It's getting clearer that you stripped too much from your kernel. There is no way you'll get a kernel that is small enough and that's why solutions like pxe exist. Besides, there is no need for an initrd, just send a proper kernel and you'll be fine. You might want to read the diskless howto again  :Wink: 

BTW, to restrict access to one client in your /etc/exports, you should only write its name (if it can be resolved by your NFS server) or its IP, no need to clutter up your file with /255.255.255.255 *Hajen wrote:*   

>  *Quote:*   
> 
> B) The DHCP kernel configuration should come back with a 3liner telling that the request has been sent and all configuration adice it got out of the DHCP data. So allt hat stuff like ipaddress netmask gateway and bootserver should be shown during kernel start.
> 
>  
> ...

 The kernel should display the information it received from your DHCP server. You should see something similar to

```
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 
```

If not, then you did not select the right options in your kernel (eth card, dhcp config at boot time, nfs on root, all [*], not modules).

FYI, your DHCP server will receive two requests, once from the pxe prom when booting your diskless and once again when the kernel is loading.

Hth

----------

## Hajen

Ok i will once again check my kernel, and once again i'm not downloding the kernel diectly, i said that i had tried that since i got the tip to do so but it dident work since it is indead to large as i mentioned.

And that is why i'm using pxelinux.

Whow that became a wery lonc centence   :Wink: 

Anyhow it seems that it is kernel problems for me so tonight i will make a new one and se if i can manage to get it up and running.

Thanks for the help.

----------

## neysx

 *Hajen wrote:*   

> Ok i will once again check my kernel, and once again i'm not downloding the kernel diectly, i said that i had tried that since i got the tip to do so but it dident work since it is indead to large as i mentioned.
> 
> And that is why i'm using pxelinux.

 What makes you believe your kernel is too large to be downloaded directly? Well, through pxe of course, not directly through tftp.

My kernel is 1.3MB and pxe has no problem downloading it

```
-rw-r--r--  1 root root 1327209 Apr  4 01:56 /boot/2.6.7-slave
```

Good luck

----------

## Hajen

It's to large for directly trough tftp i mean it's to large.

----------

## neysx

Since you're now using pxe, just build a proper kernel and have pxe load it. Get rid of your initrd in the process.

----------

## Hajen

Ok, now im a litle bit further  :Smile: 

I updated my kerner from 2.6.7-r9 to 2.6.7-r11 and woila the NIC comes upp durng kernel booting. But almist directly it reboots cause a warning

```

Warning: Unable to open initial console

```

So one step further and a new problem to solve.

Time fore som google  :Smile: 

----------

## Hajen

Weeeee now it's working the last thing was some rights that had changed on some files. 

Thanks for al the hints finaly making me find the solution  :Smile: 

----------

