We're no longer updating This wiki!!

This is an old revision of the document!


Boot linux over NFS

The following text describes on how to use NFS for the root filesystem. For the rest of this text 'client' means the diskless system, and 'server' means the NFS server.

NFS server settings (HOST PC)

Install nfs pakages.

sudo apt-get install nfs-kernel-server nfs-common

After insert your eMMC or SD card, copy the Root File System.

# The rootfs folder is mounted your RFS by SD card.
sudo cp -rp /media/$USER/rootfs /home/$USER/

Add following line in “/etc/exports”

/home/$USER/rootfs        *(rw,sync,no_root_squash,no_subtree_check)

Restart NFS service.

sudo service nfs-kernel-server restart

Modify /home/$USER/rootfs/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback

Kernel configuration

To use Ethernet and NFS on initramfs you need to change module to built-in.

kernel configuration

Location:

-> File systems
  -> Network File Systems
     <*> NFS client support
     <*> NFS client support for NFS version 3

Then, Update your ODROID's kernel.
Refer to the following links How to kernel update.

NFS Client(Tartget Board) settings

How to add the boot argument

You shuled modify boot.ini file or compile to a u-boot script.

Append following line to the boot argument.

boot=nfs root=/dev/nfs ip=dhcp nfsroot=${rfspath} rw

Modify “/media/boot/boot.ini”

setenv rfspath 192.168.0.22:/home/john/rootfs
setenv bootargs "boot=nfs root=/dev/nfs ip=dhcp nfsroot=${rfspath} rw rootwait ro ${condev} no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=${m} m_bpp=${m_bpp} vout=${vout_mode} ${disableuhs}"

Reboot.

sudo reboot

Nice to have a lot of disk space:

root@odroid:~# df -h                                                                                
Filesystem                      Size  Used Avail Use% Mounted on                                    
192.168.0.22:/home/john/rootfs  909G  177G  687G  21% /                                             
none                            4.0K     0  4.0K   0% /sys/fs/cgroup                                
udev                            420M  4.0K  420M   1% /dev                                          
tmpfs                           425M  4.0K  425M   1% /tmp                                          
tmpfs                            85M  2.6M   83M   3% /run                                          
none                            5.0M     0  5.0M   0% /run/lock                                     
none                            425M   76K  425M   1% /run/shm                                      
none                            100M   24K  100M   1% /run/user                                     
/dev/mmcblk0p1                  129M  7.4M  122M   6% /media/boot
odroid-c2/software/c2_nfsboot.1464588656.txt.gz · Last modified: 2016/05/30 14:40 by john1117
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0