NSLU2-Linux
view · edit · print · history

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

  NFSSERVER=nfsservername
  REMOTEPATH=/path
  LOCALPATH=/mnt/somedir

  grep -q "^$NFSSERVER:$REMOTEPATH $LOCALPATH nfs" /proc/mounts || mount $NFSSERVER:$REMOTEPATH $LOCALPATH

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 :)

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

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

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

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