Problem unmounting drive
David Ryder
davaweb at bigpond.net.au
Mon Dec 29 02:30:20 GMT 2008
Nope - running as root still doesn't unmount it - I have to unmount it
by running in terminal, still.
I have tried the script with and without the sudo command in the script
file.
Any suggestions on how to mount and unmount ntfs or ext3 files (drives)
not in fstab using scripts?
I don't understand why it won't umount via a root cron job bit will
using the same script with the "Run in Terminal" option.
David
On Mon, 2008-12-29 at 12:33 +1100, David Ryder wrote:
> I've set it up as root - it mounted OK. I am waiting 'til 1p.m. (half an
> hour) for the second script to run so I can be sure the password
> requirement has timed out ...
> Thanks - I'll post the results.
> David
> On Mon, 2008-12-29 at 11:01 +1000, Lisa Milne wrote:
> > Are you running gnome-schedule as a regular user or as root?
> >
> > try running it as root with
> > gksudo gnome-schedule
> >
> > setup the task as usual and it should work now
> >
> >
> >
> > On Mon, 2008-12-29 at 11:43 +1100, David Ryder wrote:
> > > I used Configure Scheduled Tasks (gnome-schedule in synaptic).
> > > Is that what you mean by setting the cron job or have I misinterpreted
> > > you?
> > > Many thanks,
> > > David
> > > On Mon, 2008-12-29 at 10:28 +1000, Lisa Milne wrote:
> > > > How are you setting the cron job?
> > > > Are you setting it as root?
> > > > As I don't see this working if you were to set it as a normal user.
> > > >
> > > >
> > > > On Mon, 2008-12-29 at 11:23 +1100, David Ryder wrote:
> > > > > Hi,
> > > > > Hardy 8.10
> > > > >
> > > > > Please can anybody in the list help with this? It is driving me nuts.
> > > > >
> > > > > I hava a physically separate ntfs drive that I use for backups. It makes
> > > > > no difference if I format it ext3. The drive is not in fstab as I do not
> > > > > want it mounted automatically nor all the time. Keeping it in
> > > > > Places>Removable Media suits me fine.
> > > > >
> > > > > I have two scripts - one to mount it and the second to unmount it. The
> > > > > latter will not run under cron and will only "Run In Terminal". I am
> > > > > denied permission to unmount it by clicking on it.
> > > > >
> > > > > The drive is called hardy32-backups and I have made a folder called
> > > > > hardy32-backups in /media/ - without it the first script will not run.
> > > > >
> > > > > The scripts are in /usr/local/bin and Schedule Tasks has the right path
> > > > > to them:
> > > > > 1. mount hardy-32-backups.sh runs at 4am and
> > > > > 2. unmount hardy-32-backups.sh (should) runs at 7am.
> > > > >
> > > > > 1. mount hardy-32-backups.sh script runs fine - it contains:
> > > > > #!/bin/sh
> > > > > sudo mount UUID=764809814809417B /media/hardy32-backups
> > > > >
> > > > > 2. unmount hardy-32-backups.sh does not run - which is my problem. It
> > > > > contains:
> > > > > #!/bin/sh
> > > > > sudo umount /media/hardy32-backups/
> > > > >
> > > > > I have tried:
> > > > > sudo umount UUID=764809814809417B /media/hardy32-backups
> > > > > sudo umount UUID=764809814809417B
> > > > > sudo umount /hardy32-backups
> > > > > sudo umount /hardy32-backups/
> > > > > without any luck as well as running without sudo in front.
> > > > >
> > > > > When mounted by the script it appears on the desktop and in mtab as:
> > > > > /dev/sdi1 /media/hardy32-backups fuseblk
> > > > > rw,nosuid,nodev,noatime,allow_other,blksize=4096 0 0
> > > > > but please note it is not always sdbi1 after a reboot.
> > > > >
> > > > > I just can't get it to umount via cron. Any help would be very much
> > > > > appreciated, thanks.
> > > > >
> > > > > David
> > > > >
> > > > >
> > > > --
> > > > WebLinux - Linux live on the web!
> > > > http://www.weblinux-live.org
> > > >
> > > >
> > >
> > --
> > WebLinux - Linux live on the web!
> > http://www.weblinux-live.org
> >
> >
>
>
More information about the ubuntu-au
mailing list