You are not logged in.

#1 2007-04-30 19:14:38

weeniewhite
Member
From: Saint-Nicolas, Quebec
Registered: 2007-01-04
Posts: 37

Mounting my USB drive without being root

Hi,
I would like to mount my USB drive without being super-user.
The command I run for mounting the drive is :
sudo mount -t vfat /dev/sda1 /mnt/usbflash
.


[weeniewhite@myhost ~]$ sudo make bagel
make: *** No rule to make target `bagel'.  Stop.

Offline

#2 2007-04-30 19:27:25

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Mounting my USB drive without being root

in your /etc/fstab, add:
/dev/sda1       /mnt/usbflash   vfat noauto,user,rw   1  0

Then you'll be able to mount it with:
$ mount /mnt/usbflash

Offline

#3 2007-04-30 23:39:23

weeniewhite
Member
From: Saint-Nicolas, Quebec
Registered: 2007-01-04
Posts: 37

Re: Mounting my USB drive without being root

[weeniewhite@myhost ~]$ mount /mnt/usbflash
mount: special device /dev/sda1 does not exist


It doesn't seem to work :S.


[weeniewhite@myhost ~]$ sudo make bagel
make: *** No rule to make target `bagel'.  Stop.

Offline

#4 2007-05-01 00:14:22

scarecrow
Member
From: Greece
Registered: 2004-11-18
Posts: 715

Re: Mounting my USB drive without being root

It's because it is /dev/sga1 since some time ago.
Just get sure HAL is running, add yourself to the "storage" group and then logout and back in. No need to add fstab entries.


Microshaft delenda est

Offline

#5 2007-05-01 03:26:10

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Mounting my USB drive without being root

if you have scsi/sata or using the new pata subsystem your devices will be named sdxy. That means your flash drive will shift to something else below them. Run ls /dev before and after plugging in you flash drive to find which device it is. If its u3 you may have to mount the entire drive itself instead of specifying a partition on it.

Offline

#6 2007-05-01 06:14:50

davin
Member
From: UK
Registered: 2007-05-01
Posts: 25
Website

Re: Mounting my USB drive without being root

if your usb drive not detected automatically you can't modified fstab entry in normal mode.

Offline

#7 2007-05-01 16:45:23

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Mounting my USB drive without being root

relevant options in /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
usbfs                  /proc/bus/usb usbfs     noauto              0      0

/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0
/dev/sdb1 /mnt/usb1 auto noauto,user,exec 0       0
/dev/sdc1 /mnt/usb2 auto noauto,user,exec 0       0


you need to create mountpoints first:
/mnt/usb1
/mnt/usb2

user will have to belong to the right groups (storage, video, optical, camera)

usb has nothing to do with sata/scsi/ata as long as I remember usb device was sdX where /dev/sdX corresponds to the port connected.

Offline

#8 2007-05-02 00:15:47

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: Mounting my USB drive without being root

broch wrote:

usb has nothing to do with sata/scsi/ata as long as I remember usb device was sdX where /dev/sdX corresponds to the port connected.

This is really neither here nor there, but I believe the sd of sdX stands for (s)csi (d)isk. usb mass storage devices masquerade as scsi devices.

Offline

#9 2007-05-02 03:55:48

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Mounting my USB drive without being root

USB storage devices are listed as SCSI devices. It should be reported as /dev/sdXY where X is the next available device letter and Y is the partition number. Most USB devices will only have a single partition.

Offline

#10 2007-05-02 13:25:51

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Mounting my USB drive without being root

not really:
usb driver is really an interface between the usb stack and the scsi layer. This does not make usb a scsi device. It only uses scsi layer. similarly are treated Zip, LS120 and USB CDROMs.

but you may use libusb and usbdev and scsi is not required.

Last edited by broch (2007-05-02 13:42:24)

Offline

#11 2007-05-02 15:47:25

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Mounting my USB drive without being root

broch wrote:

not really:
usb driver is really an interface between the usb stack and the scsi layer. This does not make usb a scsi device. It only uses scsi layer. similarly are treated Zip, LS120 and USB CDROMs.

but you may use libusb and usbdev and scsi is not required.

No one is trying to claim that USB devices are SCSI devices. I stated that USB devices are listed by the kernel as SCSI devices, the same as SATA discs and many other devices. And while you can use alternative methods it is not recommended. You should not use the other kernel driver for USB storage devices currently.

Offline

#12 2007-05-07 23:25:41

weeniewhite
Member
From: Saint-Nicolas, Quebec
Registered: 2007-01-04
Posts: 37

Re: Mounting my USB drive without being root

Hey thanks!

I've added :
/dev/sda1              /mnt/usbflash auto  noauto,user,exec        0      0


in fstab and now I can mount my USB drive with my user. smile


[weeniewhite@myhost ~]$ sudo make bagel
make: *** No rule to make target `bagel'.  Stop.

Offline

#13 2007-05-08 03:02:41

coolpyrofreak
Member
From: Las Vegas
Registered: 2006-03-13
Posts: 53

Re: Mounting my USB drive without being root

Try this: http://wiki.archlinux.org/index.php/AutoFS_HowTo

KDE mounts my usb stick when I plug it in.  Wonderful.

Offline

Board footer

Powered by FluxBB