NSLU2-Linux
view · edit · print · history

HowTo.MountNFS History

Hide minor edits - Show changes to markup

July 04, 2008, at 08:55 PM by turbo --
Changed lines 32-36 from:
  1. !/bin/sh

ln -sf /[wherever]/fstab /etc/fstab return 1

would help. (or maybe just includ it into the above-mentioned script

to:
  #!/bin/sh
  ln -sf /[wherever]/fstab /etc/fstab
  return 1

would help. (or maybe just include it into the above-mentioned script...)

July 04, 2008, at 08:54 PM by turbo --
Changed lines 28-36 from:

The proper unix way would be to put it in /etc/fstab but that seems to get zapped on every boot - if anyone know what to do to get custom fstab entries in Unslung, feel free to update this page :)

to:

The proper unix way would be to put it in /etc/fstab but that seems to get zapped on every boot - if anyone know what to do to get custom fstab entries in Unslung, feel free to update this page :)

Turbo: I haven't actually tried this but maybe a Diversion script like this:

  1. !/bin/sh

ln -sf /[wherever]/fstab /etc/fstab return 1

would help. (or maybe just includ it into the above-mentioned script

May 12, 2007, at 11:56 AM by xkr47 -- improved startup script
Changed lines 15-16 from:
  grep -q '^nfsservername:/path' || mount nfsservername:/path /mnt/somedir
to:
  NFSSERVER=nfsservername
  REMOTEPATH=/path
  LOCALPATH=/mnt/somedir

  grep -q "^$NFSSERVER:$REMOTEPATH $LOCALPATH nfs" /proc/mounts || mount $NFSSERVER:$REMOTEPATH $LOCALPATH
May 12, 2007, at 11:54 AM by xkr47 -- Instructions how to mount remote nfs partitions
Added lines 1-23:

To mount remote nfs partitions with Unslung, first install the portmap package

  ipkg install portmap

(If you don't do it, the mount command will take minutes although it might still succeed.)

After that, just mount your remote disks somewhere like this:

  mkdir /mnt/somedir
  mount nfsservername:/path /mnt/somedir

If you want it to mount automatically during next boot, one way is to create a script /opt/etc/init.d/S56nfsmount :

  #!/bin/sh
  grep -q '^nfsservername:/path' || mount nfsservername:/path /mnt/somedir

After creating the file, run the following command to make it executable:

  chmod a+rx /opt/etc/init.d/S56nfsmount

---

The proper unix way would be to put it in /etc/fstab but that seems to get zapped on every boot - if anyone know what to do to get custom fstab entries in Unslung, feel free to update this page :)

view · edit · print · history · Last edited by turbo.
Based on work by turbo and xkr47.
Originally by xkr47.
Page last modified on July 04, 2008, at 08:55 PM