# mounting kernel through NFS for s3c2410



## ashwin_karanth (Jul 21, 2010)

hi..
    I want load kernel image through nfs for s3c2410,i am using the following procedure, and i am using minicom as a serial interface.and uboot loader is already in the board.

I am following this link to configure NFS
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html


setting arguments

```
s3c32410# set gatewayip 172.16.5.1
s3c32410# set ipaddr 172.16.5.150
s3c32410# set serverip 172.16.5.63
```
To load the kernel into addresss refers to DRAM

```
nfs 31000000 172.16.5.63:/tftpboot/kernel.boot
```

The error is

```
Filetransfer via NFS from server 172.16.5.63; our IP address is 172.16.5.150
Filename /tftpboot/kernel.boot
Load address :0x31000000
Loading: *** ERROR:cannot mount
***ERROR:cannot umount
```

can any one help me out to solve this problem.


----------



## wblock@ (Jul 21, 2010)

What do you have in /etc/exports?


----------



## ashwin_karanth (Jul 21, 2010)

```
/tftpboot/kernel.boot -rw -network 172.16.5.63 -mask 255.255.255.0
```


----------



## wblock@ (Jul 21, 2010)

ashwin_karanth said:
			
		

> ```
> /tftpboot/kernel.boot -rw -network 172.16.5.63 -mask 255.255.255.0
> ```



It should export the directory, not the file itself.  Also might be user concerns.  Check that kernel.boot is readable by the user logging in, or if you don't know what user the target board uses, do a mapall like below.  Exported dirs probably should be -ro unless you're going to write back from the target system.


```
/tftpboot -ro -mapall=nobody:nobody -network 172.16.5.63 mask 255.255.255.0
```


----------



## ashwin_karanth (Jul 22, 2010)

hi wblock thanks for your suggestion..
    is there need to set any kernel arguments while building a kernel..i am setting only in the board specific file LN2410SBC.


```
option         BOOTP
option         BOOTP_NFSROOT
option         NFSCLIENT
option         NFS_ROOT
```


----------



## sasha (Jul 29, 2010)

Can you tell me, which command you are using to create file 'kernel.boot'? Or it is same as 'kernel'?
I know that the image for u-boot can be generated by mkimage, but I don't know exact parameters for FreeBSD kernel.
Thanks!


----------



## ashwin_karanth (Jul 30, 2010)

I am taking kernel file to linux machine and i am using mkimage command to create kernel.boot file


----------



## rodrigc@ (Oct 1, 2011)

Please look at this document which was recently added to the FreeBSD handbook:

"PXE Booting with a NFS Root File System"
http://www.freebsd.org/doc/handbook/network-pxe-nfs.html

That might help you get a working NFS + PXE boot setup.


----------

