Any way to switch removable media without umount/mount?

Any way to switch removable media without umount/mount?

Post by Steve La » Fri, 20 Nov 1998 04:00:00




>1) log out
>2) log in as root

su - root, 1 step...

Quote:>3) unmount the relevant device
>4) switch the media
>5) mount the device again
>6) log back in as the non-super-user I'd prefer to be when not doing
>administrativia

exit...

--
             Steve C. Lamb             | Opinions expressed by me are not my
    http://www.calweb.com/~morpheus    | employer's.  They hired me for my
             ICQ: 5107343              | skills and labor, not my opinions!
---------------------------------------+-------------------------------------

 
 
 

Any way to switch removable media without umount/mount?

Post by Nick Drey » Sat, 21 Nov 1998 04:00:00


This may not be possible, but if it is, I'd sure like to know how to be able
to switch CD's, floppy's and Jaz disks without having to

1) log out
2) log in as root
3) unmount the relevant device
4) switch the media
5) mount the device again
6) log back in as the non-super-user I'd prefer to be when not doing
administrativia

|\|.

 
 
 

Any way to switch removable media without umount/mount?

Post by Nick Drey » Sat, 21 Nov 1998 04:00:00


Thanks everyone for tip on user option in fstab.

I gather then that the steps (3)-(5) below are always needed however?


<snip>

Quote:>3) unmount the relevant device
>4) switch the media
>5) mount the device again

<snip>

|\|.

 
 
 

Any way to switch removable media without umount/mount?

Post by Roland Latou » Sat, 21 Nov 1998 04:00:00



> Thanks everyone for tip on user option in fstab.

> I gather then that the steps (3)-(5) below are always needed however?

> >3) unmount the relevant device
> >4) switch the media
> >5) mount the device again

I put entries in my .fvwmrc:

Popup "CD-menu"
        Exec     "Mount CD"       exec  mount /cdrom
        Exec     "UnMount CD"     exec  umount /cdrom
EndPopup

--
  Roland Latour  Slackware3.4 & PPP     http://home.cdsnet.net/~rolandl
"Never ascribe to malice that which is adequately explained by
incompetence."      - Napoleon Bonaparte

 
 
 

Any way to switch removable media without umount/mount?

Post by joseph_a_philbrook__i » Sat, 21 Nov 1998 04:00:00





>> I gather then that the steps (3)-(5) below are always needed however?

> yes

>> <snip>

>> >3) unmount the relevant device
>> >4) switch the media
>> >5) mount the device again

I'm not an expert but it seams to me that steps 3 & 5 could be
written to an executable shell script with echo statements for prompts
and dummy read statements to pause while you do step 4...

     If I'm right then couldn't these user shell scripts be called at apropiate
     places in any user automated process? < which shell scripts do better
     than dos .bat files ever did ;) >

        -^-   -^-
        <?>   <?>    Joe (theWordy) Philbrook
            ^

 
 
 

Any way to switch removable media without umount/mount?

Post by Dillon Pyr » Sat, 21 Nov 1998 04:00:00



> This may not be possible, but if it is, I'd sure like to know how to be able
> to switch CD's, floppy's and Jaz disks without having to

> 1) log out
> 2) log in as root
> 3) unmount the relevant device
> 4) switch the media
> 5) mount the device again
> 6) log back in as the non-super-user I'd prefer to be when not doing
> administrativia

> |\|.

su?
sudo?
A separate window?

All just some suggestions based on more than a few years of experience.

--
dillon pyron

No rain, no rainbows

 
 
 

Any way to switch removable media without umount/mount?

Post by James McCa » Sun, 22 Nov 1998 04:00:00




> > Thanks everyone for tip on user option in fstab.

> > I gather then that the steps (3)-(5) below are always needed however?

> Yes.

Just write a trivail little script file that tries to unmount the device
and then mount it.  Then, if it is already unmounted you get a little
error message but who cares, and then you have the device mounted.  If
it is already mounted, everything happens perfectly.  eg:

a script called dosflop:

umount /floppy
mount /floppy

Pretty simple :)  But then again, very useful.

you can even have a script to unmount everything, (and remount
everything if you like too )  It is actually quite useful.

bye
james