Configuring the NFS Root file system

Source: Internet
Author: User

A PC with REDHAT9.0, a set of yfdvk2410-ii development boards, if we use NFS to load the file system is the PC/yf2410/root_dir/root directory,
Ifconfig eth0  //set PC Linux, I am using a virtual machine

ip:,//Development Board
We need to reconfigure the build kernel to turn on the Development Board NFS file system features, as follows:
1, modify the kernel/arch/arm/def-configs/smdk2410 (can also be bootloader source in the loader.c file content) configuration file config_cmdline= "root=/dev/ Mtdblock2 noinitrd INIT=/LINUXRC console=ttys0 "started from Mtdblock2 by default, this line is config_cmdline=" Root=/dev/nfs RW nfsroot= noinitrd init=linuxrc console=ttys0 ip= "
Run make Menuconfig into the configuration menu and mount the configuration file SMDK2410
Select the path and file name of the load an alternate Configuration file input profile, arch/def-configs/smdk2410
Add kernel support for NFS:
Select Networking options-"Ip:kernel level autoconfiguralion Item
Select File systems-"Network file systems-" root file system on NFS and NFS file system support recompile kernel

Make DEP (2.6 kernel not required)

Make Zimage

Download bootloader and kernel to the developer board, so the Development Board setup is complete.
PC Setup:

1, we must open the PC's NFS services, specific settings as follows: 1, run Setup under the Linux command, select the NFS service in system services, and then save the exit.
2, set up a PC on the shared directory execution Vi/etc/exports, add a
Line:/yf2410/root_dir/root * (rw), then save exit,/and RW to have space
(/yf2410/root_dir/root for Shared directories, RW for read and write permissions).
3, the implementation of/ETC/RC.D/INIT.D/NFS Restart Restart NFS services.

4, to start NFS services without having to boot every time, we add/etc/rc.d/init.d/nfs restart  to the/etc/rc.d/ In rc.local, this file will be turned on for NFS services when the PC is started.
5,   Test NFS Services: After the setup is complete, you can test on this machine, if the native IP is,
You can use the mount Root /mnt, if the mount succeeds, you can see what's under root in the/MNT directory.
6,   modify Root_china/usr/etc/rc.local file, set the Development Board IP address to
  at this point, the Development Board and PC settings have been basically completed, If our PC Debug application has been placed under the/root embedded file system, we can use the network to connect the Development Board and PC, the Development Board on the power, the system started running and by running the NFS network File system can access the familiar Linux interface. Later, the debugger will only need to put the compiled program to the root of the directory below it, the Development Board no longer need to burn write.   Run the corresponding compiler on the development Board, if the library does not, you can use  LD on your PC to view the library files used by the program, you need to copy the corresponding library to the network File system appropriate folder, so that the purpose of the cross compilation, Compile on the PC, copy to the network file system, run

on the developer board

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.