Creating Mount Points to Access NetWare Volumes using bash on NetWare

  • 3802030
  • 26-Jan-2007
  • 27-Apr-2012

Environment

Novell Open Enterprise Server (NetWare based)
Novell NetWare 6.5
Bash
/bin/bash
Error: BASH: cd: : No such file or directory

Situation

Bash functionality on NetWare provides tools that increase control over files on the file system. By default the / (root) device on bash in NetWare is the root of the SYS volume. Also by default, other NetWare volumes do not show up and cannot be manipulated. There are a few steps that can be followed tomake these volumes accessible under bash.

Resolution

Creating Mount Points to Access NetWare Volumes in bash

The BASH shell on NetWare uses POSIX style directory syntax similar to Linux* when specifying pathnames. The foreward slash character (/) is a path separator. The backslash character (\) is not a path separator. Volume names may not be used to specify the location of files or directories (that is, it is invalid to type cd sys:/system). The sys: volume is specified by an initial foreward slash (/) in the path (for example, cd /system). To access other volumes at the BASH prompt, you must set up a pathtab file.

To set up this file, modify (or create) sys:/etc/pathtab, placing each mount point and volume on a line similar to the following:

[POSIXPath] [NetWare Path]

For example:

/vols/data  data:\
/mystuff data:\users\username
/remote RemoteServer\sys:\subdir
/vol1 VOL1:\

The first example mounts the data volume to /vols/data in BASH, the second example mounts the users\username folder to /mystuff in BASH, and so on. In these examples, the directories /vols/data,/mystuff, /remote, and /vol1 must exist in the root of the sys: volume.

CRITICAL:If trying to create these mount points with bash, NetWare/bash will fail to mount the other volumes to the specified mount points. Instead, when trying to access the volumes (under the specified mount points in bash) you will receive an error similar to the following:
# cd /volumes/
# ls
BASH: cd: : No such file or directory

The CORRECT method is to map a drive to the NetWare SYS:\ volume, create the directories (again, do this OUTSIDE of bash) to mount the volumes to, create/edit the SYS:\ETC\pathtab file as described above, load bash, and 'cd' into the mount point.

IE. For the following directory structure on SYS:\ (create the 'volumes' directory and its subdirectories) you would have a pathtab file that looks similar to:

Directory Structure
SYS: -
ETC
SYSTEM
volumes-
vol1
vol2
vol3
BLAH
BLAH
BLAH . . .

SYS:\ETC\pathtab
/volumes/vol1 DATA:\
/volumes/vol2 HOME:\
/volumes/vol3 PRINTING:\mypath\morepath\

If done correctly then under bash you will be able to access the volumes using this path:
# cd /volumes/
# ls
vol1 vol2 vol3