Filesystem

Fix broken fstab file

  • at the grub prompt, hit "A" key to append options
  • add init=/bin/bash to the kernel command line
  • mount -o remount,rw /
  • nano /etc/fstab
  • reboot

NFS

Server

  • Install: sudo apt-get install nfs-kernel-server
  • Start/stop: sudo service nfs-kernel-server restart
  • share /data/share-osx as alias /share-osx:
    • create mount point: sudo mkdir -m 000 /share-osx
    • sudo chmod 777 /data/share-osx
    • sudo mount --bind /data/share-osx /share-osx to mount automatically after booted, add the following to /etc/fstab:
      /data/share-osx /share-osx none    bind 0 0
    • add to /etc/exports:
      /share-osx 192.168.56.0/24(rw,insecure,all_squash,anonuid=1000,anongid=1000,sync,no_subtree_check)
      # anonuid, anongid: userId/groupId (numberic) to assign to all files in the share

Client

  • install: sudo apt-get install nfs-common
  • create mount point: sudo mkdir -m 000 /nfs-share
  • Mount: sudo mount 192.168.56.1:/share-osx /nfs-share
    • on OSX, add o resvport arugment
  • Add to /etc/fstab:
    • 192.168.56.1:/share-osx /nfs-share nfs rw,async,noatime 0 0
      • add resvport if on OSX