how to mount usb flash/CD when not using gnome/kde

John Summerfield debian at herakles.homelinux.org
Sun Nov 18 21:14:02 UTC 2007


Vnpenguin wrote:
> On 11/18/07, Globe Trotter <itsme_410 at yahoo.com> wrote:
>> Hi,
>>
>> I am a fvwm2 user and I was wondering how I should mount a USB flash drive or a
>> CD or DVD. I do not use gnome or KDE or XFCE unless fedora ties in some
>> application (such as claws-mail-plugins, which depends on libgnome, strangely?)
>> and I would like it that way? Is this possible? I just want to find out a way
>> to do this. Can someone please point me to some documentation, or better still,
>> tell me what to do?
>>
> 
> Do the command: "tail -f /var/log/messages" and plug your USB flash
> drive. For me, with USB Kingston key I see:
> 
> ...
> Nov 18 17:01:59 fedora8 kernel: usb 1-2: new high speed USB device
> using ehci_hcd and address 5
> Nov 18 17:01:59 fedora8 kernel: usb 1-2: configuration #1 chosen from 1 choice
> Nov 18 17:01:59 fedora8 kernel: scsi4 : SCSI emulation for USB Mass
> Storage devices
> Nov 18 17:02:04 fedora8 kernel: scsi 4:0:0:0: Direct-Access
> Kingston DataTraveler R   PMAP PQ: 0 ANSI: 0 CCS
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] 2030592 512-byte
> hardware sectors (1040 MB)
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] Write Protect is off
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] Assuming drive
> cache: write through
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] 2030592 512-byte
> hardware sectors (1040 MB)
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] Write Protect is off
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] Assuming drive
> cache: write through
> Nov 18 17:02:04 fedora8 kernel:  sdc: sdc1
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: [sdc] Attached SCSI removable disk
> Nov 18 17:02:04 fedora8 kernel: sd 4:0:0:0: Attached scsi generic sg3 type 0
> ...
> 
> Have a look at the line "sdc: sdc1 ". Now in your /etc/fstab just add a line:
> 
> /dev/sdc1 /mnt/usb vfat noauto,users,umask=0022 0 0
> 
> Of course, you need do "mkdir -p /mnt/usb" if it does not exist.
> So from now, you can mount with "mount /mnt/usb", even with normal user :)

One can also configure autofs - see /etc/auto.* to help.

However, I find this unsatisfactory because I sometimes plug in more 
than one USB disk at the same time, and they don't all appear at /dev/sdc.

One needs to be root to read /var/log/messages, I've decided I might as 
well be root so as to mount USB devices.

It's possible to configure sudo so mere mortals can "sudo mount /dev/sdc 
" for all reasonable incantations of "sdc," using their password or not.

Since my computers are mine alone, I generally use sudo to authorise all 
commands, with my password.


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list




More information about the fedora-list mailing list