You are not logged in.

#1 2005-04-20 08:58:08

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

USB Stick [solved]

Hi,

I've got a problem with my Mp3 Stick, i tried to mount it with

mount -t vfat /dev/sda /mnt/usb -o umask=022

it worked, but if i now try to copy musik on it, it doesnt work, i did it with MidnightCommander and it said "That chown couldn't be performed". Somewhere in dmesg i read too, that the Stick was only mounted ReadOnly, someone knows what i did wrong? Maybe i forgot to add some arguments to mount?

Trapdoor

Offline

#2 2005-04-20 10:32:37

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: USB Stick [solved]

/dev/sda               /mnt/usb       vfat    user,noauto,uid=trapdoor,gid=users,sync

Try putting this line in your /etc/fstab.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2005-04-20 12:34:20

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

Re: USB Stick [solved]

If using KDE, then simply put dbus and hal at the daemons section of rc.conf. Now you can mount/unmount your USB stick simply from Konqueror's "mount media", Krusader's MountMan or the kwikdisk context menu. The mount directory is by default something like /media/USB_DISK, but you can toy with the udev rules to make it mount somewhere else.


Microshaft delenda est

Offline

#4 2005-04-20 14:03:31

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

Re: USB Stick [solved]

With adding

/dev/sda               /mnt/usb       vfat    user,noauto,uid=trapdoor,gid=users,sync 

writing on the stick works, but he files are not displayed on the stick if i try to play them. I think it has something to do with the dmesg output

usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
  Vendor: USB 2.0   Model: FLASHDISK         Rev:     
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 250368 512-byte hdwr sectors (128 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 250368 512-byte hdwr sectors (128 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
 /dev/scsi/host1/bus0/target0/lun0: unknown partition table
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
usb-storage: device scan complete

there it says " /dev/scsi/host1/bus0/target0/lun0: unknown partition table" may it be that it has something to to with that?

Offline

#5 2005-04-20 16:24:14

fetreney2000
Member
From: Malaysia
Registered: 2005-02-01
Posts: 81

Re: USB Stick [solved]

I have something like this in my fstab and my USB stick work fine :

/dev/sda1  /mnt/usb  vfat  users,noatime,sync,dirsync,noauto,uid={$user_name},gid=users  0  0

Simply type :

mount /dev/sda1

to mount the usb stick.

Offline

#6 2005-04-20 21:42:46

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

Re: USB Stick [solved]

@fetreney2000

Thanks, your solution solved the problem very well, i think i just didn't understood the function of /etc/fstab  wink

Offline

#7 2005-04-20 22:11:15

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: USB Stick [solved]

trapdoor, notice that fetreney2000's fstab line contains a partition device (/dev/sda1) not a disk device (/dev/sda) as in your case.

Offline

#8 2005-04-20 23:40:40

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

Re: USB Stick [solved]

you'll also need to install dirsync if you want to use it.

Offline

#9 2005-04-20 23:41:08

fetreney2000
Member
From: Malaysia
Registered: 2005-02-01
Posts: 81

Re: USB Stick [solved]

@trapdoor

No problem smile

@Penguin

Really? I thought it is the same as the sync argument.
From the mount manpage :

dirsync
All directory updates within the file system should be done syncronously. This affect the following system calls: create, link, unlink, symlink, mkdir, rmdir, mknod and rename.

Offline

#10 2005-04-21 00:05:58

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

Re: USB Stick [solved]

I'm not really sure what the difference between the two is, but I'm guessing sync proccesses I/O from the filesystem the second it was called for rather than caching. Dirsync makes changes to the filesystem the second you call for it so you dont loose data by removing data to quickly. Again, I'm not sure. I vaguely remember reading about it in a thread somewhere and come to find out dirsync was a downloadable package in the repos, still is..

Offline

#11 2005-04-21 00:14:41

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

Re: USB Stick [solved]

Offline

#12 2005-04-21 00:40:07

fetreney2000
Member
From: Malaysia
Registered: 2005-02-01
Posts: 81

Re: USB Stick [solved]

After reading that thread, I think there is no need to install dirsync package to use dirsync argument in the fstab.

IMO, the dirsync package is a tool for syncronising two directory to make it identical and has nothing to do with dirsync argument in fstab. We need someone to confirm this though.

Offline

#13 2005-04-21 00:51:57

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

Re: USB Stick [solved]

damn, I guess your right. I was always under the impression it was a package that needed to be installed to work with fstab...never really looked that hard at the description. :oops:

Offline

Board footer

Powered by FluxBB