16.04.2024, 13:38 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
anotheruser
Titel: usb mount  BeitragVerfasst am: 25.07.2006, 12:27 Uhr



Anmeldung: 27. Feb 2005
Beiträge: 16

Hello

How i can mount usb devices as user?

(using 2.6.17.3-slh64-smp-1)
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
devil
Titel: usb mount  BeitragVerfasst am: 25.07.2006, 13:24 Uhr
Team Member
Team Member


Anmeldung: 06. Mai 2005
Beiträge: 3087
Wohnort: berlin
are they in fstab or do you pop them in and out?


greetz
devil

_________________
<<We are Xorg - resistance is futile - you will be axximilated>>

Host/Kernel/OS "devilsbox" running[2.6.19-rc1-git5-kanotix-1KANOTIX-2006-01-RC4 ]
CPU Info AMD Athlon 64 3000+ clocked at [ 803.744 MHz ]
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
anotheruser
Titel: RE: usb mount  BeitragVerfasst am: 26.07.2006, 00:49 Uhr



Anmeldung: 27. Feb 2005
Beiträge: 16

They are not in fstab, since they are 3 devices.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
testdriver
Titel:   BeitragVerfasst am: 26.07.2006, 04:38 Uhr



Anmeldung: 26. Jul 2006
Beiträge: 5

One way could be this:

2. Open a terminal and become root ( I hope you knowhow)

3. plugin the devices

4. In the terminal type
Code:
dmesg | grep sd*


5. look for lines that either include sda, sdb and sdc or sda1 sda2 sda3. The only thing important is to know if the devices are called sda1, sda2 etc or sda, sdb etc.

Incase they are called sda, sdb and sdc (which is most likely) you should think of a name that you want to give those devices to link to for instance usb-hdd1 usb-hdd2 etc or what ever you think is handy. I will use the usb-hdd name here.

Oke you know the devices and you have choosen a name for the link now we want to automate the proces.

7. Still as root type for all devices
Code:
mkdir /media/"yourchoosenname"
So for example
Code:
mkdir /media/usb-hdd1 && mkdir /media/usb-hdd2 && mkdir /media/usb-hdd3


8. check if they are set by typing
Code:
ls /media


9. Now open /etc/fstab in nano for example or another editor you prefure but make sure you open it as root

Incase of nano:

10: nano -w /etc/fstab (you should see the fstab file now. Dont edit any line all you need to do is add 3 lines
Code:

/dev/sda      /media/usb-hdd1   vfat user,noauto     0       0
/dev/sdb      /media/usb-hdd2   vfat user,noauto     0       0
/dev/sdc      /media/usb-hdd3   vfat user,noauto     0       0


Close nano by pushing Ctrl+O to save the file and Ctrl+X to close.
Exit root and the terminal and thats it.


Note1. the usb-hdd* name is an example like i sad before you should pick a name that make sence to yourself.

Note2. I asumed the filesystem on the devices are fat incase its not you should replace vfat for the correct type, iso9660 incase of cd/dvd ot ntfs incase of ntfs drives, but I guess you can figure that out easely.

Note3: Incase you want to automount the devices at boot all you need to do is replace noauto for auto.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
testdriver
Titel:   BeitragVerfasst am: 26.07.2006, 04:47 Uhr



Anmeldung: 26. Jul 2006
Beiträge: 5

Ow when you replug them everytime sine it are 3 devices you could plug them 3 times, check the dmesg to see what device name they get (the sda part) and do the same thing as desciped earlier only now with the name it gets when plugged. If the name is the same every time you only need one line in fstab pointing to the device and to the linkpoint in /media.

If you are in hury you could do a mount (as root) directly in the terminal by typing
Code:
 mount /dev/$name you got from dmesg" -t "filetype" /media/"mountpoint"

Remember no matter what You use you allways need to make a mountpoint link.
So for example again:
Code:
 mount /dev/sda1 -t vfat /media/usb-hdd


Goodluck
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
t-bone
Titel:   BeitragVerfasst am: 26.07.2006, 07:40 Uhr



Anmeldung: 12. Sep 2005
Beiträge: 130

This is what I did:

[imdeemvp@localhost imdeemvp]$ cd /mnt/ <-as user cd yourself to the mnt folder and become root to create directory
[imdeemvp@localhost mnt]$ su
Password:
[root@localhost mnt]# mkdir usbflash <- this created a directory in the mnt folder

[root@localhost mnt]# ls /mnt/ <-this command listed all my directories the mnt folder
cdrom cdrom1 floppy usbflash

[root@localhost mnt]# mount /dev/sda1 /mnt/usbflash <-this is the command to mount flash card reader

[root@localhost mnt]# ls usbflash

Hope it works for you...it did for my USB key that did not mount automatically, although my USB hard drive does every time.

Do not forget to unmount it before unplugging it!

umount -f /mnt/sda1

Have fun! Sehr glücklich

_________________
"All that is not given is lost."
 
 Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen AIM-Name Yahoo Messenger MSN Messenger ICQ-Nummer 
Antworten mit Zitat Nach oben
anotheruser
Titel:   BeitragVerfasst am: 26.07.2006, 08:05 Uhr



Anmeldung: 27. Feb 2005
Beiträge: 16

Thank you for your help.
This is what i have been doing till i got bored.
I was sure this was due to some security bug, since i could mount usb devices in konqueror as root but not as user.
After playing with a lot of groups, kde works properly if you add the user to plugdev. Sehr glücklich
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
t-bone
Titel:   BeitragVerfasst am: 26.07.2006, 18:23 Uhr



Anmeldung: 12. Sep 2005
Beiträge: 130

Great to know! Sehr glücklich

_________________
"All that is not given is lost."
 
 Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen AIM-Name Yahoo Messenger MSN Messenger ICQ-Nummer 
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.