Subject: RE: mount/umount from commandline...
From: [email-masked] (Andrew Dalgleish)

14 May 1998 11:01:39 -0700
Message-ID: <[email-masked]>
To: [email-masked]
Cc: "Robertson, Jason V" <[email-masked]>

> -----Original Message-----
> From:	Robertson, Jason V [SMTP:[email-masked]]
> Sent:	1998 May 14, Thursday 08:43
> To:	[email-masked]
> Subject:	mount/umount from commandline...
> 
> Hello,
> 
> Is there a way to use mount/umount from a command prompt?  What
> happens is
> we have / mounted to a path, say C:/Blah.  Now from a command prompt
> we do:
> C:\> umount /
> C:\> mount C:/temp /
> mount failed: Device or resource busy
> 
> Anyone have any ideas?
[Andrew Dalgleish]  
You need to do both steps within a single script (because cygwin will
remount the current drive as a default root when you call anything after
the umount, so the mount fails as you described.)
You need to specify the full path to the mount command (because the
search path is relative to the non-existent root)

(I have my CygWin32 under U:\ - edit to suit)

del temp.sh
REM unmount the current root
echo //u/Cygnus/B19/H-i386-cygwin32/bin/umount.exe />>temp.sh
REM Remount our new root
echo //u/Cygnus/B19/H-i386-cygwin32/bin/mount.exe 'C:\Temp' />>temp.sh
REM Show the mount table
echo //u/Cygnus/B19/H-i386-cygwin32/bin/mount.exe>>temp.sh
REM run the shell script
bash temp.sh

(It would probably work if you passed it all to bash separated by
semi-colons.)

Cheers

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".