Setup NFS-Root-Filesystem

From t-hack.com - Hack X300T / X301T

Jump to: navigation, search

Contents

setup nfs server

  • install nfs server

e.g. in debian based distributions that should do the trick:

apt-get install nfs-kernel-server
  • setup exports (e.g. edit /etc/exports)
/some/dir/nfsroot 192.168.1.*(rw,sync,subtree_check,no_root_squash)
  • reconfigure nfsd
exportfs -a


populate nfsroot

  • cd into the desired directory
  • create nfsroot-direcotory and download nfsroot-tarball from here
  • extract it with tar xjvf nfsroot_x300t_20080214.tar.bz2

NOTE: you have to be root to do this and the files are directly inside the tarball, so there is no extra dir


kernel cmd-line parameter

  • use the "Compiled-in Kernel Boot Parameter" if you are lazy

or

  • start yamon
  • change kernel cmd line parameter, we need ip kernel configuration!!
setxenv a.linux_cmd "console=ttyS0 root=/dev/nfs rw nfsroot=(nfs_server_ip):/some/dir/nfsroot ip=(my_ip_addr):(server_ip_addr):(gateway):(netmask):(hostname)"
  • ok, here is an example without placeholders:

x300t_ip: 192.168.1.20
nfs_server_ip: 192.168.1.30
gateway: 192.168.1.1
netmask: 255.255.255.0

setxenv a.linux_cmd "console=ttyS0 root=/dev/nfs rw nfsroot=192.168.1.30:/some/dir/nfsroot ip=192.168.1.20:192.168.1.30:192.168.1.1:255.255.255.0:x300t"

boot kernel and (hopefully) Linux

ok, the above settings should let the box mount a rootfs via nfs!

Personal tools