This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: mount/umount from commandline...



> -----Original Message-----
> From:	Robertson, Jason V [SMTP:jason.v.robertson@intel.com]
> Sent:	1998 May 14, Thursday 08:43
> To:	gnu-win32@cygnus.com
> 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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]