Skip to content

Instantly share code, notes, and snippets.

@uebayasi
Last active September 29, 2020 03:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uebayasi/cd158cfb4b971f93c936c60027b002ad to your computer and use it in GitHub Desktop.
Save uebayasi/cd158cfb4b971f93c936c60027b002ad to your computer and use it in GitHub Desktop.
Mount root as NFS on OpenWrt x86_64

Summary

  • Not much info available but surely possible
  • Basically same as normal Linux NFS root
  • Except kernel configuration adjustment might be tricky

Environment

  • Target: OpenWrt 15.x on KVM
  • Host Ubuntu 16.04

Configuration

Kernel

  • Do make kernel_menuconfig
  • Save changes with git diff target/linux
  • Add CONFIG_KERNEL_IP_PNP=y to the global .config (not one under linux subdirectory), do make defconfig, and make V=s
    • Enable CONFIG_DHCP and CONFIG_ROOT_NFS for kernel config

Host

  • Basic "Linux NFS root" configuration
  • Nothing special needed for OpenWrt
  • NFS root
    • Root is OpenWrt's build_dir/target-x86_64_musl-1.1.14/root-x86
      • XXX Need to fix file user/group/mode?
    • Edit etc/config/network and comment out config interface 'lan' (eth0)
      • eth0 is already configured for NFS root

References

  1. http://www.8devices.com/community/viewtopic.php?f=6&t=471
  2. https://github.com/MarvellEmbeddedProcessors/openwrt-bb/wiki/ClearFog-a1-Instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment