2011年4月12日 星期二

Booting target Linux device with NFS

  1. apt-get install nfs-kernel-server
  2. vim /etc/exports
    /path/to/your/NFS/rootfs *(rw,no_root_squash,async)
  3. exportfs -a
  4. Modify kernel config for target:
    [*] Networking support --->
    Networking options --->
    [*] IP: kernel level autoconfiguration
    File systems --->
    [*] Network File Systems --->
    <*> NFS client support
    [*] NFS client support for NFS version 3
    [*] Root file system on NFS
  5. Change CONFIG_CMDLINE to:
    CONFIG_CMDLINE="root=/dev/nfs rw nfsroot=10.2.1.2:/data/nfs ip=10.2.1.1:10.2.1.2::255.255.0.0::eth2:off init=/linuxrc mem=256M console=ttyS0,38400"
    and boot with zImage. Or set u-boot bootargs:
    set bootargs root=/dev/nfs rw nfsroot=10.2.1.2:/data/nfs ip=10.2.1.1:10.2.1.2::255.255.0.0::eth2:off init=/linuxrc mem=256M console=ttyS0,38400;save
    and boot with uImage

沒有留言: