No volumes in Linux?

Mark Waddingham 36degrees at runrev.com
Fri Sep 9 06:13:37 EDT 2005


Hi Bob,

The problem you are experiencing with the shell command stems from the
fact you are trying to execute a super-user only command when Revolution
is not running with super-user privileges. The shell command (as it
stands) makes no attempt to authenticate or change the user-environment
and so cannot be used to do this.

However, in this case you have other options other than sfdisk :o)

Whenever a device is mounted on linux, the record of this fact is
recorded in '/etc/mtab' - this file contains a list of all currently
mounted devices with various details. For example, right now, the mtab
on one of my machines is:

/dev/hda3 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda2 /home ext3 rw 0 0
/dev/hda6 /systems/additional-1 ext3 rw 0 0
/dev/hda7 /systems/additional-2 ext3 rw 0 0
/dev/hda8 /systems/additional-3 ext3 rw 0 0
/dev/hda9 /systems/additional-4 ext3 rw 0 0
/dev/hda10 /systems/additional-5 ext3 rw 0 0
/dev/hda11 /systems/additional-6 ext3 rw 0 0
/dev/hda12 /systems/additional-7 ext3 rw 0 0
/dev/hda5 /workspace ext3 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0

The format here is:
  <device> <mount-point> <filesystem> <access> <?> <?>

To the best of my knowledge '/etc/mtab' is always globally readable -
but if not, the information can also be extracted by calling the 'mount'
command via shell. Again, in my case when I do shell("mount") I get:

/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda2 on /home type ext3 (rw)
/dev/hda6 on /systems/additional-1 type ext3 (rw)
/dev/hda7 on /systems/additional-2 type ext3 (rw)
/dev/hda8 on /systems/additional-3 type ext3 (rw)
/dev/hda9 on /systems/additional-4 type ext3 (rw)
/dev/hda10 on /systems/additional-5 type ext3 (rw)
/dev/hda11 on /systems/additional-6 type ext3 (rw)
/dev/hda12 on /systems/additional-7 type ext3 (rw)
/dev/hda5 on /workspace type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

Hope this helpes,

Mark.

------------------------------------------------------------------
 Mark Waddingham ~ 36degrees at runrev.com ~ http://www.runrev.com
       Runtime Revolution ~ User-Centric Development Tools




More information about the use-livecode mailing list